VideoHelp Forum
+ Reply to Thread
Results 1 to 30 of 30
Thread
  1. Hi. Can anyone tell me whether these command arguments are fine as they are, or can I modify them to get the absolute possible maximum in quality? I'm using x264_64.exe and qaac.exe

    --crf 19 --preset medium --level 5.1 --keyint 24 --tune film --min-keyint 1 --bluray-compat --b-pyramid none --demuxer raw --input-csp i420 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -

    --tvbr 91 -q 2 --threading -i -o "%(tempaudiofile)" -
    Quote Quote  
  2. Using '--level 5.1' and '--bluray-compat' together makes no sense.
    Quote Quote  
  3. Originally Posted by video.baba View Post
    Using '--level 5.1' and '--bluray-compat' together makes no sense.
    Don't tell me, I didn't write them.
    Quote Quote  
  4. Originally Posted by Bruce Banner View Post
    Originally Posted by video.baba View Post
    Using '--level 5.1' and '--bluray-compat' together makes no sense.
    Don't tell me, I didn't write them.
    It can be mistake - BD will not support anything higher than HP@L4.1 and some older decoders are unable even go higher than HP@L4.0 - it is wise to stay within HP@L4.0 IMHO.
    Quote Quote  
  5. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Can anyone tell me whether these command arguments are fine as they are
    Don't tell me, I didn't write them.
    Tell me, don't tell me. Why do you ask then?
    Last edited by Bernix; 28th Nov 2017 at 07:05.
    Quote Quote  
  6. Originally Posted by pandy View Post
    Originally Posted by Bruce Banner View Post
    Originally Posted by video.baba View Post
    Using '--level 5.1' and '--bluray-compat' together makes no sense.
    Don't tell me, I didn't write them.
    It can be mistake - BD will not support anything higher than HP@L4.1 and some older decoders are unable even go higher than HP@L4.0 - it is wise to stay within HP@L4.0 IMHO.
    Oh I'm not worried about BD compliance but thanks anyway.
    Quote Quote  
  7. Originally Posted by Bernix View Post
    Can anyone tell me whether these command arguments are fine as they are
    Don't tell me, I didn't write them.
    Tell me, don't tell me. Why do you ask then?
    I have no idea what any of those arguments mean. I just copied and pasted them. They came with a vdprof I downloaded. I just want to know if they're already set for maximum quality or if I should make changes to them.
    Quote Quote  
  8. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Never mind. Lowering CRF you get better quality. And keyint is suggested to be about 10xfps, min-keyint is usually equal to fps. Setting you posted for keyint is probably better, but if you want play your file on standalone players, not just on PC, check if is it capable of level 5.1. Most probably not.
    Last edited by Bernix; 28th Nov 2017 at 14:53. Reason: level already mentioned by Pandy
    Quote Quote  
  9. Originally Posted by Bernix View Post
    Never mind. Lowering CRF you get better quality. And keyint is suggested to be about 10xfps, min-keyint is usually equal to fps. Setting you posted for keyint is probably better, but if you want play your file on standalone players, not just on PC, check if is it capable of level 5.1. Most probably not.
    After a little bit of research and some trial and error, I think I'm happy leaving CRF where it is. Would you recommend I try changing the keyint and minimum keyint values or just leave them as they are? If level 5.1 is a bit high, what number would be better? Is x264_64.exe fine or would x264_8bpp.exe be better? And what about my audio settings? Anything about those I should think about changing?
    Quote Quote  
  10. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Sorry I'm not familiar with Virtualdub x264 settings, but I don't see some key feature in command line, that have great impact on quality. For example subme good is 9, me method umh reference frames 8 b-frames 3 and others. You can try maybe different GUI, that has all this features graphically displayed and adjusted by sliders and drop down menus.
    Can you post mediainfo text form of your files, that you created? No need to know name, just settings of x264 encoder + probably audio?
    Bernix
    Quote Quote  
  11. Like pandy said, level 5.1 is unnecessarily high. 4.0 is usually enough.
    Code:
    --crf 19 --preset medium --tune film --level 4.0 --vbv-maxrate 25000 --vbv-bufsize 25000 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -
    You can set --keyint if you want faster seeking but don't need to. (default is 250, 120 is a good compromise between compression and seeking speed)

    About x264 binary:
    - 64 bit is faster so recommended if you have 64 bit OS
    - 8bpp has highest compatibility and is usually preferred.
    It is not either 64 bit or 8 bit but they are about different things. Builds usually are either:
    64 bit + 8 bit (<- recommended for most people)
    64 bit + 10 bit
    32 bit + 8 bit
    32 bit + 10 bit


    Originally Posted by Bernix View Post
    Sorry I'm not familiar with Virtualdub x264 settings, but I don't see some key feature in command line, that have great impact on quality. For example subme good is 9, me method umh reference frames 8 b-frames 3 and others. You can try maybe different GUI, that has all this features graphically displayed and adjusted by sliders and drop down menus.
    That's what the presets are for. It is highly disrecommended to set subme, bframes etc. manually. There is a high chance you end up shooting yourself in the foot.



    At the end of the day there is no "ultimate setting to end all settings" or like you said "to get the absolute possible maximum in quality". It's all about disk space, encoding time and compatibility with your player(s). Always a compromise.
    Quote Quote  
  12. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    I think with P=8 B=3 and me=umh and subme=9 can't hurt's me
    But I agree I forgot medium preset. That is right. Probably slow or slower could be better then.
    Last edited by Bernix; 28th Nov 2017 at 16:15.
    Quote Quote  
  13. "P=8"? I don't know what that is supposed to mean.

    About me, sumbe and bframe settings: high ones don't "hurt" in that they produce bad quality. But you may waste too much CPU time on them. Time that could be better spend on other settings. The presets have been created to be roughly optimal positions on the speed-compression curve based on testing by the x264 developers.
    Quote Quote  
  14. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    I mean of course reference frames.
    Quote Quote  
  15. Code:
    --crf 19 --preset medium --tune film --level 4.0 --vbv-maxrate 25000 --vbv-bufsize 25000 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -
    Originally Posted by Bruce Banner View Post
    If level 5.1 is a bit high, what number would be better??
    you can just delete that level setting, x264 sets it automatically, depending on buffers, resolution and frame rate
    Quote Quote  
  16. Originally Posted by Bernix View Post
    Sorry I'm not familiar with Virtualdub x264 settings, but I don't see some key feature in command line, that have great impact on quality. For example subme good is 9, me method umh reference frames 8 b-frames 3 and others. You can try maybe different GUI, that has all this features graphically displayed and adjusted by sliders and drop down menus.
    Can you post mediainfo text form of your files, that you created? No need to know name, just settings of x264 encoder + probably audio?
    Bernix
    As an experiment, I switched to the AVC (Film) (8bit) encoder set that came with either the last vdprof I installed or VirtualDub FilterMod. I forget which. The command arguments are

    -y -f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -f mp4 -c:v libx264 -crf 18 -preset Medium -tune Film "%(tempvideofile)"

    and

    --tvbr 91 -q 2 --threading -i -o "%(tempaudiofile)" -

    I think the audio arguments are the same as in my first post.

    Here's the MediaInfo for the test clip I created.

    General
    Complete name : C:\Users\Bruce\Desktop\test.mp4
    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom (isom/iso2/avc1/mp41)
    File size : 6.18 MiB
    Duration : 5s 14ms
    Overall bit rate : 10.3 Mbps
    Writing application : Lavf56.33.101

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4
    Format settings, CABAC : Yes
    Format settings, ReFrames : 4 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 4s 964ms
    Bit rate : 10.4 Mbps
    Width : 1 904 pixels
    Height : 1 072 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 23.976 (23976/1000) fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.212
    Stream size : 6.13 MiB (99%)
    Writing library : x264 core 146 r2538 121396c
    Encoding settings : cabac=1 / ref=3 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 5s 14ms
    Bit rate mode : Constant
    Bit rate : 86.6 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Frame rate : 46.875 fps (1024 spf)
    Compression mode : Lossy
    Stream size : 53.0 KiB (1%)
    Default : Yes
    Alternate group : 1
    Quote Quote  
  17. Originally Posted by sneaker View Post
    Like pandy said, level 5.1 is unnecessarily high. 4.0 is usually enough.
    Code:
    --crf 19 --preset medium --tune film --level 4.0 --vbv-maxrate 25000 --vbv-bufsize 25000 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -
    You can set --keyint if you want faster seeking but don't need to. (default is 250, 120 is a good compromise between compression and seeking speed)

    About x264 binary:
    - 64 bit is faster so recommended if you have 64 bit OS
    - 8bpp has highest compatibility and is usually preferred.
    It is not either 64 bit or 8 bit but they are about different things. Builds usually are either:
    64 bit + 8 bit (<- recommended for most people)
    64 bit + 10 bit
    32 bit + 8 bit
    32 bit + 10 bit


    Originally Posted by Bernix View Post
    Sorry I'm not familiar with Virtualdub x264 settings, but I don't see some key feature in command line, that have great impact on quality. For example subme good is 9, me method umh reference frames 8 b-frames 3 and others. You can try maybe different GUI, that has all this features graphically displayed and adjusted by sliders and drop down menus.
    That's what the presets are for. It is highly disrecommended to set subme, bframes etc. manually. There is a high chance you end up shooting yourself in the foot.



    At the end of the day there is no "ultimate setting to end all settings" or like you said "to get the absolute possible maximum in quality". It's all about disk space, encoding time and compatibility with your player(s). Always a compromise.
    Yeah, the clip I just created using the AVC (Film) (8bit) encoder set automatically set the level at 4.

    I think I'll just leave keyint alone.

    I assumed the encoder set I just used used x264 8 bit, but apparently it uses ffmpeg instead. I think maybe because the vdprof I'm using didn't come with an 8 bit exe, only with a 10.

    If there's always a compromise, I may just leave it there then and forget about it. Too many other things to do than worry about perfection when there isn't any. Thanks for your help.
    Quote Quote  
  18. Originally Posted by _Al_ View Post
    Code:
    --crf 19 --preset medium --tune film --level 4.0 --vbv-maxrate 25000 --vbv-bufsize 25000 --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o "%(tempvideofile)" -
    Originally Posted by Bruce Banner View Post
    If level 5.1 is a bit high, what number would be better??
    you can just delete that level setting, x264 sets it automatically, depending on buffers, resolution and frame rate
    Thanks.
    Quote Quote  
  19. encode H264 with 8bit only because 10 bit is only for PC and you wnat that video to be played anywhere
    but HEVC for example is a different story, it looks like 10 bit is widely acceptable in hardware devices, so for example I use only "64bit x265 10 bit.exe"

    if video size is quite important to be as small as possible for some reason, you just select reasonable crf 19 or 18, as you did , and for particular sections you can boost bitrate a bit. So after encoding you watch it,then encoding it again using zones, for example from 20000 to 23000 frame and from 40000 to 42000 frame, crf 16 overrides original CRF 19, just in those parts:
    Code:
    --crf 19 --preset medium --tune film --zones 20000,23000,crf=16/40000,42000,crf=16  --vbv-maxrate 25000 --vbv-bufsize 25000
    This is the only "sane" way how to tackle encoding, their vast differences depending on video situations, to come up with just one remedy setting for the whole long video seems like a nonsense, if you try to be really particular in saving bitrate.
    Quote Quote  
  20. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi,
    if you notice some audio difference original vs encoded, you can try set it higher to --tvbr 100. But qaac is very good encoder, so probably you will have no problem with default settings, even 87kbps isn't too much. Depends on your source.
    87 kbps is very small bitrate in terms when you put it higher for example on 112 then final filesize of video+audio you don't noticed it. So audio isn't place to save bitrate. Other higher possibilities for --tvbr are 109, 118 and 127.
    Or you should be able to copy audio, without recompression, but don't know if is this possible in VD. But of course you can do this later, when video and audio is encoded.
    Last edited by Bernix; 29th Nov 2017 at 09:51.
    Quote Quote  
  21. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    The presets have been created to be roughly optimal positions on the speed-compression curve based on testing by the x264 developers.
    Funny thing about presets using same CRF fastest preset you suppose biggest filesize with fastest encoding but same quality as slowest. But what you get, is fastest preset smallest file, slowest preset biggest file. And because of speed is equal to presets name, so quality isn't same.
    By this I mean -> excepting same quality at given CRF with different presets, but it is apparently not what you get. Therefore presets are somehow weird and complicated in meaning what usual user except from them. And this is fastest biggest file, slowest smaller file.
    Bernix
    Quote Quote  
  22. Originally Posted by Bernix View Post
    Funny thing about presets using same CRF fastest preset you suppose biggest filesize with fastest encoding but same quality as slowest.
    Well, you aren't. As you say it's a common misconception.

    That said, typically you will not find file size for constant CRF monotonically increasing as you go from fastest to slowest preset. Rather file size will decrease from preset "veryfast" to "veryslow"/"placebo". "ultrafast" and "superfast" often don't seem to fit the curve and that is mainly because they do not use mbtree which greatly changes the way CRF works.
    Quote Quote  
  23. Originally Posted by _Al_ View Post
    encode H264 with 8bit only because 10 bit is only for PC and you wnat that video to be played anywhere
    but HEVC for example is a different story, it looks like 10 bit is widely acceptable in hardware devices, so for example I use only "64bit x265 10 bit.exe"

    if video size is quite important to be as small as possible for some reason, you just select reasonable crf 19 or 18, as you did , and for particular sections you can boost bitrate a bit. So after encoding you watch it,then encoding it again using zones, for example from 20000 to 23000 frame and from 40000 to 42000 frame, crf 16 overrides original CRF 19, just in those parts:
    Code:
    --crf 19 --preset medium --tune film --zones 20000,23000,crf=16/40000,42000,crf=16  --vbv-maxrate 25000 --vbv-bufsize 25000
    This is the only "sane" way how to tackle encoding, their vast differences depending on video situations, to come up with just one remedy setting for the whole long video seems like a nonsense, if you try to be really particular in saving bitrate.
    I'm gonna stick with 8 bit. I know 10 bit gives better quality and x265 gives smaller file size but compatibility is actually a higher priority for me than even quality. Playing the video anywhere.

    But I do think quality is more important than file size. So thanks for the info about boosting bitrate in certain zones but I have plenty of disk space and I only make short videos anyway.
    Quote Quote  
  24. yes, crf to make sure , forget

    but anyway, I looked into x265 documentation, and concerning zones, only q or b seams to be acceptable for bitrate override, but not crf (like in x264) ,so for example: 40000,42000,q=30 or 40000,42000,b=2 (2xbitrate)
    Quote Quote  
  25. Originally Posted by Bernix View Post
    Hi,
    if you notice some audio difference original vs encoded, you can try set it higher to --tvbr 100. But qaac is very good encoder, so probably you will have no problem with default settings, even 87kbps isn't too much. Depends on your source.
    87 kbps is very small bitrate in terms when you put it higher for example on 112 then final filesize of video+audio you don't noticed it. So audio isn't place to save bitrate. Other higher possibilities for --tvbr are 109, 118 and 127.
    Or you should be able to copy audio, without recompression, but don't know if is this possible in VD. But of course you can do this later, when video and audio is encoded.
    Thanks. I'll experiment with those higher tvbrs.
    Quote Quote  
  26. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Here is what I mean. I do not used Superfast and Ultrafast. But all others are in graph.
    Do you see what I mean?
    Presets Very Fast, Faster and Fast. Then presets Medium, Slow, Slower. And finaly Very Slow and Placebo. I would except It will be other way round in file size.
    Image
    [Attachment 43865 - Click to enlarge]

    Bernix
    Quote Quote  
  27. Yeah, it's not true for every source.
    Quote Quote  
  28. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    I'm afraid it is. BTW source file was 3min long 50fps progressive. But I will not continue in this. If not for all, so for 99% of videos it will be same. If anyone proved me that is wrong or send me file which behaves in logic faster bigger, I will be very happy.

    Bernix
    Quote Quote  
  29. Take away extremes and you are pretty much fine, this is CRF, that's priority, also speed by selecting preset. This is not exact ideal math algorithm science , but a magic with variables to keep the quality about the same, in a sense not to break it visibly too much, and also choosing encoding speed. Encoding is a patching up system that was tuned up as much as developer is capable of, size is not a priority using CRF. There is too many variables and they could be disabled, enabled at a point or make no sense from a certain point. You want something going faster or slower you must switch something on or off. It is a radical change, not gradual, it must show up somewhere.
    Quote Quote  
  30. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Therefore I said use CRF and at least 6 refframes subme9 and me method to umh. This is most powerful things in x264 from my POV. Or use Very Fast presets, as mentioned _AL_, there is not big difference in resulting video, but very fast is fastest and smallest file size.
    In fact, there is difference even on I frames, but hardly noticeable.
    VFvsMedium
    Image
    [Attachment 43871 - Click to enlarge]

    VFvsPlacebo
    Image
    [Attachment 43872 - Click to enlarge]

    It is not noticeable difference but when you equalize it you will see it. But it is without motion, just I frames comparison. I suggest at least try Very fast preset. Smallest file at maximum speed is guaranteed at given CRF.
    Quote Quote  



Similar Threads

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