Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th May 2010, 00:34   #1  |  Link
apasher17
Registered User
 
Join Date: Nov 2009
Posts: 5
x264 good encoding settings for youtube?

im trying to figure out what bitrate should i use for a 720x480 video to upload on youtube using x264

at first, i used 5000kbps, and the resolution was 640x480 that time. it looked good on my computer, but when i uploaded the video on youtube, it didnt look as good as the original did (found out it was too high)

then i tried lowering the bitrate to 2500kbps, and it was the same thing, except the bitrate was too low instead of too high (thought it was too high at first)

in my next video, i lowered it more to 1250kbps, and the quality just sucked because it was too low (used 720x480 that time)

so what is a good bitrate to use for a 720x480 video?


thanks

Last edited by Guest; 13th May 2010 at 02:15. Reason: 12
apasher17 is offline   Reply With Quote
Old 13th May 2010, 00:44   #2  |  Link
dilpill
Registered User
 
dilpill's Avatar
 
Join Date: Jan 2010
Posts: 4
Just use CRF 18 or don't transcode at all because YouTube recompresses everything anyway.

Keep in mind that you can "cheat" to get higher quality by upscaling the video to its appropriate 720p or 1080p resolution. Normally this is a big no-no because it's pointless, but on YouTube they give higher resolution videos more bitrate.
dilpill is offline   Reply With Quote
Old 13th May 2010, 00:50   #3  |  Link
apasher17
Registered User
 
Join Date: Nov 2009
Posts: 5
Quote:
Originally Posted by dilpill View Post
Just use CRF 18 or don't transcode at all because YouTube recompresses everything anyway.

Keep in mind that you can "cheat" to get higher quality by upscaling the video to its appropriate 720p or 1080p resolution. Normally this is a big no-no because it's pointless, but on YouTube they give higher resolution videos more bitrate.
i didnt transcode
the container was .avi all the way through
apasher17 is offline   Reply With Quote
Old 13th May 2010, 00:56   #4  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
That's not transcoding, apasher, you're thinking of transmuxing. You did transcode because you re-encoded the video. By the way, AVI is a silly container for H.264 - for Youtube, use MP4 instead (MP4 can also contain AAC, which is more efficient than anything you can put in an AVI container without hacks). Also, 720x480 is not, with square pixels, a common resolution. Are you preserving anamorphism in your encode? Does Youtube follow anamorphic flags? If the answer to either of these questions is "No", then you must resize to the correct dimensions given square pixels.
Inspector.Gadget is offline   Reply With Quote
Old 13th May 2010, 01:02   #5  |  Link
apasher17
Registered User
 
Join Date: Nov 2009
Posts: 5
Quote:
Originally Posted by Inspector.Gadget View Post
That's not transcoding, apasher, you're thinking of transmuxing. You did transcode because you re-encoded the video. By the way, AVI is a silly container for H.264 - for Youtube, use MP4 instead (MP4 can also contain AAC, which is more efficient than anything you can put in an AVI container without hacks). Also, 720x480 is not, with square pixels, a common resolution. Are you preserving anamorphism in your encode? Does Youtube follow anamorphic flags? If the answer to either of these questions is "No", then you must resize to the correct dimensions given square pixels.
i cant use MP4 because the capture file for my vids is avi, and i rather not transcode the raw file, i rather keep the format the same. i also cant find any capturing software that captures as MP4
apasher17 is offline   Reply With Quote
Old 13th May 2010, 01:12   #6  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
You're misreading my post. When you re-encode with x264, you can make the container MP4 and if necessary can transcode the audio to AAC. This is regardless of what your camera does, because it all has to pass through Avisynth or at least FFMS anyway.
Inspector.Gadget is offline   Reply With Quote
Old 13th May 2010, 01:20   #7  |  Link
apasher17
Registered User
 
Join Date: Nov 2009
Posts: 5
Quote:
Originally Posted by Inspector.Gadget View Post
You're misreading my post. When you re-encode with x264, you can make the container MP4 and if necessary can transcode the audio to AAC. This is regardless of what your camera does, because it all has to pass through Avisynth or at least FFMS anyway.
oh thanks for the info, but i was just asking what bitrate should i use
apasher17 is offline   Reply With Quote
Old 13th May 2010, 01:44   #8  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
Go right up to whatever the filesize limit on Youtube is. MeGUI's bitrate calculator will tell you what bitrate to use in 2-pass mode to achieve the desired filesize. I believe that stereo audio sources other than some music are almost always transparent at 96kbps with a good AAC encoder (e.g., Nero) in LC mode. So that will save you some bits for the video.
Inspector.Gadget is offline   Reply With Quote
Old 13th May 2010, 01:49   #9  |  Link
video_magic
Registered User
 
Join Date: Jan 2005
Posts: 368
Using X264, for my 720x576 25FPS video (which was sourced from VHS video captures) I am happy with a bitrate of 1200 for the video. I capture the audio as CD quality wave and then encode that to 112kb/s (average) AAC , or 140kb/s (average) MP3.

This is very dependant on the settings chosen for x264, I've tried quite a few different settings and bitrates in the past, before arriving at the above which looks accurate compared to the original capture AVI while giving a relatively very small filesize.

As has been advised to you, I think Youtube 're-encodes' whatever you give it... I think you should search more on this site and the internet for more help.
__________________
Thankyou!, I am grateful for any help
video_magic is offline   Reply With Quote
Old 15th May 2010, 00:12   #10  |  Link
apasher17
Registered User
 
Join Date: Nov 2009
Posts: 5
here is my settup for my videos:
Capture Device: EasyCap USB 2.0 Capture Card
Capture Software: AMcap
Software used to edit/compress: VirtualDub
Codec: x264
apasher17 is offline   Reply With Quote
Old 21st July 2010, 16:26   #11  |  Link
laurentje
Registered User
 
Join Date: Dec 2009
Posts: 16
YouTube says Failed (unable to convert video file)

In the past (2008) I encoded my dv-avi-files with VirtualDub ans with x264vfw-encoder in avi-container. No problem - 100% were encoded by YT.

Because a lot of people on this forum say: we have to use mp4- container, I encode now with Megui and x264 into MP4-files.
I use standard standard parameters for x264. The settings are:
program --tune film --pass 2 --bitrate 3000 --stats ".stats" --output "output" "input"

On the YouTube-site for nearly 90% of my filess all went well in the encoding. But for 10% of my files I get "Failed (unable to convert video file)"

I have done several tests and the results are:
- it is related with specific clips;
- not related with bitrate, framesize, audio
- the specific clips get encoded by YouTube if I use NO-BFRAMES; so I used the following settings in Megui:
program --tune film --pass 2 --bitrate 3000 --stats ".stats" --bframes 0 --output "output" "input"

Any other experience? Other idea?
laurentje is offline   Reply With Quote
Old 23rd July 2010, 00:09   #12  |  Link
Boogerlad
Registered User
 
Join Date: Oct 2009
Posts: 24
h264 in avi is hacky and doesn't work with all players. That's why you might as well convert to h264+aac in mp4 container, cause that's what yt likes.
Boogerlad is offline   Reply With Quote
Old 23rd July 2010, 02:17   #13  |  Link
AlekseiV
Registered User
 
Join Date: Jan 2010
Posts: 92
Quote:
Originally Posted by laurentje View Post
Any other experience? Other idea?
Manually set Level 4.1 @ High with 3 ref and 3 bframes and see if they get encoded.
AlekseiV is offline   Reply With Quote
Old 23rd July 2010, 08:34   #14  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,642
Quote:
Originally Posted by laurentje View Post
On the YouTube-site for nearly 90% of my filess all went well in the encoding. But for 10% of my files I get "Failed (unable to convert video file)"

I have done several tests and the results are:
- it is related with specific clips;
- not related with bitrate, framesize, audio
- the specific clips get encoded by YouTube if I use NO-BFRAMES; so I used the following settings in Megui:
program --tune film --pass 2 --bitrate 3000 --stats ".stats" --bframes 0 --output "output" "input"
It seems that there are currently some issues with x264 and the GPAC MP4 muxer:

http://forum.doom9.org/showthread.php?t=155705
http://forum.doom9.org/showthread.php?t=155797

Things to try:
- Get an x264 build that uses the L-SMASH MP4 muxer
- Output to MKV instead of MP4.
- Output to raw .264 and mux later with a separate tool.
- Use a slightly older x264 build. r1659 was working for Lyle_JP's baseline encodes.
nm is offline   Reply With Quote
Old 23rd July 2010, 12:53   #15  |  Link
Warperus
Registered User
 
Join Date: Apr 2010
Location: Sain-Petersburg, Russia
Posts: 139
Why do you want to encode something in such a harsh way, i.e. low bitrate and playing with quality lowering settings?
General rule for uploading to youtube is simple: keep maximum quality in 2Gb- file size. In other words, use up to 25Mbps encoding without hesitations.
If it is not derivative work just upload your piece without reencoding. If it is result of your edit it might be useful to encode clip directly in NLE to its favorite format wich might be not x264.
Warperus is offline   Reply With Quote
Old 23rd July 2010, 15:37   #16  |  Link
laurentje
Registered User
 
Join Date: Dec 2009
Posts: 16
Warperus:

My raw video is SD dv-avi (720x576 - pal). It is interlaced and 16:9. Is this ok for uploading to YT?
Moreover my uploadspeed is only 40 kB/s, so it takes hours to upload my clips.
3000kbps is not a low bitrate imho for SD and mp4.
laurentje is offline   Reply With Quote
Old 23rd July 2010, 15:45   #17  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,642
Quote:
Originally Posted by laurentje View Post
My raw video is SD dv-avi (720x576 - pal). It is interlaced and 16:9. Is this ok for uploading to YT?
Well, I'd deinterlace it properly first, at least. Encoding with x264 and using a medium bitrate is a good idea when you're bandwidth-impaired.
nm is offline   Reply With Quote
Old 23rd July 2010, 16:14   #18  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,695
1) Open your avi in Ripbot264
2) select CRF@18
3) select .mkv
4) go to properties and deinterlace BFF -> 25 FPS (youtube doesn't support anything above 30 fps)
5) optionally resize to 720x480 (I haven't seen 576p option on youtube yet)
Atak_Snajpera is offline   Reply With Quote
Old 23rd July 2010, 16:16   #19  |  Link
laurentje
Registered User
 
Join Date: Dec 2009
Posts: 16
Quote:
Originally Posted by AlekseiV View Post
Manually set Level 4.1 @ High with 3 ref and 3 bframes and see if they get encoded.
Done this and uploaded. Same result: YT refuse to transcode: "Failed (unable to convert video file)".
Anyway thanks for your suggestion.
laurentje is offline   Reply With Quote
Old 23rd May 2020, 06:31   #20  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 945
Quote:
Originally Posted by Boogerlad View Post
h264 in avi is hacky
I've seen claims like this occasionally, or that x264 is "not well supported" by AVI, or whatever, but I've never seen anyone go into detail. Can anyone explain? I thought the whole idea with container formats was that you could put whatever codecs you wanted in them.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Reply

Tags
bitrate, x264, youtube

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.