[FFmpeg-trac] #4118(ffmpeg:new): mpegts: allow to set service_type in SDT

FFmpeg trac at avcodec.org
Tue Nov 18 21:54:09 CET 2014

#4118: mpegts: allow to set service_type in SDT
             Reporter:  dhead666  |                     Type:  enhancement
               Status:  new       |                 Priority:  normal
            Component:  ffmpeg    |                  Version:  2.4.3
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
 AFAIK When muxing any stream to mpegts the service_type field in the SDT
 always set as tv (not sure about the hex value, maybe 0x01).

 It would be useful to be able to set the value to something else as radio.

 I'm not sure if adding only one choise is a good idea (meaning being able
 to choose only tv or radio) as I see there are multiple related values for
 radio as 0x02, 0x07 and 0x0A (same goes for tv), so it might be best to
 just add all the values from the "Service type coding" table (table 87 in

 Another approach would be to automatically set the service_type as radio
 if there's only an audio stream (again, the question is which value

 My personal interest with this is to be able to add internet radio
 stations correctly to tvheadend.

 I pipe mpegts of internet radio station (originally HLS stream) from
 ffmpeg to tvheadend as described at
 https://tvheadend.org/projects/tvheadend/wiki/Custom_MPEG-TS_Input and by
 entering the following to tvheadend:

 pipe:///usr/bin/ffmpeg -loglevel fatal -i
 -acodec copy -metadata service_provider=STRING -metadata
 service_name=STRING -f mpegts -tune zerolatency pipe:1

 The stream recognized in tvheadend as tv channel and not radio because
 ffmpeg set service_type as tv.

 Thanks in advance

Ticket URL: <https://trac.ffmpeg.org/ticket/4118>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list