mpegts: allow to set service_type in SDT
|Reported by:||dhead666||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
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 http://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.13.01_40/en_300468v011301o.pdf ).
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 exactly).
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 http://103fm-s.nsacdn.com/103fm_LiveRadioRepeat/_definst_/smil:LiveRadio.smil/manifest.m3u8 -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
Change History (6)
comment:1 by , 9 years ago
|Component:||ffmpeg → avformat|
|Priority:||normal → wish|
|Version:||2.4.3 → git-master|