[FFmpeg-user] [HELP] ffmpeg "-map" option question

Francois Visagie francois.visagie at gmail.com
Tue Aug 6 15:10:54 CEST 2013


> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of Soho Soho123
> Sent: 06 August 2013 13:04
> To: FFmpeg user questions and RTFMs
> Subject: [FFmpeg-user] [HELP] ffmpeg "-map" option question
> 
> Hi All,
> 
> 
> I use the git head version to verification ttest.
> When I add "-map" option to specify the stream id that I want.
> But it seems does not work.
> I can not modify stream index that I want.
> does anyone have ideas?

I haven't tried it, but as a work-around what about omitting the '-map'
options and specifying your input files in reverse order?

> 
> the stream mapping is always:
> 
> Stream mapping:
>   Stream #1:0 -> #0:0 (copy)
>   Stream #0:0 -> #0:1 (copy)
> 
> 
> I can not modify the order for output stream.
> 
> 
> 
> the log delow:
> 
> ffmpeg -loglevel debug -f video4linux2 -r 30 -s 640x480 -input_format h264
-i
> /dev/video1 -f alsa -ar 48000 -ac 2 -i hw:0 -map 0:0 -map 1:0 -vcodec copy
-
> acod ec copy http://localhost:8090/feed1.ffm ffmpeg version N-55257-
> g84bc317 Copyright (c) 2000-2013 the FFmpeg developers
>   built on Aug  6 2013 17:52:35 with gcc 4.4.5-1.5.5p4 (GCC)
>   configuration: --enable-cross-compile --cross-prefix=sdk-linux-
--arch=mips
> --target-os=linux --disable-doc --disable-htmlpages --disable-manpages --
> disable-podpages --disable-txtpages --disable-mips32r2 --disable-ffprobe
--
> disable-ffplay --disable-postproc --disable-runtime-cpudetect --disable-
> swscale-alpha --disable-mipsdspr1
> --disable-mipsdspr2 --disable-mipsfpu --enable-small --
> prefix=ffmpeg_head/romfs --bindir=/ffmpeg_head/romfs --disable-bsfs --
> disable-filters --enable-gpl --enable-libfaac --enable-nonfree
> --enable-libx264 --extra-cflags=-I/ShareLib_Install/bin/../include
> --extra-libs='-L/ShareLib_Install/bin/../lib -lx264'
> --enable-filter='aformat,aresample,anull,copy,format,fps,  libavutil 52.
40.100
> / 52. 40.100
>   libavcodec     55. 20.100 / 55. 20.100
>   libavformat    55. 13.102 / 55. 13.102
>   libavdevice    55.  3.100 / 55.  3.100
>   libavfilter     3. 82.100 /  3. 82.100
>   libswscale      2.  4.100 /  2.  4.100
>   libswresample   0. 17.103 /  0. 17.103
> Splitting the commandline.
> Reading option '-loglevel' ... matched as option 'loglevel' (set logging
> level) with argument 'debug'.
> Reading option '-f' ... matched as option 'f' (force format) with argument
> 'video4linux2'.
> Reading option '-r' ... matched as option 'r' (set frame rate (Hz value,
fraction
> or abbreviation)) with argument '30'.
> Reading option '-s' ... matched as option 's' (set frame size (WxH or
> abbreviation)) with argument '640x480'.
> Reading option '-input_format' ... matched as AVOption 'input_format' with
> argument 'h264'.
> Reading option '-i' ... matched as input file with argument '/dev/video1'.
> Reading option '-f' ... matched as option 'f' (force format) with argument
> 'alsa'.
> Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz))
> with argument '48000'.
> Reading option '-ac' ... matched as option 'ac' (set number of audio
> channels) with argument '2'.
> Reading option '-i' ... matched as input file with argument 'hw:0'.
> Reading option '-map' ... matched as option 'map' (set input stream
> mapping) with argument '0:0'.
> Reading option '-map' ... matched as option 'map' (set input stream
> mapping) with argument '1:0'.
> Reading option '-vcodec' ... matched as option 'vcodec' (force video codec
> ('copy' to copy stream)) with argument 'copy'.
> Reading option '-acodec' ... matched as option 'acodec' (force audio codec
> ('copy' to copy stream)) with argument 'copy'.
> Reading option 'http://localhost:8090/feed1.ffm' ... matched as output
file.
> Finished splitting the commandline.
> Parsing a group of options: global .
> Applying option loglevel (set logging level) with argument debug.
> Successfully parsed a group of options.
> Parsing a group of options: input file /dev/video1.
> Applying option f (force format) with argument video4linux2.
> Applying option r (set frame rate (Hz value, fraction or abbreviation))
with
> argument 30.
> Applying option s (set frame size (WxH or abbreviation)) with argument
> 640x480.
> Successfully parsed a group of options.
> Opening an input file: /dev/video1.
> [video4linux2,v4l2 @ 0x728e00] fd:3 capabilities:4000001
> [video4linux2,v4l2 @ 0x728e00] Current input_channel: 0, input_name:
> Camera
> 1
> [video4linux2,v4l2 @ 0x728e00] Setting time per frame to 1/30
> [video4linux2,v4l2 @ 0x728e00] All info found Input #0, video4linux2,v4l2,
> from '/dev/video1':
>   Duration: N/A, start: 497.720000, bitrate: N/A
>     Stream #0:0, 8, 1/1000000: Video: h264, yuv420p, 640x480, 1/2000000,
-5
> kb/s, 30 fps, 30 tbr, 1000k tbn, 2000k tbc Successfully opened the file.
> Parsing a group of options: input file hw:0.
> Applying option f (force format) with argument alsa.
> Applying option ar (set audio sampling rate (in Hz)) with argument 48000.
> Applying option ac (set number of audio channels) with argument 2.
> Successfully parsed a group of options.
> Opening an input file: hw:0.
> Guessed Channel Layout for  Input Stream #1.0 : stereo Input #1, alsa,
from
> 'hw:0':
>   Duration: N/A, start: 1375814596.248875, bitrate: N/A
>     Stream #1:0, 1, 1/1000000: Audio: pcm_s16be, 48000 Hz, stereo, 1536
kb/s
> Successfully opened the file.
> Parsing a group of options: output file http://localhost:8090/feed1.ffm.
> Applying option map (set input stream mapping) with argument 0:0.
> Applying option map (set input stream mapping) with argument 1:0.
> Applying option vcodec (force video codec ('copy' to copy stream)) with
> argument copy.
> Applying option acodec (force audio codec ('copy' to copy stream)) with
> argument copy.
> Successfully parsed a group of options.
> Opening an output file: http://localhost:8090/feed1.ffm.
> [ffm @ 0x8001f0] Format ffm probed with size=2048 and score=101
> [AVIOContext @ 0x7a6040] Statistics: 4096 bytes read, 0 seeks Tue Aug  6
> 18:43:16 2013 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
Successfully
> opened the file.
> Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
>   Metadata:
>     creation_time   : now
>     encoder         : Lavf55.13.102
>     Stream #0:0, 0, 1/1000000: Audio: pcm_s16be, 48000 Hz, stereo, 1536
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
> Stream mapping:
>   Stream #1:0 -> #0:0 (copy)
>   Stream #0:0 -> #0:1 (copy)
> Press [q] to stop, [?] for help
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list