VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. First i'd like to say thanks, I've been reading this forum for a week or so now getting lots of info for what I have been doing. I like the results I am getting but now I have some question about the way I have been doing things.

    To encode my x265 from Blu-ray. I use ffmpeg.

    I decompress the video from the m2ts file into a YUV 420 pix fmt
    I pull out the audio track I want with copy
    I then run the YUF through ffmpeg with x265 and CRF
    I then merge the video and audio into an mkv(yes audio is untouched)
    I am happy with the result

    What I want to know is it necessary to extract the 500GB YUV file? Is there a way around that. Something that say does it on the fly?

    Also how can I streamline it? I do each of these steps by manually typing into console to ffmpeg

    Sorry if I didn't get exact with the commands, I don't have the memorized yet. if its important I'll get the exact details.

    Edit: Just realised I can grab the audio and toss it into the mkv at the same time I encode. Here is the exact command I used
    ffmpeg -f rawvideo -vcodec rawvideo -s 1920x1080 -r 23.976 pix_fmt yuv420p -i input.yuv -i audio.dts -c:v libx265 -preset medium -x265-params crf=20 -c:a copy output.mkv

    Edit: switch my commandline from x264(typo) to x265
    Last edited by madhatr; 12th Dec 2015 at 09:57.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Why can't you work with m2ts directly? After you ripped i then.
    Quote Quote  
  3. Performing m2ts to raw is necessary step - go directly from rip to h.265, beware that x265 support in ffmpeg is seriously limited (practically broken as additional x265 parameters are ignored, also most popular ffmpeg builds may use outdated x265 library).
    Quote Quote  
  4. I read somewhere that x265 needs to work from raw video and not x264 or vnc1 encoded stuff. Is this no longer the case?(may have been outdated docs) I also thought working with an uncompressed file would give better results. I am new so I don't know a lot about it all yet.

    So you guys are saying I can do
    ffmpeg -i video.m2ts -i audio.dts -c:v libx265 -preset medium -x265params crf=20 -c:a copy output.mkv

    and I would get the same result? I'll test it out. please do still reply as I'd like to hear from you and learn more.

    Pandy: Did you mean unnecessary step? Or am I doing it right. Also sounds like your saying I should compile ffmpeg myself with the newest x265 libs?
    Quote Quote  
  5. Originally Posted by madhatr View Post
    I read somewhere that x265 needs to work from raw video and not x264 or vnc1 encoded stuff. Is this no longer the case?(may have been outdated docs) I also thought working with an uncompressed file would give better results. I am new so I don't know a lot about it all yet.

    So you guys are saying I can do
    ffmpeg -i video.m2ts -i audio.dts -c:v libx265 -preset medium -x265params crf=20 -c:a copy output.mkv

    and I would get the same result? I'll test it out. please do still reply as I'd like to hear from you and learn more.

    Pandy: Did you mean unnecessary step? Or am I doing it right. Also sounds like your saying I should compile ffmpeg myself with the newest x265 libs?
    Don't confuse x265.exe ( itself not supporting anything except raw video at the input ) with ffmpeg libx265 - in ffmpeg case it use same x265 but in a form of library and ffmpeg provide raw automatically - also as a alternative you can use ffmpeg piping to x265.exe so raw video will be dynamically produced by ffmpeg for x265.exe.

    So once again raw video is required for x265.exe but it is not required if you use ffmpeg x265 library.
    Quote Quote  
  6. Thanks that makes sense. That will speed things up quite a bit for me.

    I have another question. I noticed when I am all done encoding and use mediainfo to check out the file. It shows me the over all bitrate and the dts tracks bitrate but not an individual bitrate for my video track. When I encoded did everything separately I was able to check the video only file for bitrate, is there a way or a flag to add to ffmpeg to ensure this stat is retained in the info?
    Last edited by madhatr; 12th Dec 2015 at 16:08.
    Quote Quote  
  7. Originally Posted by madhatr View Post
    I have another question. I noticed when I am all done encoding and use mediainfo to check out the file. It shows me the over all bitrate and the dts tracks bitrate but not an individual bitrate for my video track. When I encoded did everything separately I was able to check the video only file for bitrate, is there a way or a flag to add to ffmpeg to ensure this stat is retained in the info?
    I assume you're referring to MKVs? I don't understand the limitation but it's an MKV issue.
    If the audio is variable bitrate you probably won't see any audio bitrate either.

    MKVMergeGUI was given the ability to write tags containing that info somewhat recently, and the latest version of MediaInfo finally knows what they are and displays the bitrate info correctly. I don't think ffmpeg writes the statistic tags.
    Quote Quote  
  8. Member
    Join Date
    Dec 2015
    Location
    Moscow
    Search PM
    Hi
    where i can find command line for ffmpeg 2pass encoding x265 (linux and windows) with some presets like in x264 film and slowest mode. It's create log file in 1st pass like x264? Do you know any guide?
    Find here https://forum.videohelp.com/threads/371616-2pass-encoding-%28ffmpeg-libx265%29
    Last edited by Kvach; 28th Jan 2016 at 16:12.
    Quote Quote  
  9. Originally Posted by Kvach View Post
    Hi
    where i can find command line for ffmpeg 2pass encoding x265 (linux and windows) with some presets like in x264 film and slowest mode. It's create log file in 1st pass like x264? Do you know any guide?
    Find here https://forum.videohelp.com/threads/371616-2pass-encoding-%28ffmpeg-libx265%29
    Few weeks ago ffmpeg (Zeranoe builds tested) x265 parameters was mostly ignored by ffmpeg (not sure why) - only way to create h.265 is pipe from ffmpeg to x265 encoder and then pipe from x265 to ffmpeg (muxing to some container)...
    Quote Quote  
  10. Member
    Join Date
    Dec 2015
    Location
    Moscow
    Search PM
    x265 encoder can get raw video from std in/out console something like ffmpeg bla bla bla | x265 encoder ?
    Quote Quote  
  11. Originally Posted by Kvach View Post
    x265 encoder can get raw video from std in/out console something like ffmpeg bla bla bla | x265 encoder ?

    Yeep, more or less something like this:
    Code:
    @ffmpeg -thread_queue_size 512 -i %1 -an -pix_fmt yuv420p -f yuv4mpegpipe - | x265 --y4m -p preset --crf 20 -t tune --input - --output - | ffmpeg -fflags +genpts -thread_queue_size 512 -i - -c:v copy -f mpegts -shortest -y %1.ts
    Quote Quote  
  12. Member
    Join Date
    Dec 2015
    Location
    Moscow
    Search PM
    Code:
    -f yuv4mpegpipe
    or
    Code:
    -f rawvideo
    what better?
    how x265 get fps and res ? i added manually
    Code:
    --input-res 1920x1080 --fps 29.970
    and
    Code:
    -loglevel quiet
    Quote Quote  
  13. With yuv4mpegpipe all informations are passed automatically and if you insist to set framerate manually then set it correctly: 30000.0/1001.0 - this is huge difference when compared to 29.970.
    Quote Quote  
  14. Member
    Join Date
    Dec 2015
    Location
    Moscow
    Search PM
    --y4m
    this mean i get info from pipe?
    Quote Quote  
  15. Originally Posted by Kvach View Post
    --y4m
    this mean i get info from pipe?
    http://wiki.multimedia.cx/index.php?title=YUV4MPEG2
    Quote Quote  
  16. Member
    Join Date
    Dec 2015
    Location
    Moscow
    Search PM
    pandy
    thanks you so much!!!
    Quote Quote  



Similar Threads

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