[FFmpeg-devel] Copying EIT (EPG) to output

Michal Rybarik michal at rybarik.sk
Wed Aug 12 02:00:03 EEST 2020


Hello,

I am using ffmpeg to transcode video in live stream - both input and
output are MPEG-TS multicasts (single program transport stream). Input
MPEG-TS contains EIT (EPG) and I want to copy it to the output.

Current ffmpeg treats EPG/EIT as private data stream. I have mapped it
to be copied to the output with PID 18, and it is. Unforutnately MPEGTS
muxer inserts this PID 18 as a part of the program (one of its
elementary streams), and this is is not valid.  EIT should not be muxed
into program stream, but outside of it (like PAT, NIT, TDT, ...)

I have looked into mpegtsenc.c, but I am not so brave to fight with it.
Is there anyone handy who would help me solve this? 


Input #0, mpegts, from
'udp://233.224.203.245:1234?fifo_size=573440&buffer_size=20971520':
  Duration: N/A, start: 44645.096589, bitrate: N/A
  Program 69
    Metadata:
      service_name    : Jednotka HD
      service_provider: Towercom
    Stream #0:1[0x69c](slo): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:2[0x69b]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k
tbn, 50 tbc
    Stream #0:3[0x69d](slo): Audio: mp2 ([3][0][0][0] / 0x0003), 48000
Hz, stereo, fltp, 192 kb/s
    Stream #0:4[0x6a3](qaa): Audio: mp2 ([3][0][0][0] / 0x0003), 48000
Hz, stereo, fltp, 192 kb/s
*  No Program**
**    Stream #0:0[0x12]: Data: epg**
*Stream mapping:
  Stream #0:2 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc))
  Stream #0:3 -> #0:1 (copy)
  Stream #0:4 -> #0:2 (copy)
  Stream #0:1 -> #0:3 (copy)
*  Stream #0:0 -> #0:4 (copy)**
*Press [q] to stop, [?] for help
Output #0, mpegts, to
'udp://239.9.12.1:1234?pkt_size=1316&ttl=32&buffer_size=20971520&fifo_size=57344&broadcast=0&bitrate=5400000':
  Metadata:
    service_provider: TEST
    service_name    : Jednotka HD
    encoder         : Lavf58.49.100
    Stream #0:0: Video: h264 (h264_nvenc) (High), cuda, 1024x576 [SAR
1:1 DAR 16:9], q=-1--1, 2975 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.99.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 2975000/0/2975000 buffer size: 2975000
vbv_delay: N/A
    Stream #0:1(slo): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 192 kb/s
    Stream #0:2(qaa): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, fltp, 192 kb/s
    Stream #0:3(slo): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
*    Stream #0:4: Data: epg**
*[mpegts @ 0x561cbdfba540] Timestamps are unset in a packet for stream
3. This is deprecated and will stop working in the future. Fix your code
to set the timestamps properly
*[mpegts @ 0x561cbdfba540] Stream 4, codec epg, is muxed as a private
data stream and may not be recognized upon reading.**
*

-- 
Regards,
Michal Rybarik



More information about the ffmpeg-devel mailing list