2
1
I'm having trouble encoding a video for YouTube. The content isn't very "compression-friendly" (it's Battlefield 4 gameplay footage), but I'm 100% positive the results could be better. Some links:
- The same frame extracted from the source and from the video processed by YouTube: http://imgur.com/a/AwXTv
- The source MP4: https://mega.co.nz/#!Z990iCDD!QHpW3h6ZnEy3tlhsCYAEnGGpoY4d4N9ImgdPdlWLwdE
- The video itself: http://youtu.be/0b8ollYsQU8
- A random clip of a guy playing on the same map (compare to 1080p version of it, of course): http://youtu.be/R4Nz2dBZRQY
The command I use to invoke the encoder:
ffmpeg.exe -i %INPUT%.avs -c:v libx264 -profile high -g 15 -keyint_min 15 -coder 1 ^
-preset slow -bf 2 -subq 9 -crf 18 -c:a libvorbis -pix_fmt yuv420p %OUTPUT%.mp4
I've tried many different configurations:
- http://youtu.be/T9CH4ypbI_I
- http://youtu.be/eFkHGi_kj7U
- http://youtu.be/D7nZFQHWNuw
- http://youtu.be/emzQhiMHxxE
But none seem to make things any different. Even raw unmodified footage, recorded with ShadowPlay, looks bad: http://youtu.be/bLR-QavrpGU. Maybe I should give some other encoder a try? Or use another container? I've picked my options according to YouTube's official guide: https://support.google.com/youtube/answer/1722171
I'm all out of ideas now. Any hint would be much appreciated.
P.S. I do realize, that the frame I'm referencing is any encoder's nightmare, but why is it SO bad? And why does it affect the whole picture, not just the most hard parts of it?
EDIT: I've tried encoding with fixed bitrate (two-pass):
- 1080p 8000k ~11mb
- 1080p 50000k ~72mb
- 1440p 50000k ~70mb (this isn't a typo, it's less than 1080p)
The album with the screenshots has been updated. 50m seems to be a little bit better than all the others (sharper edges, recognizable HUD elements, like the red tank icon on a tree to the left of the jeep; except the downscaled 1440p, of course, but it's out of the competition), but this still isn't even close to what it's supposed to be.
1The videos don't look to bad to me either. Not perfect, but more than acceptable. I'd definitely suggest not to do a constant bitrate encoding since it will hurt the parts where there's a lot of action. Perhaps adding a sharpening filter could help – but compared to the clip of the other guy, the "raw unmodified footage" looks really nice. – slhck – 2013-11-25T06:25:43.243
Okay, now that I've re-watched some of the videos, they do seem to be alright in motion (though, gotta hate how all the text is becoming blurry in less than a dozen frames from each keyframe). I know that crf is preferred, but I was trying out every possible option. The excessive/redundant parameters were put in due to severe desperation, not by intent :) Some colorspace has to be set, so why not the recommended one. And you are right about the audio. In the end, I think I'll go with crf 18, no need to waste any more time on this :) Thanks for the help. – Olegs Jeremejevs – 2013-11-25T17:43:16.993
Come on, why edit, that was a fun little offtopic you had there :) – Olegs Jeremejevs – 2014-01-24T18:32:18.293
1@OlegsJeremejevs It's now an "easter egg". – llogan – 2014-01-24T19:19:17.250