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)" -
+ Reply to Thread
Results 1 to 30 of 30
-
-
-
Can anyone tell me whether these command arguments are fine as they areDon't tell me, I didn't write them.
Last edited by Bernix; 28th Nov 2017 at 06:05.
-
-
-
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 13:53. Reason: level already mentioned by Pandy
-
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?
-
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 -
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)" -
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
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. -
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 15:15.
-
"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. -
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)" -
-
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 -
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. -
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
-
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 08:51.
-
The presets have been created to be roughly optimal positions on the speed-compression curve based on testing by the x264 developers.
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 -
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. -
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. -
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) -
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.
[Attachment 43865 - Click to enlarge]
Bernix -
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 -
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.
-
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
[Attachment 43871 - Click to enlarge]
VFvsPlacebo
[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.
Similar Threads
-
When converting video to MP4 what is the standard audio format?
By moviegeek71 in forum MacReplies: 1Last Post: 19th Nov 2016, 10:56 -
VirtualDub - Batch Convert - MP4 To Uncompressed Video With No Audio
By TheRandomOne in forum Video ConversionReplies: 5Last Post: 26th Nov 2015, 02:28 -
DVB-T Captured Video+Audio converting Problem with VirtualDub
By szlobizoli in forum Video ConversionReplies: 7Last Post: 26th Sep 2015, 13:24 -
Capture webcam audio & video stream to MP4 with VirtualDub
By zamar27 in forum Capturing and VCRReplies: 2Last Post: 20th Mar 2015, 19:54 -
fixing audio sync without changing the video/audio quality of mp4 video
By aruwin in forum AudioReplies: 3Last Post: 7th Aug 2014, 23:10