1

Please help save my college application! I'm uploading videos to a school admissions website, which is converting them into lower quality files. These converted files for some reason have an audio skew (the audio becomes ~100ms too early which ruins the videos).

Is a way to pre-process my videos so that the audio skew won't happen when I upload? Any help here would be greatly appreciated, I don't know much about audio/video specifically aside from googling the basics.

Unfortunately I don't know the exact command the website is running (my guess is ffmpeg), but I used ffprobe on the original and converted files and this is the result:

ORIGINAL

    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 320 kb/s (default)
    Stream #0:1(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 17982 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)

CONVERTED

    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 160 kb/s (default)
    Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 720x404 [SAR 404:405 DAR 16:9], 1002 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)

The audio changes from 48khz to 44.1khz, and gets a lower kb/s.

The video changes from 59.94fps to 29.97fps, and gets a lower resolution.

I pasted the output of ffprobe -show_streams into these gists: original and converted.

Thanks, please help save my college application!

  • Add the results of ffprobe file -show_streams for both files. – Gyan Dec 28 '17 at 06:11
  • @Mulvya thanks, i added those in my edit. looks like start_pts, start_time, duration_ts, duration, and nb_frames are all different. – Heinrich Schmetterling Dec 28 '17 at 06:46
  • 1
    Does the skew happen from the beginning? The difference in audio start times accounts for 23 ms, not counting the AAC priming sample. – Gyan Dec 28 '17 at 07:21
  • @Mulvya Yeah, the skew is there from the beginning. How did you compute 23ms? – Heinrich Schmetterling Dec 28 '17 at 07:54
  • 1
    The converted file has a difference of 46ms in start times between V and A. That's two audio frames, one of which will be a priming frame and doesn't represent audio data. – Gyan Dec 28 '17 at 08:35
  • https://superuser.com/questions/982342/in-ffmpeg-how-to-delay-only-the-audio-of-a-mp4-video-without-converting-the-au – dirkt Dec 28 '17 at 08:50
  • The OP can try to rewrap with an offset, as per the link above, but I don't think they're seeing a delay locally in the original file. To the OP, upload to Youtube and check if audio delay is seen there. – Gyan Dec 28 '17 at 09:15
  • @Mulvya I'm not sure why but I repeated the process and now the converted files have start_time = 0 for both the audio and video. I think what may be happening is that my original files have a video start time of 0.016683, and this is being ignored by the converter so it's shifting the audio to be too early. Is there a way to re-encode my files so that the start time for video and audio is exactly 0? – Heinrich Schmetterling Dec 28 '17 at 22:13

0 Answers0