[FFmpeg-user] Removing an audio stream

JULIAN GARDNER joolzg at btinternet.com
Mon Sep 15 14:16:02 CEST 2014


I am encoding a stream using the option "-map 0:p:2" but this pulls in all the audio streams which I dont want.

How do i remove a certain stream before encoding

Commandline
ffmpeg -i udp://224.10.1.0:1234?reuse&fifo_size=50000 -c:v libx264 -c:a libfaac -map 0:p:2 -async 1 -f mpegts 'udp://225.176.4.60:50501?pkt_size=1316&buffer_size=1048576

So this is the debug I get

2014-09-15_12:00:09.03449 ffmpeg version N-63057-g63504d8 Copyright (c) 2000-2014 the FFmpeg developers
2014-09-15_12:00:09.03451   built on Jul 23 2014 13:59:12 with gcc
 4.6 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04)
2014-09-15_12:00:09.03451   configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libzvbi --cc='ccache cc'
2014-09-15_12:00:09.03452   libavutil      52. 82.100 / 52. 82.100
2014-09-15_12:00:09.03452   libavcodec     55. 60.103 / 55. 60.103
2014-09-15_12:00:09.03453   libavformat    55. 37.102 / 55. 37.102
2014-09-15_12:00:09.03453   libavdevice    55. 13.101 / 55. 13.101
2014-09-15_12:00:09.03453   libavfilter     4.  5.100 /  4.  5.100
2014-09-15_12:00:09.03454   libswscale      2.  6.100 /  2.  6.100
2014-09-15_12:00:09.03454   libswresample   0. 18.100 / 
 0. 18.100
2014-09-15_12:00:09.03454   libpostproc    52.  3.100 / 52.  3.100
2014-09-15_12:00:09.25195 [mpeg2video @ 0x1ce7e60] Invalid frame dimensions 0x0.
2014-09-15_12:00:09.67791 Input #0, mpegts, from 'udp://224.10.1.0:1234?reuse&fifo_size=50000':
2014-09-15_12:00:09.67793   Duration: N/A, start: 93588.211644, bitrate: 288 kb/s
2014-09-15_12:00:09.67794   Program 2 
2014-09-15_12:00:09.67794     Stream #0:0[0x41]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, smpte170m), 704x480 [SAR 10:11 DAR 4:3], max. 14975 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
2014-09-15_12:00:09.67796     Stream #0:1[0x44](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s
2014-09-15_12:00:09.67797     Stream #0:2[0x45](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, mono, fltp,
 96 kb/s
2014-09-15_12:00:09.67920 -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.
2014-09-15_12:00:09.69019     Last message repeated 1 times
2014-09-15_12:00:09.69021 [libx264 @ 0x1d297e0] VBV maxrate unspecified, assuming CBR
2014-09-15_12:00:09.69022 [libx264 @ 0x1d297e0] using SAR=5/11
2014-09-15_12:00:09.69089 [libx264 @ 0x1d297e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
2014-09-15_12:00:09.69611 [libx264 @ 0x1d297e0] profile High, level 2.1
2014-09-15_12:00:09.71000 Output #0, mpegts, to 'udp://225.176.4.60:50501?pkt_size=1316&buffer_size=1048576':
2014-09-15_12:00:09.71002   Metadata:
2014-09-15_12:00:09.71002     service_provider: v-play
2014-09-15_12:00:09.71003     service_name    : 1084
2014-09-15_12:00:09.71003    
 encoder         : Lavf55.37.102
2014-09-15_12:00:09.71003     Stream #0:0: Video: h264 (libx264), yuv420p, 704x480 [SAR 5:11 DAR 4:3], q=-1--1, 875 kb/s, 90k tbn, 25 tbc
2014-09-15_12:00:09.71004     Stream #0:1(eng): Audio: aac (libfaac), 32000 Hz, stereo, s16, 96 kb/s
2014-09-15_12:00:09.71004     Stream #0:2(spa): Audio: aac (libfaac), 32000 Hz, stereo, s16, 96 kb/s
2014-09-15_12:00:09.71004 Stream mapping:
2014-09-15_12:00:09.71004   Stream #0:0 -> #0:0 (mpeg2video -> libx264)
2014-09-15_12:00:09.71005   Stream #0:1 -> #0:1 (ac3 -> libfaac)
2014-09-15_12:00:09.71006   Stream #0:2 -> #0:2 (ac3 -> libfaac)
2014-09-15_12:00:09.71006 Press [q] to stop, [?] for help

What i would like is to be able to use the -map 0:p:2 and also remove the "Stream
 #0:2(spa):", I need the "-map 0:p:2" as this is coming from a MPTS

joolz


More information about the ffmpeg-user mailing list