Opened 9 years ago

Closed 9 years ago

#4734 closed enhancement (duplicate)

Muxing Multiple Programs with FFmpeg

Reported by: smallishzulu Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: mpegts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hello,

I am trying to mux multiple programs with FFmpeg, but all video & audio streams are muxed under a single program:

root@e:~# /opt/ffmpeg/bin/ffmpeg -loglevel info -re -i /root/bunny.mp4 -i /root/ely.mp4 -map 0:0 -map 0:1 -c:v:0 libx264 -preset ultrafast -b:v 24000k -c:a:0 aac -strict -2 -ac 2 -b:a 256k -mpegts_pmt_start_pid 1010 -mpegts_start_pid 1000 -metadata:s:0 service_provider=KIZIL -metadata:s:0 service_name=PikoTV -f mpegts -map 1:0 -map 1:1 -c:v:1 libx264 -preset ultrafast -b:v 24000k -c:a:1 aac -strict -2 -ac 2 -b:a 256k -mpegts_pmt_start_pid 2010 -mpegts_start_pid 2000 -metadata:s:2 service_provider=KIZIL2 -metadata:s:2 service_name=PikoTV2 -minrate 48000k -maxrate 48000k -bufsize 48000k -muxrate 52000k -f mpegts -y /dev/null
ffmpeg version N-73447-g6a1204a Copyright (c) 2000-2015 the FFmpeg developers

built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: --prefix=/opt/ffmpeglow --enable-shared --enable-nonfree --enable-gpl --extra-cflags='-I/opt/ffmpeglow/include -I/usr/local/include' --extra-ldflags=-L/opt/ffmpeglow/lib --bindir=/opt/ffmpeglow/bin --extra-libs=-ldl --enable-libx264 --enable-libx265 --enable-nonfree --enable-gpl --enable-nvenc
libavutil 54. 28.100 / 54. 28.100
libavcodec 56. 46.101 / 56. 46.101
libavformat 56. 40.100 / 56. 40.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 20.100 / 5. 20.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/root/bunny.mp4':

Metadata:

major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2013-12-17 16:40:26
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
genre : Animation
composer : Sacha Goedegebure

Duration: 00:10:34.53, start: 0.000000, bitrate: 8487 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], 8002 kb/s, 60 fps, 60 tbr, 60k tbn, 120 tbc (default)
Metadata:

creation_time : 2013-12-17 16:40:26
handler_name : GPAC ISO Video Handler

Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 160 kb/s (default)
Metadata:

creation_time : 2013-12-17 16:40:28
handler_name : GPAC ISO Audio Handler

Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)
Metadata:

creation_time : 2013-12-17 16:40:28
handler_name : GPAC ISO Audio Handler

Side data:

audio service type: main

Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/root/ely.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.63.104

Duration: 00:02:12.40, start: 0.017333, bitrate: 26628 kb/s

Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 4096x1716 [SAR 1:1 DAR 1024:429], 26252 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Metadata:

handler_name : VideoHandler

Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 382 kb/s (default)
Metadata:

handler_name : SoundHandler

Codec AVOption cbr (Use cbr encoding mode) specified for output file #0 (/dev/null) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption 2pass (Use 2pass cbr encoding mode (low latency mode only)) specified for output file #0 (/dev/null) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[libx264 @ 0x20869a0] using SAR=1/1
[libx264 @ 0x20869a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x20869a0] profile Constrained Baseline, level 5.2
[libx264 @ 0x1fa24c0] using SAR=1/1
[libx264 @ 0x1fa24c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x1fa24c0] profile Constrained Baseline, level 5.2
Output #0, mpegts, to '/dev/null':

Metadata:

major_brand : isom
minor_version : 1
compatible_brands: isomavc1
composer : Sacha Goedegebure
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
genre : Animation
encoder : Lavf56.40.100
Stream #0:0(und): Video: h264 (libx264), yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], q=-1--1, 24000 kb/s, 50 fps, 90k tbn, 50 tbc (default)
Metadata:

creation_time : 2013-12-17 16:40:26
handler_name : GPAC ISO Video Handler
service_provider: KIZIL
service_name : PikoTV
encoder : Lavc56.46.101 libx264

Stream #0:1(und): Audio: aac, 48000 Hz, stereo, fltp, 256 kb/s (default)
Metadata:

creation_time : 2013-12-17 16:40:28
handler_name : GPAC ISO Audio Handler
encoder : Lavc56.46.101 aac

Stream #0:2(eng): Video: h264 (libx264), yuv420p, 4096x1716 [SAR 1:1 DAR 1024:429], q=-1--1, 24000 kb/s, 50 fps, 90k tbn, 50 tbc (default)
Metadata:

handler_name : VideoHandler
service_provider: KIZIL2
service_name : PikoTV2
encoder : Lavc56.46.101 libx264

Stream #0:3(eng): Audio: aac, 48000 Hz, stereo, fltp, 256 kb/s (default)
Metadata:

handler_name : SoundHandler
encoder : Lavc56.46.101 aac

Stream mapping:

Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (mp3 (native) -> aac (native))
Stream #1:0 -> #0:2 (h264 (native) -> h264 (libx264))
Stream #1:1 -> #0:3 (aac (native) -> aac (native))

Press [q] to stop, ? for help
Past duration 0.666664 too large
Past duration 0.833321 too large
Past duration 0.999992 too large
frame= 58 fps= 42 q=-1.0 Lq=-1.0 size= 9070kB time=00:00:01.77 bitrate=41975.5kbits/s dup=33 drop=10
video:2124kB audio:35kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 320.225586%
[libx264 @ 0x20869a0] frame I:1 Avg QP:21.00 size: 25099
[libx264 @ 0x20869a0] frame P:57 Avg QP:16.63 size: 20133
[libx264 @ 0x20869a0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x20869a0] mb P I16..4: 16.6% 0.0% 0.0% P16..4: 1.1% 0.0% 0.0% 0.0% 0.0% skip:82.4%
[libx264 @ 0x20869a0] final ratefactor: 15.71
[libx264 @ 0x20869a0] coded y,uvDC,uvAC intra: 2.6% 3.4% 2.5% inter: 0.6% 1.0% 0.7%
[libx264 @ 0x20869a0] i16 v,h,dc,p: 94% 5% 1% 0%
[libx264 @ 0x20869a0] i8c dc,h,v,p: 91% 5% 4% 0%
[libx264 @ 0x20869a0] kb/s:8087.59
[libx264 @ 0x1fa24c0] frame I:1 Avg QP:20.00 size: 21541
[libx264 @ 0x1fa24c0] frame P:58 Avg QP: 8.31 size: 16901
[libx264 @ 0x1fa24c0] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x1fa24c0] mb P I16..4: 2.2% 0.0% 0.0% P16..4: 4.3% 0.0% 0.0% 0.0% 0.0% skip:93.5%
[libx264 @ 0x1fa24c0] final ratefactor: 0.72
[libx264 @ 0x1fa24c0] coded y,uvDC,uvAC intra: 19.3% 10.8% 4.3% inter: 1.6% 0.4% 0.4%
[libx264 @ 0x1fa24c0] i16 v,h,dc,p: 81% 14% 2% 3%
[libx264 @ 0x1fa24c0] i8c dc,h,v,p: 86% 5% 9% 1%
[libx264 @ 0x1fa24c0] kb/s:6792.00
Exiting normally, received signal 2.

Any idea how to make multi program ?

Change History (1)

comment:1 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavformat
Keywords: mpts removed
Priority: normalwish
Resolution: duplicate
Status: newclosed
Type: defectenhancement
Version: unspecifiedgit-master

Duplicate of ticket #4525.

Note: See TracTickets for help on using tickets.