Thread: ffmpeg syntax
View Single Post
Old 25th July 2011, 15:45   #1  |  Link
galfwender
Registered User
 
Join Date: May 2007
Posts: 9
ffmpeg syntax

Hi,

I am trying to use ffmpeg to remux a transport stream into a mkv with only the video track, and a separate ac3.

I can't find the correct syntax, it always assumes the mkv must have an audio track. I have tried -an to disable audio processing in the mkv and then -newaudio to create the new ac3, and also tried manual mapping of tracks, but can't find any combination that works.

Can anyone help?

ffmpeg -i input.ts -vcodec copy video.mkv -acodec copy audio.ac3 - this produces a mkv with both audio and video and a separate ac3

ffmpeg -i input.ts -vcodec copy -an video.mkv -acodec copy audio.ac3 - this will not make the audio as audio has been disabled globally

ffmpeg -i input.ts -vcodec copy -an video.mkv -acodec copy audio.ac3 -newaudio - this does the same as example 1

ffmpeg -i input.ts -vcodec copy video.mkv -acodec copy audio.ac3 -map 0.0 -map 0.1 - this complains that number of stream maps does not match number of output streams as it is assuming the mkv has two streams
galfwender is offline   Reply With Quote