So I'm having the most irritating problem with Youtube. No matter what I do, everything I upload is about 1 frame out of sync (specifically the audio is 1 frame late). I'm exporting in h.264 and I've trawled dozens of forums (surprisingly little info on this) and tried everything I can think of:
Using CBR for both the video and the audio.
Changing the audio frequency to match Youtube standard.
Converting with Sorenson Squeeze and Handbrake instead of the Adobe Media Encoder (including using Sorensen's built-in Youtube preset).
Converting using Quicktime and a .mov container.
Re-muxing the audio in Virtualdub and exporting to AVI via direct sream copy, (using a WAV, an mp3, and an audacity-made ACC).
I've also run Mediainfo on my files to check for any offset in milliseconds between the audio and the video, there is none.
In every case I've downloaded the mp4 from Youtube and matched waveforms in Premiere to check (though I can easily tell by ear that it's off), and it's consistently 1 frame out.
My very last resort is to deliberately offset the audio before I export, but I really don't want to do that as I know Youtube periodically re-encodes things and/or changes it's format settings, and if they do something that fixes the problem I'm left with unfixable audio that comes early instead of late.
1 frame might not sound like a big deal... but when you edit for people who play fast music, and everything is multicam synced to beats, it really can be. :S
Any help anyone could give would be GREATLY appreciated.
+ Reply to Thread
Results 1 to 30 of 30
If you're only 1 frame out on your audio-to-video on YouTube, Thank Your Lucky Stars!
I can think of only one possible explanation: YouTube's AAC encoder has become worse than Nero, regarding the audio delay thing
You can try to minimize/eliminate the problem by uploading the *original* UN-compressed audio
( N.B., IF the original audio was lossily-compressed already, then this trick WILL NOT work,
unless you manually remove the encoder audio delay ).
I tried muxing it with a WAV rendered from the timeline... and it was actually more in-sync with the timeline than any of my h.264s (which are all out by 0.5 of a frame anyway, god knows why :S). Youtube still put it a frame out though.
Edit: Basically from the timeline I export to h.264 with ACC audio, which then puts the audio out by +0.5 frames, I then upload to youtube which adds another +1 frame delay, so the total delay is +1.5 frames from the timeline OR I export to h.264 + wav and mux them together which eliminates the 0.5 frame delay then upload to Youtube which adds it's customary + 1 frame delay, so it's still out by 1 frame total.
The fact that compressing to h.264 alone puts it out by +0.5 frames is is a different issue though, unrelated to Youtube (not that I would mind knowing why that happens either. :S)
Also to Kbeee, arf XD I am definitely getting that impression already. :P
Last edited by Locke; 18th Jul 2013 at 16:40.
How about a link to one of your creations ?
I bet that few could distinguish an audio delay of one frame. One second sure. But one frame ?
Most audio codecs I've used add a small delay to the audio.
Lossy audio compression schemes that are based on overlapping time/frequency transforms add a small amount of padding silence to the beginning and end of each track. These silences increase the playtime of the compressed audio data. If not trimmed off upon playback, the two silences played consecutively over a track boundary will appear as a pause in the original audio content. Lossless formats are not prone to this problem.
For some audio formats (e.g. Ogg Vorbis), where the start and end are precisely defined, the padding is implicitly trimmed off in the decoding process. Other formats may require extra metadata for the player to achieve the same. The popular MP3 format defines no way to record the amount of delay or padding for later removal. Also, the encoder delay may vary from encoder to encoder, making automatic removal difficult. Even if two tracks are decompressed and merged into a single track, a pause will usually remain between them.
Ah, so it's an intrinsic part of the compression process for audio, ok. Yah sorry, I didn't realize that, though I was guessing it might be something of that nature. Sorry, I think I misunderstood your point about applications and multiplexing. I did try converting the wav in audacity to various formats, and delay was added just to the audio stream every time, but not much, quite likely as you say just part of the process.
That tiny tiny 0.5 bit of padding I can live with though, it's just Youtube's 1 frame offset that bugs me. :S
There may be no solution... it might just be the best it's gonna get via Youtube, but I dunno, one frame sounds silly but when you're editing something like a music video, you really do work to get it frame perfect for the cuts, especially if it's fast and has a lot of beats... it's subtle but it is noticeable. :S
It does not 'sound' silly. It is silly.
But if you will not refernce to actual samples - maybe original and yt version - then what hope do you have.
http://www.harmonyinautumn.com/Sync/Clube%20do%20Choro%20UK%20Intro%20-%2025%20fps%20Muxed%20WAV.avi Here's the original, in sync file I'm uploading.
http://www.harmonyinautumn.com/Sync/Clube%20do%20Choro%20UK%20-%20Clube%20do%20Choro%2...%20720p%5d.mp4 And here's the downloaded MP4.
To my un-trained ear and dodgy eyes, I could not detect any issues. It is also quite a short sample so might not be the best to compare.
I am a little concerned about the original vid with an odd interleave pattern >> 1.2 frames and a preload of 500 ms. These might be confusing the yt converter
compressor may go:
And just for a comparison, a MediaInfo about one of my typical Youtube uploads:
Complete name : W:\YouTube\OKs\kisarah-vs-king.avi Format : AVI Format/Info : Audio Video Interleave File size : 67.7 MiB Duration : 2mn 23s Overall bit rate : 3 951 Kbps Writing library : VirtualDub build 32842/release Video ID : 0 Format : VC-1 Codec ID : WMV3 Codec ID/Info : Windows Media Video 9 Codec ID/Hint : WMV3 Duration : 2mn 23s Bit rate : 2 527 Kbps Width : 640 pixels Height : 480 pixels Display aspect ratio : 4:3 Frame rate : 30.000 fps Bit depth : 8 bits Compression mode : Lossy Bits/(Pixel*Frame) : 0.274 Stream size : 43.3 MiB (64%) Audio ID : 1 Format : PCM Format settings, Endianness : Little Format settings, Sign : Signed Codec ID : 1 Duration : 2mn 23s Bit rate mode : Constant Bit rate : 1 411.2 Kbps Channel(s) : 2 channels Sampling rate : 44.1 KHz Bit depth : 16 bits Stream size : 24.2 MiB (36%) Interleave, duration : 33 ms (1.00 video frame) Interleave, preload duration : 500 ms
I will try the MKV thing - many thanks. Is there any way to alter the interleave pattern and preload? I'm afraid that's beyond my technical knowledge. :S
Also thanks for the ideas thus far.
I tried that, even with 1 frame selected, it was interleaving every 45ms (1.12 frames), so I forced it to interleave every 40ms, and still no difference until I removed the preload as well... but still the same effect from Youtube.
I may be clutching at straws here but when I ran the original vid through mediainfo it was reported as NTSC despite 25 fps. Now we all know that NTSC is 30 fps (rounded up) so if you are attempting a conversion from NTSC to PAL you could end up with this odd interleave where the .2 of the frame is an attempt at a correction from 30 fps down to 25 fps.
The original source is Brazil ? Yes. That is neither pure NTSC or pure PAL. So I just wonder if that is where the problem lies.
The stuff I'm filming is Brazilian music, but that intro was made from scratch by me, so there was no conversion anywhere in the workflow. =( That being said... I have no idea why it's reporting it as NTSC. o.O I made it in AE with the HDV 720/25fps setting. I tried the MKV thing as well, and even that made no difference... what the hell Youtube. xD
Just another wild guess (and actually a not so minor possibility), YouTube may have designed itself for being picky against "H264 in AVI" Technically there is NOTHING wrong with H264-in-AVI, but considering Google and YouTube are programmed mainly by Linux trolls (but I'm serious, I mean it).
I did check the waveforms, I uploaded the MKV, downloaded it again, did likewise with the AVI and... exactly the same, not even 1/2 frame of difference, unfortunately. They are both offset from the original file by exactly 1 frame.
Edit: Wait a second... where did you get the 1.75 frames out figure from? Aah ok, I think we have the same offset in our MKVs, but for some reason you got a larger offset in your AVI test, that's really weird.
El Heggunte - Also possible, but I did many many tests with MP4s before I tried the AVI. =( I read somewhere else that VBR audio was a likely candidate, so I tried with CBR video + CBR audio and still no joy.
Last edited by Locke; 19th Jul 2013 at 19:13.
The 1.75 is a calculation from your YT video ; 70ms/40ms per frame = 1.75 frames - that was an approximation just looking at the audio waveform in audacity . I'm looking at the difference between the beginning of the waveform compared to the original's waveform . e.g. if the original waveform starts at 0.25 seconds, and your youtube version starts at 0.32 seconds, the difference is 0.07seconds, or 70ms.
Different decoders might compensate slightly (e.g. it might be a few ms different in flash, vs . premiere, vs. audacity vs. some other program or media player) , but there is definitely a difference, and the relative trend will still be there (ie YT version slightly worse the the re-wrapped MKV YT version)
Here is the file I re-wrapped (I used an older mkvmerge version v5.4, but I doubt it makes a difference - I have no idea why you're getting different results, but you can find old versions here https://www.videohelp.com/tools/MKVtoolnix/old-versions#download )
Here is the MKV rewrapped download from YT (using IDM)
"1 - YouTube.mp4"
Same trend in premiere
track 1 is your YT version or "Clube do Choro UK - Clube do Choro UK Intro 25 fps wav [H.264 720p].mp4"
track 2 is the MKV rewrapped YT download or "1 - YouTube.mp4"
track 3 is the original or "Clube do Choro UK Intro - 25 fps Muxed WAV.avi"
Last edited by poisondeathray; 19th Jul 2013 at 19:55.
Ah yes ok I see the same thing now.
This is a newer AVI exported from Virtualdub and then downloaded from Youtube - I've managed to get my AVI files to also eliminate the extra. Everything is +/1 one frame now, is why I was confused for a bit.
It's definitely closer.
I really appreciate your efforts on this. =)
That very last frame of delay... I'm beginning to think it is an unavoidable part of Youtube's conversion process at this point.
- The vast majority of viewers are not sensitive to video out-of-sync with audio if it's just 1 frame (just over 30ms)
- Out-of-sync starts to get bothersome for most once it gets above 4 or 5 frames worth (>100ms)
- Viewers who are gluttons for punishment can actually withstand >10frames delay (>300ms) before they get antsy
- There can indeed be out-of-sync situations on some clips or portions of the whole edited program, but IMHO they are not worth making a fuss over if they occur on such parts like credits at the end of the program, incidental music accompanying a clip, etc.
- not using a close-up video clip with its corresponding audio at that point, especially if it involves talking or singing, leaving the audio in place on the NLE but replacing the clip with another related video (of long shots, audience reactions shots, background shots)
- using music or other effects in place of the original audio at the out-of-sync point
Last edited by turk690; 20th Jul 2013 at 00:54.For the nth time, with the possible exception of certain Intel processors, I don't have/ever owned anything whose name starts with "i".