We have produced a series of exercise videos with voiced instructions. Audio (separately recorded) and video have been put together using ffmpeg.
In some cases, the voiceover is longer than the video of the exercise, and in these cases the ffmpeg command used is:
ffmpeg -loglevel $FFMPEG_LOG_LEVEL -i $VID_FILE -i $AUD_FILE -filter_complex "aevalsrc=0:d=$AUD_SHIFT[s1];[s1][1:a]concat=n=2:v=0:a=1[aout]" -c:v copy -map 0:v -map [aout] $FILE_OUT -hide_banner -nostdin
Which displays the final frame of the video until the audio is finished.
The resulting mp4 plays acceptably in various settings (QuickTime Player, VLC). But when uploaded to YouTube, these videos fail to process (ones which have not been extended are fine) - they stick at '95% processed' - and so cannot be accessed through the YouTube player.
I have tried re-encoding using:
ffmpeg -i vidfile.mp4 -c:v libx264 -map_metadata -1 -c:a aac -strict experimental -b:a 192k out.mp4
- hoping that stripping metadata might be the answer, but without any change in YouTube's response.
I have noticed that in the VLC player, the progress indicator on the timeline displayed below the video stops moving at the point when the video is complete, while the audio continues. Also, I notice that the duration reported by YouTube on the failed videos is shorter that the actual playback time. These two facts suggest that YouTube fails because it is being sent a short video with some instruction to hold the final frame while the audio track plays out - rather than a full length video with a repeated video frame at the end.
Suggestions please - either for fixing the original command, or for re-processing the problem files in retrospect.
If you want to look at an actual file, here's a dropbox link.