[FFmpeg-user] ffmpeg how to set stream layout

Francois Visagie francois.visagie at gmail.com
Tue Jul 23 11:57:15 CEST 2013


> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of Soho Soho123
> Sent: 16 July 2013 07:24
> To: FFmpeg user questions and RTFMs
> Subject: [FFmpeg-user] ffmpeg how to set stream layout
> 
> Hi All,
> 
> I use ffmpeg command to generate audio and video stream.
> ffmpeg -loglevel debug -f video4linux2 -r 30 -s 640x480 -input_format h264
> -i /dev/video1 -f alsa -ar 44100 -ac 2 -i hw:0 -vcodec copy -acodec copy
> http://localhost:8090/feed1.ffm
> 
> I got the stream layout :
>  Stream #0:0, 0, 1/1000000: Audio: pcm_s16be, 44100 Hz, stereo, 1411 kb/s
>     Stream #0:1, 0, 1/1000000: Video: h264, yuv420p, 640x480, 1/30,
q=2-31,
> -5 kb/s, 30 fps, 1000k tbn, 30 tbc
> 
> Can I modify the layout to
> Stream 0 is video , and stream 1 is audio?

Yes, use the -map option to enumerate streams in the order you want them to
appear in the output.

Cheers,
Francois

> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list