I'm using ffmpeg in order to convert MPEG-TS stream to MPEG-DASH. The mpeg-ts is h264 and aac_latm. Therefore I don't need to reencode the video. The command I use:

ffmpeg -i http://10.0.0.211:55555/Ch%2011%20Kan -strict -2 -c:v copy -window_size 10 -extra_window_size 10 -use_template 1 -use_timeline 1 -f dash kan.mpd

I'm copying the video codec by using -c:v copy and the audio codec is default to aac.

That way I get DASH stream BUT the audio/video is out of sync!

How can I fix it?

Notes:

  1. If I reencode both audio and video like:

    ffmpeg -i http://10.0.0.211:55555/Ch%2011%20Kan -strict -2 -window_size 10 -extra_window_size 10 -use_template 1 -use_timeline 1 -f dash kan.mpd

Then the audio/video is synced perfectly. But I do not want to reencode the video for nothing as I mentioned the video is already h264. (directly impact to performance)

  1. If I convert the MPEG-TS stream to mp4 file like:

    ffmpeg -i http://10.0.0.211:55555/Ch%2011%20Kan -strict -2 -c:v copy kan.mp4

Then the audio/video is synced perfectly.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.