View Full Version : YouTube upload problem
lucassp
30th March 2011, 07:35
Hi guys,
I have a problem uploading a x264 encoded file to youtube. Here are the video's details:
* * * MediaInfo Mac 0.7.36.0 file analysis report.
* * * MediaInfo Mac is Đ2010 by Diego Massanti - http://mediainfo.massanti.com
* * * MediaInfoLib by Jerome Martinez - http://mediainfo.sourceforge.net
Created on: Mar 30, 2011 9:29:56 AM GMT+03:00
Report for file: EETC2011_Marilyn_Adams_H264.m4v
General / Container Stream #1
Total Video Streams for this File.................1
Total Audio Streams for this File.................1
Video Codecs Used.................................AVC
Audio Codecs Used.................................AAC LC
File Format.......................................MPEG-4
Play Time.........................................1h 5mn
Total File Size...................................2.92 GiB
Total Stream BitRate..............................6 332 Kbps
Encoded with......................................HandBrake 0.9.5 2011010300
Video Stream #1
Codec (Human Name)................................AVC
Codec (FourCC)....................................avc1
Codec Profile.....................................High@L3.1
Frame Width.......................................1 280 pixels
Frame Height......................................720 pixels
Frame Rate........................................29.970 fps
Total Frames......................................118579
Display Aspect Ratio..............................16:9
Scan Type.........................................Progressive
Color Space.......................................YUV
Codec Settings (Summary)..........................CABAC / 4 Ref Frames
QF (like Gordian Knot)............................0.224
Codec Settings (CABAC)............................Yes
Codec Settings (Reference Frames).................4
Video Stream Length...............................1h 5mn 55s 666ms
Video Stream BitRate..............................6 196 Kbps
Video Stream BitRate Mode.........................VBR
Bit Depth.........................................8 bits
Video Stream Size.................................2.85 GiB (98%)
Video Encoder.....................................x264 - core 112
Video Encoder (Settings)..........................cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=29 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=6196 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Date of Original Encoding.........................UTC 2011-03-25 09:22:53
Color Primaries...................................BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer Characteristics..........................BT.709-5, BT.1361
Matrix Coefficients...............................BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
Audio Stream #1
Codec.............................................AAC
Codec (FourCC)....................................40
Audio Stream Length...............................1h 5mn 55s 754ms
Audio Stream BitRate..............................129 Kbps
Audio Stream BitRate Mode.........................VBR
Number of Audio Channels..........................2
Audio Channel's Positions.........................Front: L R
Sampling Rate.....................................48.0 KHz
Audio Stream Size.................................60.8 MiB (2%)
Audio Stream Language.............................English
Date of Original Encoding.........................UTC 2011-03-25 09:22:53
The problem is that the uploaded video is 1:31 long and playback is broken. I encoded the video using the latest Handbrake with the "optimize for streaming" box checked.
Does anyone have a clue what's wrong?
Thank you!
PS: http://www.youtube.com/user/waterfordinst#p/a/u/0/EQfIJgtviK0 if it helps!
sneaker_ger
30th March 2011, 07:53
Try using "mkv" as the container, people have reported that container to work better in conjunction with youtube.
lucassp
31st March 2011, 08:48
After many many hours of trying to upload the mkv file, I finally succeeded. The YouTube video now has 3 seconds:mad: I converted from mp4 to mkv using mkvtoolnix.
* * * MediaInfo Mac 0.7.36.0 file analysis report.
* * * MediaInfo Mac is Đ2010 by Diego Massanti - http://mediainfo.massanti.com
* * * MediaInfoLib by Jerome Martinez - http://mediainfo.sourceforge.net
Created on: Mar 31, 2011 10:52:41 AM GMT+03:00
Report for file: EETC2011_Marilyn_Adams_H264.mkv
General / Container Stream #1
Total Video Streams for this File.................1
Total Audio Streams for this File.................1
Video Codecs Used.................................AVC
Audio Codecs Used.................................AAC LC
File Format.......................................Matroska
Play Time.........................................1h 5mn
Total File Size...................................2.91 GiB
Total Stream BitRate..............................6 329 Kbps
Encoded with......................................mkvmerge v4.6.0 ('Still Crazy After All These Years') built on Mar 23 2011 16:58:35
Encoding Library..................................libebml v1.2.0 + libmatroska v1.1.0
Video Stream #1
Codec (Human Name)................................AVC
Codec (FourCC)....................................V_MPEG4/ISO/AVC
Codec Profile.....................................High@L3.1
Frame Width.......................................1 280 pixels
Frame Height......................................720 pixels
Frame Rate........................................30.000 fps
Total Frames......................................118673
Display Aspect Ratio..............................16:9
Scan Type.........................................Progressive
Color Space.......................................YUV
Codec Settings (Summary)..........................CABAC / 4 Ref Frames
QF (like Gordian Knot)............................0.224
Codec Settings (CABAC)............................Yes
Codec Settings (Reference Frames).................4
Video Stream Length...............................1h 5mn 55s 767ms
Video Stream BitRate (Nominal)....................6 196 Kbps
Bit Depth.........................................8 bits
Video Encoder.....................................x264 - core 112
Video Encoder (Settings)..........................cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=29 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=6196 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Color Primaries...................................BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer Characteristics..........................BT.709-5, BT.1361
Matrix Coefficients...............................BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
Audio Stream #1
Codec.............................................AAC
Codec (FourCC)....................................A_AAC
Audio Stream Length...............................1h 5mn 55s 754ms
Number of Audio Channels..........................2
Audio Channel's Positions.........................Front: L R
Sampling Rate.....................................48.0 KHz
Audio Stream Language.............................English
sneaker_ger
31st March 2011, 09:14
Did you deactivate header removal compression in mkvmerge GUI? I don't know whether youtube supports it or not. Go into options and tick "Disable header removal compression for audio and video tracks by default". Then restart mkvmerge GUI and mux the file again.
lucassp
31st March 2011, 09:23
Another difference I spotted between the mp4file and the mkv file:
MP4
Frame Rate........................................29.970 fps
Total Frames......................................118579
MKV
Frame Rate........................................30.000 fps
Total Frames......................................118673
sneaker_ger
31st March 2011, 10:42
You can force "30000/1001" as the fps in the track tab of mkvmerge GUI if you think that it's wrong. But it simply copies the timecodes of the source file so sync should be OK either way.
But the number of frames shouldn't change IMHO. Something's wrong.
lucassp
31st March 2011, 12:54
Checking that boxed worked. The video was encoded by YouTube. But now there's a delay between the video and audio...It seems like progressive delay. But if just go the minute ą40 the delay is smaller. It's driving me crazy!
http://www.youtube.com/watch?v=BbxnA3L-5SQ
Thanks!
PS: The delay was introduced by forcing 30000/1001. I will upload again :(
sneaker_ger
31st March 2011, 14:13
Yes, normally you don't have to touch the fps as mkvmerge just copies the timecodes from the mp4 file.
PhrostByte
8th April 2011, 17:28
I've had Youtube problems with x264 encodes too. I eventually just started encoding to Baseline profile which seemed to solve everything, though it would be nice to find out exactly what setting is triggering it.
lucassp
12th April 2011, 08:14
If the YouTube Advanced Uploader would be more stable I wouldn't have bothered to encode the video with these aggressive settings. But since the Advanced Uploader was crashing a lot, and my video file was 1h5min, I had to make it a lot smaller.
I have problems uploading a video (1920x1080) too, it was encoded with "x264 --preset veryslow --crf 8" and flac audio, muxed to mkv. First uploading worked, but playing the video on youtube was not possible, I could see just a a few frames after seeking and no audio at all. Thought it could be the header compression feature in mkv, deactivated it and uploaded again -> Unable to convert video.
What options are needed to get a youtube compatible video out of x264?
ganymede
12th April 2011, 10:58
I've had Youtube problems with x264 encodes too. I eventually just started encoding to Baseline profile which seemed to solve everything, though it would be nice to find out exactly what setting is triggering it.I tried different settings with '--profile high', but youtube was unable to encode video produced like this, or sometimes to display it (video was reported as "processed" but youtube displayed only solid grey).
Finally, it worked for me with '--profile main --level 3.0 --weightp 0 --crf 18 --tune film --preset veryslow' on a 848x480 progressive clip, in an mp4 container.
sneaker_ger
12th April 2011, 11:11
I went out of my way to test it myself, encoded a 1920x1080 video with x264 1924 (--preset veryslow --crf 8 --fps 24000/1001), encoded the audio using eac3to to flac and muxed with mkvmerge 4.6.0 (header compression disabled) - the video plays perfectly on youtube.
General
Unique ID : 181460847078796707592016322839119040815 (0x888416816B8657D8A92DE2331A8A912F)
Complete name : inc3_flac.mkv
Format : Matroska
File size : 436 MiB
Duration : 2mn 21s
Overall bit rate : 25.9 Mbps
Encoded date : UTC 2011-04-12 09:51:49
Writing application : mkvmerge v4.6.0 ('Still Crazy After All These Years') built on Mar 10 2011 02:50:32
Writing library : libebml v1.2.0 + libmatroska v1.1.0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 2mn 21s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 114 r1924+495 ccd7045
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / fade_compensate=0.00 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / fgo=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=8.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
Audio
ID : 2
Format : FLAC
Format/Info : Free Lossless Audio Codec
Codec ID : A_FLAC
Duration : 2mn 21s
Bit rate mode : Variable
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Bit depth : 16 bits
Writing library : libFLAC 1.2.1 (UTC 2007-09-17)
Thats my file (does not work):
Format : Matroska
File size : 1.14 GiB
Duration : 2mn 53s
Overall bit rate : 56.4 Mbps
Encoded date : UTC 2011-04-11 13:06:57
Writing application : mkvmerge v4.5.0 ('Speed of Light') gebaut am
Feb 1 2011 02:10:32
Writing library : libebml v1.2.0 + libmatroska v1.1.0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 2mn 53s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 114 r1924 08d04a4
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x
3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=
24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1
/ chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / inter
laced=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 /
direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / sc
enecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=8.0 / qc
omp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE R
P177
Audio
ID : 2
Format : FLAC
Format/Info : Free Lossless Audio Codec
Codec ID : A_FLAC
Duration : 2mn 53s
Bit rate mode : Variable
Channel(s) : 2 channels
Sampling rate : 96.0 KHz
Bit depth : 24 bits
Writing library : libFLAC 1.2.1 (UTC 2007-09-17)
Language : English
It does not work. I tested also with 16bit/48khz flac, no difference.
sneaker_ger
12th April 2011, 13:07
Are you sure header compression is turned off?
You have to untick the option before opening a file in mkvmerge GUI for it to work, not after. You can check with mkvinfo (or newer versions of media info).
The only other difference I could think of is the framerate. I already forced a constant framerate with x264, so try --fps 25 or --fps 24000/1001, to see if that could be the source of the problem. Or maybe youtube is just very picky.
I selected "Compression: none" for all tracks, isnīt that the correct option? I also tried old mkvtoolnix (2.9.5), doesnīt work either. Without selecting "Compression: none", Youtube accepts the file, but conversion wonīt work correctly. Framerate is constant at 25, but I didnīt set any option in x264. Is the framerate stored in a H.264 header somewhere?
sneaker_ger
12th April 2011, 13:32
I selected "Compression: none" for all tracks, isnīt that the correct option?
Yes, that's the correct option. You can tick "Disable header removal compression for audio and video tracks by default" in mkvmerge GUI's options if you don't want to set that manually for every file and every track.
I also tried old mkvtoolnix (2.9.5), doesnīt work either. Without selecting "Compression: none", Youtube accepts the file, but conversion wonīt work correctly. Framerate is constant at 25, but I didnīt set any option in x264. Is the framerate stored in a H.264 header somewhere?
It should be stored somewhere in the headers, but I don't know the technical details myself.
I will attempt to upload a 25 fps file without forced fps - currently encoding.
It should be stored somewhere in the headers, but I don't know the technical details myself.
I will attempt to upload a 25 fps file without forced fps - currently encoding.Thank you very much!
sneaker_ger
12th April 2011, 14:40
Ok, youtube finished converting: the 25 fps file (without forcing fps) also works. I don't know what's wrong with yours.
Maybe the overall bitrate is too high? Problems with some tags (Colorspace, Language)? Am I just too stupid?
I upload the video file (Advanced or Standard uploader donīt matter), then it says Processing... , Processing completed and nothing happens (no preview pictures). When open "My Videos" it says "Could not convert video".
ganymede
12th April 2011, 18:19
I tried several variations of High@L5.1, with differents CRF / bitrates, different audio formats (AAC and flac), different containers (mkv, mp4)... It worked once with a small sample (less than 10 seconds, with flac audio in an mkv container) but never with a "real" clip (5min 55s), even with the same settings that worked for the sample... :confused: Youtube is either unable to process it, or unable to display it. I'll have to stick to Main@L3.0 without weighted prediction. :(
EDIT : I had better success with --profile main --level 3.1 --weightp 1, on my 5min 55s clip.
I just saw YouTube supports up to 20GB files with "Advanced uploader", so Iīm now creating a lossless H.264 file, hopefully file is not getting bigger.
Iīve tested with a 5 seconds sample and it worked. I uploaded H.264 lossless before, but not HD or just static content, never a file >1GB.
Funny thing is that YouTube does not reject the file with header compression enabled, it just canīt process it correctly. Maybe there is something in the header YouTube doesnīt like that it cannot see with header compression...
sneaker_ger
12th April 2011, 19:12
For the record: I'm didn't use any "advanced uploader", just the web site.
Iīve tried both, could not find any difference in supported formats. Itīs just the way the files are transferred to YouTube (AJAX vs. Java). You can use advanced uploader directly within the website, itīs just a java applet. The only visible difference is the file selection dialog.
Edit:
I finished encoding the hole video again and Iīm now uploading it. I can already see the preview frames, so Iīm confident that itīs working this time. Command-line used (not very special):
x264-992 -q 0 --colorprim bt709 --transfer bt709 --colormatrix bt709
(Itīs x264 rev. 992, the last one with now deprecated lossless mode). Audio is FLAC 24Bit/96kHz, muxed to mkv without header compression.
Edit 2:
Video is uploaded and works perfectly. Also the lossless file is less than 3 times bigger than the --crf 8 file! If you want to upload a high quality video there is no reason not to use lossless (except you care that uploading will take 3 times longer)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.