Fraps to YouTube with H.264

De-M-oN

Well-Known Member
H.264 shouldnt be put in AVI. x264 is good, but I highly recommend to use the cli variant.

Usable cli GUIs would be MeGUI, Handbrake etc. I recommend MeGUI though.

Xdar said:
CRF for youtube is the worst thing you can do.
Not really. But I would be interested to see a statement to this - why you think so.

dont use such fast presets. theyre also a slight influence in quality at crf mode. dont go faster than medium. And dont checkmark fast decode or zero latency. you dont need that, youtube recompresses anyway.

Q11: What'st the difference between VFW and CLI?
A: VFW is Video For Windows, an ancient tech created by microsoft (copying some stuff from quicktime), full of quirks and not able to support modern codecs. x264VFW is a ugly hack to make x264 work (more or less) with VFW, hence softwares like virtualdub and its modifications. The use of x264VFW is NOT recommended. x264 VFW is no longer officially supported.
CLI is a general term that means Command Line Interface. The classic console (command prompt) command which is generic and has no limitations like VFW.
Q19: Can i use VirtualDub or any other VFW based editor to encode with x264?
A: Yes, using a x264 VFW build but VFW is so obsolete and limited x264VFW is no longer mantained by the x264 devs and because VFW and AVI are not properly able to handle h.264 features without some "hacking" that could compromise compatibility, playback and/or editing.
The thing about applying the same hacks as was used in ASP is that ASP is bad enough to do that to, but H.264's featureset is much more expansive in regard to B-frames, the B-pyramid, etc. Using said hacks to put H.264 in AVI often isn't sufficient enough to ensure that the audio remains synced, in the case of numerous B-frames and especially the B-pyramid. The only way around it is to disable those features, but that results in benefit being lost. It'll still perform well, but not as well as it could have.
 

raffriff

Moderator
Staff member
Site Contributor
Re: fast presets, I do this for a reason, as independently confirmed by @billman [here]. As I have said elsewhere recently, YouTube likes simple, easy-to-decode sources: high bitrate and low complexity. I like to encode quickly, but more importantly, "veryfast" does things (--no-mixed-refs, --rc-lookahead 10, --ref 1, --subme 2, --trellis 0, --weightp 1) that seem to work well with YouTube. Yes, the file size is significantly larger.

Whatever is said about x264vfw (and it would be nice if you linked to your sources), it works. I do recommend Handbrake & MeGui as well, and have also written a lot about VirtualDub with x264 and other CLI encoders.
 

De-M-oN

Well-Known Member
it may work mostly. but h.264 in avi isnt recommended at all. also the x264vfw uses outdated x264 as far as I know.

In which way you think Youtube likes the fast presets more? Do they encode faster? If you say better quality - then no. I have to deny then here.

Source for the quotes:

http://forum.doom9.org/showthread.php?p=696689#post696689

post #4.

The third quote I cant find the source post now. But if I remember correctly it was at doom9 forum too.

doom9 is a forum with experts in videocoding. There are also avisynth devs and even x264 devs.
 

billman

Well-Known Member
Site Contributor
I have only been doing this a short time, but I can provide an example of how I encoded my latest video


vegas setting 1080 24mbit.jpg

I have seen better quality videos than mine but this has been good enough for me.
This video is just shy of 6 mins and the upload was 860 MB @ 20Mbit

Its one thing to know the theory but only practice and experimentation will show you the best methods depending on the results you want.
For me clarity of small fonts are more important than a perfect frame during high motion.

If I had limitless bandwidth I would use MP2 as both render and re-encoder are much faster and less lossy but only at extreme bit rates.
To compare I have also rendered in Mp2 the difference in fame quality was negligible but rendered in half the time and blew out to 2.5GB @ 60 Mbit

So for archival storage H.264 takes the cake but MPEG-2 (aka H.222/H.262) much better as source material.
Just because something is newer does not mean its better.
 

De-M-oN

Well-Known Member
Re: fast presets, I do this for a reason, as independently confirmed by @billman [here]. As I have said elsewhere recently, YouTube likes simple, easy-to-decode sources: high bitrate and low complexity. I like to encode quickly, but more importantly, "veryfast" does things (--no-mixed-refs, --rc-lookahead 10, --ref 1, --subme 2, --trellis 0, --weightp 1) that seem to work well with YouTube. Yes, the file size is significantly larger.
If this would be a dependence, they would've to use other encode setting on such material. But they do exactly the same encoding like if you encode it to preset placebo.
It doesnt make it better quality at all. Rather due to less loss in quality a slower preset is an advantage.

And that a lossless uploaded source has an advantage shouldnt make you wonder. of course lossless -> lossy is better than lossy to lossy.

MPEG 2 wont do better quality on youtube as well. And H.264 also dont has less quality than mpeg 2.

Where do you get all these theories from?
 

Thalmor Wizard

Moderator
Staff member
Site Contributor
Where do you get all these theories from?
We do extensive research with FRAPS and video editors to find optimal settings. We also search through other posts by professional video editors. You are basing most of your information on what works for people using other software, rather than looking at it from our side of the story (aka Fraps).
 

De-M-oN

Well-Known Member
Fraps or DXTory doesnt matter. Both use lossless compression. So we both have same material later.

ResampleHQ filter mentioned 601 for youtube, yes. But if its 709 I can change it of course.

And beside of that we have the same lossless coded material.

And this is in no relation to what I've written in my prev. post.

Even if my recording software would produce a lossy source it wouldnt change whats written in my prev. post.
 

billman

Well-Known Member
Site Contributor
MPEG 2 wont do better quality on youtube as well. And H.264 also don't has less quality than mpeg 2.

Where do you get all these theories from?
HAHAHAHAHAHAHAH sorry but I have to laugh.

Bulk Video encoding, if you have ever tried to process hundreds of hours of footage on shitty old computers you would understand that less complex algorithms produce better results when you don't want wait 4 hours to process 1 hour of footage. (not everyone has 4+ GHz CPU to spend encoding/decoding.)

IMO MP4 is shit, it requires way too much decoder time compared to existing codecs.'
You will probably try to tell me MP3/AAC is superior to WAV (Redbook) too.

Sure when you compare Frame Size/Bitrate MP4 is better on paper, but when you allow for high bitrate MP2 is much nicer to work with.

Sorry many but you have been reading way too much, you should go experiment with different codecs more.
 

De-M-oN

Well-Known Member
I didnt got in your post, that you want to work with a very slow computer and you do it because of performance reasons.

But somewhere was mentioned the youtube quality gets better if you upload faster decompressable video - and that has no technical logic at all how said. If this would be of a dependence, they would have to use other encoding settings on such material - and they dont do that at all.
Of course: If you upload lossless video to youtube - of course this has an advantage then. lossless to lossy is always better than lossy to lossy. But then its due to that and not because fraps video is faster decompressable^^

You can control the speed of H.264 though. If you have an older pc - just use a very fast x264 preset and for editing especially: shorter GOP lengths!. Then an older pc is greatly helped out.

You will probably try to tell me MP3/AAC is superior to WAV (Redbook) too.
Why I should?
 

billman

Well-Known Member
Site Contributor
I didnt got in your post, that you want to work with a very slow computer and you do it because of performance reasons.
You asked where I get my theories from, its from doing batch converts of anime into a common format on tragic old computers. I discovered that there was a balance between encoding speed and quality at source different bit rates.
The higher source the bitrate the faster I could transcode and maintain quality.
So my theory is that to allow for so many videos to be rendered at once there must be a compromise of some sort.
They don't change the settings per video but if your video is heavily compressed required more CPU time to maintain quality than can be done on such a global scale. So if you send them footage that requires less CPU time to decode your more likely to get results closer to the original file. The true best format to send to YouTube is RAW footage but I cant afford 4GB per minute of footage. So the next best thing I have tried is MP2 but at 1920x1080@30 FPS is only about half to a third smaller than FRAPS output. Hence we come to MP4 with a huge array of different compression methods most of which are superb if you want to archive the footage and have lots of CPU time to decode but when your trying to transcode on a mass scale you simple cannot spend the amount of time decoding that your PC or even DVD/Bluray player will spend during playback.

I am aware of the speed presets of when encoding in MP4 at one point I was transcoding fraps output on the fly and extended my recoding hours but the resulting output was painful to edit compared to fraps footage and spent much more time and effort to edit the footage, so in the end I went back to using fraps footage directly and just added more HDD space.

So the technical logic is HDD space is Cheap CPU processing time is not. YouTube is a free service there for they take the cheap option. As and end user that means we must upload super high bitrate low complexity video to keep the quality of the original.
 

De-M-oN

Well-Known Member
They don't change the settings per video but if your video is heavily compressed required more CPU time to maintain quality than can be done on such a global scale. So if you send them footage that requires less CPU time to decode your more likely to get results closer to the original file.
No you dont. This would be only possible by using other encode settings on their side. They dont do it.

The true best format to send to YouTube is RAW footage
correct, but thats because its lossless to lossy conversion then instead of compression a lossy video again lossy. Not because of the complexity.

So the next best thing I have tried is MP2 but at 1920x1080@30 FPS
For best results at youtube use 3200x1800 and 25fps and a little bit motion blur.
All quality levels are better this way (especially darkness)

And 25fps because - lets take their 1920x1080 quality level. It is at average bitrate around 4000 kbit

4000 kbit shared on 25 fps
vs
4000 kbit shared on 30fps.
which one will have better looking frames? ;) you got it.


This one I posted often now. This one is even at 30fps, but with 3200x1800 as source. And you'll see it looks fine. And it was compressed with x264 @ preset slow with CRF at 18.
And it looks not that bad at 1080p as well - especially as an arma 3 video - because the source was 3200x1800.
native 1920x1080 would end up much worse. and we tested the exactly same material.

With your theory the x264 preset placebo should look at youtube like complete garbage with its insane complexity to decode. But placebo didnt make things worse at all.

your argument with very old computer is of course ok, but mpeg 2 wont improve quality at youtube, neither does an ultrafast preset.
 
Im not an expert but actually the best rendering video for me is rendering in Sony Vegas is :
MainConcept AVC/AAC with high profile,
Audio : 192 Kbits/s; 48 000 Hz; 16 Bit; Stereo; AAC
Vidoo : 29,970 ips; 1920 x 1080 Progressif; YUV; 50 Mbits/s
Sadly when you upload it to youtube it will be recompressed and you lost the quality unless you recorded with fraps at 1440p like this one:
I've tried many settings in 1080p but i think it's impossible to have the same result, the source must be un 1440p because YT use a better bitrate with 1440p videos.
If you have a suggestion for 1080...
 

Thalmor Wizard

Moderator
Staff member
Site Contributor
You can try upscaling your video to 2560x1440 to trigger 1440p (which is what several YT'ers do to get around the bitrate caps, like what RealVisionHD did: recording at 1440p with ENB mods is impossible), but high movement videos tend to be bad for YouTube in general so reducing movement and other noise in the final video is recommended.
 
With upscaling to 1440p do i will lose quality? I mean if i upscale and i lose quality then upload to YT then re lose quality, the result will be better than just uploading a 1080p video?
Anyway thanks for your reply.
 

De-M-oN

Well-Known Member
Use a soft scaler like Spline16 or 100 and the video is more compressable. This helps the low bitrates of youtube.

I recommend 3200x1800 if doable for you. It has even more bitrate than 1440 (a lot more) and the lower quality levels suffer a little bit less loss as well. Especially darkness will remain better.
 
Use a soft scaler like Spline16 or 100 and the video is more compressable. This helps the low bitrates of youtube.

I recommend 3200x1800 if doable for you. It has even more bitrate than 1440 (a lot more) and the lower quality levels suffer a little bit less loss as well. Especially darkness will remain better.
Wait a sec i'm really a neophyte with that but i learn fast, do you suggest me to upscale my video to 3200x1800 :eek: i've tried to find the soft scaler you said but i can't find anyhting about it.
I have a really good comp so i'm sure i can do it but i don't exactly understand the method, can you be a little more accurate?
 

De-M-oN

Well-Known Member
use avisynth for the scaling.

And you should use at least 256 kbit for audio, since youtube uses 256 kbit at HD resolutions it makes sense to make use of it.

fps: 25 (less frames need to share the bitrate)
resolution: 3200x1800 (better coded quality levels available, plus less loss on lower levels.
Use ingame offered motion blur to help compression
Scaling via Spline16, even better 100, but 100 you need the SplineResize.dll first from here: http://www.wilbertdijkhof.com/SplineResize_v02.zip
 
I cannot simply render the file with Sony Vegas at 3200x1800 with a huge bitrate or i need to upscale with avysynth/virtualdub and spline? I've tried but virtualdub doesn't take my MP4 video rendered with Sony Vegas :(
To be clear, i can't record with fraps with a better resolution than 1080p, my comp could handle it but not my monitor.
 

Thalmor Wizard

Moderator
Staff member
Site Contributor
@De-M-oN:
fps: 25 (less frames need to share the bitrate)
Don't use 25fps. There is no reason to use it any more. (youtube supports 48fps and 60fps already anyway). At least use between 30-50fps if you can't manage 60fps.
Use ingame offered motion blur to help compression
Don't use motion blur, it's terrible on YouTube. Even small amounts cause problems.
@QualQuek:
With upscaling to 1440p do i will lose quality? I mean if i upscale and i lose quality then upload to YT then re lose quality, the result will be better than just uploading a 1080p video?
No, you won't lose quality, rather it will be gained, as the available bitrate will be higher for those who select 1440p. There is a post around the forums (I think it was posted by @RobiePAX) that indicates that if you upscale to a specific resolution between 1080p and 1440p that causes the bitrate of 1080p to go up to 6000kbps. Whether that was fixed or not, I'm not sure.
 

RobiePAX

Well-Known Member
Site Contributor
With upscaling to 1440p do i will lose quality? I mean if i upscale and i lose quality then upload to YT then re lose quality, the result will be better than just uploading a 1080p video?
Anyway thanks for your reply.
You will not lose video quality if you upscale the video from 1080p to 1440p. The video may become very slightly blurrier, but barely that nobody would notice it (you can add tiny "sharpness" to reverse that blurriness).

You don't have to actually record at 1440p. You are not aiming to further improve quality by recording at higher quality, why? Because 1080p already looks fantastic, YouTube simply ruins it. Not to mention performance demand between 1080p and 1440p is huge. You are simply aiming to modify your 1080p version to force YouTube to stream it at better original quality.
There is a post around the forums (I think it was posted by @RobiePAX) that indicates that if you upscale to a specific resolution between 1080p and 1440p that causes the bitrate of 1080p to go up to 6000kbps.
Indeed it has the same effect as upscaling to 1440p. But instead of creating and adding 1440p stream option, it will improve the 1080p stream only.
 
Top