Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


This forum has not been maintained for a long time and will probably get deleted in the near future.
For faster responses to your questions, please use StackOverflow instead and tag your questions with "FFmpeg".
If you need a backup of the posts from this forum, please contact me directly.

Map Program ID Outputs in MPTS?

Discussions about problems encountered using ffmpeg.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

Map Program ID Outputs in MPTS?

Postby csdesigns » Wed May 31, 2017 4:31 am

I am trying to ingest a number of udp streams and copy + write them to a MPTS file for archiving. Getting the streams into a basic MPTS is simple enough, but all I have been able to achieve thus far is to have all of my streams copied into one output Program ID / Service Name.

With the following cmd line:
Code: Select all
ffmpeg -thread_queue_size 1024 -i udp://@:8001?fifo_size=1000000 -thread_queue_size 1024 -i udp://@:8002?fifo_size=1000000 -thread_queue_size 1024 -i udp://@:8003?fifo_size=1000000 -thread_queue_size 1024 -i udp://@:8004?fifo_size=1000000 -thread_queue_size 1024 -i udp://@:8005?fifo_size=1000000 -thread_queue_size 1024 -i udp://@:8006?fifo_size=1000000 -map 0 -map 1 -map 2 -map 3 -map 4 -map 5 -f mpegts -c:v copy -c:a copy -mpegts_pmt_start_pid 480 -mpegts_start_pid 481 ~/Desktop/capture.ts

I get the following result:
Code: Select all
Input #0, mpegts, from 'capture.ts':
  Duration: 00:01:22.48, start: 1.400000, bitrate: 17842 kb/s
  Program 6
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x1e1]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1e2](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 512 kb/s
    Stream #0:2[0x1e3](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 511 kb/s
    Stream #0:3[0x1e4]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:4[0x1e5](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 512 kb/s
    Stream #0:5[0x1e6](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 512 kb/s
    Stream #0:6[0x1e7]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 832x468 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:7[0x1e8](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 512 kb/s
    Stream #0:8[0x1e9](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 512 kb/s
    Stream #0:9[0x1ea]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 686x386 [SAR 1:1 DAR 343:193], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:10[0x1eb](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 512 kb/s
    Stream #0:11[0x1ec](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 511 kb/s
    Stream #0:12[0x1ed]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 544x306 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:13[0x1ee](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 511 kb/s
    Stream #0:14[0x1ef](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 512 kb/s
    Stream #0:15[0x1f0]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(progressive), 366x206 [SAR 1:1 DAR 183:103], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:16[0x1f1](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 512 kb/s
    Stream #0:17[0x1f2](spa): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 511 kb/s

When what I am looking for is something more akin to this:
Code: Select all
Input #0, mpegts, from 'Out.ts':
  Duration: 00:02:10.86, start: 50110.148811, bitrate: 13979 kb/s
  Program 1
    Metadata:
      service_name    : 2
      service_provider:
    Stream #0:5[0x31]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
  Program 2
    Metadata:
      service_name    : 3
      service_provider:
    Stream #0:1[0x33]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, progressive), 832x468 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
  Program 3
    Metadata:
      service_name    : 4
      service_provider:
    Stream #0:0[0x35]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, progressive), 686x386 [SAR 3088:3087 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
  Program 4
    Metadata:
      service_name    : 5
      service_provider:
    Stream #0:4[0x37]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, progressive), 544x306 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
  Program 5
    Metadata:
      service_name    : 6
      service_provider:
    Stream #0:2[0x39]: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, progressive), 366x206 [SAR 1648:1647 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
  Program 10
    Metadata:
      service_name    : 1
      service_provider:
    Stream #0:3[0x80c]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc

I've tried to research this but I am either not searching the proper keywords or am just missing the context in how I need to specify the Program IDs. Any help would be greatly appreciated. Thanks.
csdesigns
 
Posts: 4
Joined: Thu Sep 29, 2016 8:46 pm

Return to ffmpeg

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 2 guests