Swap video and audio streams in mp4 container

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
scislot
New Cone
New Cone
Posts: 2
Joined: 27 Mar 2012 09:40

Swap video and audio streams in mp4 container

Postby scislot » 27 Mar 2012 09:52

Hi,

I spent a long hours searching for the answer to the question how to swap the video and audio streams in output mp4 container. Currently using this command

vlc -vvv input.mp4 --sout='#transcode{vcodec=h264,venc=x264{profile=baseline,level=3.0,nocabac,nobframes,ref=1},deinterlace,vb=1560,scale=1,aspect=4:3,padd=true,vfilter=canvas{width=1024,height=768},acodec=mp4a,ab=128,channels=2,samplerate=44100}:file{dst="output.mp4"}'

I always get such a result that Audio stream is a stream 0 and Video stream is stream 1. In source file Video is stream 0 and Audio is stream 1. Is there a possibility to have the output file with the same stream order?

Kind regards,
ToM

Lotesdelere
Cone Master
Cone Master
Posts: 9975
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Swap video and audio streams in mp4 container

Postby Lotesdelere » 28 Mar 2012 09:05

I'm not sure you can choose the streams order with VLC. Your best bet is to use a dedicated tool such as MP4Box.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 28 guests