[FFmpeg-user] split audio/video and merge later gets async
s1445051 at mail.zih.tu-dresden.de
Mon Sep 2 11:24:41 CEST 2013
> First see if specifying [,sync_file_id[:stream_specifier]] with the
> '-map' options helps:
> http://www.ffmpeg.org/ffmpeg-all.html#Advanced-options. Try both the
> original audio and video stream for the sync stream and see which
> works best.
Thanks for the quick reply.
I tried both:
$ ffmpeg -i grab.mkv -i grab-aud.wav -map 0:0 -map 1:0,0:1 -c copy
$ ffmpeg -i grab.mkv -i grab-aud.wav -map 0:0 -map 1:0,0:0 -c copy
but it didn't help. It's still async. I didn't notice any difference.
I just noticed now that the splitted audio is about 4 seconds shorter
than the video stream. Not sure how that happened. The recorded file
grab.mkv is completely fine and directly compressing it with libx264
and libfdk-aac is also fine.
I probably have to resample the audio and stretch it. But i'm not sure
what's the right way to do it. This one didn't work:
$ ffmpeg -i grab.mkv -i grab-aud.wav -map 0:0 -map 1:0,0:1 -af
'aresample=async=10' -c:v copy -c:a pcm_s16le merge.mkv
Any other ideas?
More information about the ffmpeg-user