1

I recorded about 20 MP4 clips: most on my Android phone with the stock camera, a couple from Facebook (downloaded from the mobile web view), and one from a Zoom session. I cropped or scaled and padded the FB and Zoom clips with ffmpeg to match the clips from my phone (vertical 1080p). I trimmed all the clips in the Mac QuickTime player, which exported .m4v. I then combined the clips into a single video with the QuickTime player, which saved .mov.

The .mov video looks and sounds as it should throughout. However, when I upload the .mov video to YouTube

the result has two audio problems:

  • The audio in the clips immediately before the Zoom clip and one of the FB clips is lowered in pitch. The preceding, distorted clips start at 1:08:18 and 41:01 respectively.
  • The audio in the Zoom clip is really distorted, almost gone, partway through, at 1:11:21.

(The clip at 6:18 doesn't seem to have been distorted by the clip from FB which follows it. The FB clip that doesn't cause the problem is from the FB Live Android app; I think the one that does is from the Acapella app, but I didn't make it so I'm not sure.)

The problems are much worse in the Zoom clip and the clip that precedes it, which are the second- and third-to-last clips in the video, so I worked around the problem by posting a video including only the last 3 clips. The audio in that video is fine throughout!?!

How can I adjust my clips so that YouTube preserves the audio in the full-length video?

Side note: I found that converting the .mov video to .mp4 with a recent ffmpeg snapshot causes the exact same problems in the result, so, if we knew what to do to get a good result with ffmpeg, that might fix the problem on YouTube.

1

The problem was that different clips had different frame rates. My phone records a variable frame rate around 30 fps, the Zoom video had a fixed frame rate of 25 fps, the FB live video was variable around 30 fps and the Acapella-via-FB video was fixed 30 fps. I fixed the problem by reencoding all clips to a fixed frame rate of 30 fps with ffmpeg -r 30. (I also set a minimum audio bitrate of 96 kb/s, the bitrate of most of the original footage, with -b:v 96k. ffmpeg defaulted to an audio bitrate of 69 kb/s.)

The QuickTime player refused to concatenate the frame-rate-adjusted clips, so I concatenated the clips in batches of 32 with ffmpeg's concat filter and then concatenated the result of that with ffmpeg's more efficient concat demuxer. (Concatenating in one pass with ffmpeg's concat demuxer dropped the audio entirely from some scenes; I didn't take the time to figure out why.) I was able to combine frame rate adjustment and batch concatenation into one ffmpeg command, i.e. one reencoding step.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.