VideoHelp Forum




+ Reply to Thread
Results 1 to 22 of 22
  1. If possible, please list out the steps. This is what I already know -

    1. I have a original source video (either in MKV or Blu-ray disc remux).

    2. I download x265 10bit from here - https://builds.x265.eu/. I want to do a 10bit encoding.

    3. I opened command prompt and opened x265 from that.

    After this, I'm not clear. I read somewhere that I have to convert my source to YUV format, but I haven't found anything anywhere. I can't believe after so much searching, I can't find anything to proceed. Please help.
    Quote Quote  
  2. You can use e.g. ffmpeg to decode to YUV:
    ffmpeg.exe -i "input.mkv" -f yuv4mpegpipe - | x265.exe - --y4m -o "output.265"

    ffmpeg also has x265 integrated but the binaries you find online are often only 8 bit:
    https://trac.ffmpeg.org/wiki/Encode/H.265
    Last edited by sneaker; 3rd Oct 2016 at 15:44. Reason: forgot the "-o"
    Quote Quote  
  3. https://ffmpeg.zeranoe.com/builds/

    Here there are three different versions. Which one should I download, static, shared, dev?

    Also, will this conversion reduce the quality? Please tell me in detail about what to do, how to use this ffmpeg and what to do after that. You can assume me to be a complete noob (Until now I only have used Staxrip CRF encoding which is very easy). This will help anyone new to this.
    Quote Quote  
  4. Originally Posted by knightplex View Post
    https://ffmpeg.zeranoe.com/builds/

    Here there are three different versions. Which one should I download, static, shared, dev?
    If in doubt: static.

    Originally Posted by knightplex View Post
    Also, will this conversion reduce the quality?
    Technically every lossy conversion (like x264, x265 in non-lossless mode) will lose quality. Often, you will not notice any difference though (we call that "transparent"). How much quality is lost depends on the settings you use, mainly the bitrate (lower --crf = higher bitrate = less quality lost)

    Originally Posted by knightplex View Post
    Please tell me in detail about what to do, how to use this ffmpeg and what to do after that.
    Download and extract ffmpeg and x265. Put ffmpeg.exe and x265.exe to where you want to work (or add them to Windows %PATH% to make them work anywhere). Start a command-prompt in the folder you want to work in (where your e.g. "input.mkv" is) by holding shift and right-click, "Open Command Window Here". Then enter the command I showed you in my last post.
    Quote Quote  
  5. Oh no. I meant to ask if mkv to YUV conversion will cause loss of quality. If it does, x265 is inefficient? mkv to yuv to hevc?

    Thank you so much for further steps!
    Quote Quote  
  6. Originally Posted by knightplex View Post
    I meant to ask if mkv to YUV conversion will cause loss of quality.
    No, it's lossless.
    Quote Quote  
  7. ffmpeg.exe -i "input.mkv" -f yuv4mpegpipe - | x265.exe - --y4m --crf=22 "output.265"

    Is this correct? Now whatever x265 settings I want to use from here http://x265.readthedocs.io/en/default/cli.html, I should write them after --crf 22, right?
    Quote Quote  
  8. The command order doesn't matter, mostly. All the same:
    x265.exe - --y4m --crf 22 -o "output.265"
    x265.exe --crf=22 -o "output.265" - --y4m
    x265.exe - -o "output.265" --crf 22 --y4m
    x265.exe --y4m --crf=22 -o "output.265" -

    But: I made a small mistake. I forgot the "-o" that signals output file name. I edited my old post to correct this.
    Quote Quote  
  9. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    An alternative solution would be avs4x26x if you just want to feed an AviSynth script output to x265 (or x264, or even x262?). This is just a "pipe bridge" so you don't need to save an intermediate YUV or Y4M file, instead the AviSynth output is fed to the encoder in RAM.
    Quote Quote  
  10. Originally Posted by sneaker View Post
    But: I made a small mistake. I forgot the "-o" that signals output file name. I edited my old post to correct this.
    I think I encoded without the -o!
    What happens without the -o? I don't remember if I wrote it.

    Anyways, I got my first encode through command line, thanks for that. If I want to shutdown after the encode, do the usual commands used in "Run" dialog box work?
    Quote Quote  
  11. Originally Posted by knightplex View Post
    I think I encoded without the -o!
    What happens without the -o? I don't remember if I wrote it.
    It should abort with an error message. Nothing else should happen.

    Originally Posted by knightplex View Post
    Anyways, I got my first encode through command line, thanks for that. If I want to shutdown after the encode, do the usual commands used in "Run" dialog box work?
    You can add an extra line with the shutdown -s command at the end of a batch file if that's what you mean.
    Quote Quote  
  12. Thanks a lot. Will this command line change in future updates? If so can I keep track of it anywhere?
    Quote Quote  
  13. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Originally Posted by knightplex View Post
    Thanks a lot. Will this command line change in future updates? If so can I keep track of it anywhere?
    http://x265.readthedocs.io/en/latest/
    Quote Quote  
  14. ffmpeg.exe -i "input.mkv" -f yuv4mpegpipe - | x265.exe - --y4m -o "output.hevc" | shutdown -s

    This command line immediately shuts down the computer in a minute without encoding. What to modify so that it'll shutdown after encoding?
    Quote Quote  
  15. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Try the ampersand instead (a pipe chains output to input, but does not wait; and "shutdown" does not care about any input).

    Multiple Commands On A Single Windows Command Line

    Code:
    ffmpeg.exe -i "input.mkv" -f yuv4mpegpipe - | x265.exe - --y4m -o "output.hevc" && shutdown -s
    No guarantee, but it should shut down only if x265 returns result 0 = "OK" if it works as intended.
    Quote Quote  
  16. Originally Posted by LigH.de View Post
    Try the ampersand instead (a pipe chains output to input, but does not wait; and "shutdown" does not care about any input).

    Multiple Commands On A Single Windows Command Line

    Code:
    ffmpeg.exe -i "input.mkv" -f yuv4mpegpipe - | x265.exe - --y4m -o "output.hevc" && shutdown -s
    No guarantee, but it should shut down only if x265 returns result 0 = "OK" if it works as intended.
    Thanks a lot. It worked!
    Quote Quote  
  17. Hey guys, does x265 support cropping? This is the code that I tried to crop black bars, but it isn't working.

    ffmpeg.exe -i "input.mkv" -f yuv4mpegpipe - | x265.exe - --y4m --display-window 0,138,0,138 --overscan crop --crf=22 -o "output.hevc"
    I learned it from here https://x265.readthedocs.io/en/default/cli.html#vui-video-usability-information-options
    Quote Quote  
  18. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    The decoder may be directed to crop away this region before displaying the images...
    Important: "may". Provided the decoder respects these bitstream flags at all. So, which decoder/player did you use?

    In addition, I wonder if MediaInfo would report these flags in a "full" (CLI: -f) / "extended" (GUI: Debug menu) analysis. If yes, they are certainly stored in the bitstream; if no, you can't be sure if not just MediaInfo does not report them, and may need a different HEVC analyzer.
    Quote Quote  
  19. Use ffmpeg's cropping filter.
    Quote Quote  
  20. Originally Posted by sneaker View Post
    Use ffmpeg's cropping filter.
    Can you help me with the command line? My current default command line is this

    Code:
    ffmpeg.exe -i "i.mkv" -f yuv4mpegpipe - | x265.exe - --y4m -o "o.265"
    Even if you give me the command line which directly uses the x265 encoder compiled in ffmpeg, that's okay (Since it has the latest stable version.)
    Quote Quote  
  21. ffmpeg.exe -i "i.mkv" -vf crop=w=1920:h=804:x=0:y=138 -f yuv4mpegpipe - | x265.exe - --y4m -o "o.265"
    https://ffmpeg.org/ffmpeg-filters.html#crop
    Quote Quote  
  22. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    The brief option format of the "video filter" parameter (-vf ...) is possibly deprecated. I believe the the new verbose form (generic:specific) is recommended instead in new ffmpeg versions: -filter:v "..."; just similar to "-vcodec" vs. "-codec:v".
    Last edited by LigH.de; 3rd Nov 2016 at 09:41.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!