dvb-format-convert
dvb-format-convert is a command line tool for digital TV services that is compliant with version 5 of the DVB API, and backward compatable with the older v3 DVB API. It was developed as part of DVBv5 Tools suite, which resides in the v4l-utils git repositiory [1].
dvb-format-convert is a tool meant to convert among different file formats.
For other dvbv5 tools, please see the main article.
At v4l-utils version 1.4.0, there are 3 different formats supported: - dvbv5 - the standard format at libdvbv5, capable of representing all different TV standards; - channel - the dvb-apps legacy channel format, with supports only ATSC, DVB-C, DVB-S and DVB-T standards, extended to also support s2-scan format for DVB-S2 files, and to support DVB-T2. - zap - the dvb-apps legacy format for tuning, with supports only ATSC, DVB-C, DVB-S and DVB-T standards.
Unfortunately, the dvb-apps legacy zap format doesn't store the DVB standard. So, any conversions to and/or from this format requires an extra parameter, to specify the delivery system.
Examples:
To convert a channel file from legacy dvb-apps format:
$ dvb-format-convert -I channel -O dvbv5 dvbc-channel-legacy dvbc-channel Reading file dvbc-channel-legacy Writing file dvbc-channel
To convert a dvbv5 file with services on it to legacy dvb-apps zap format:
$ dvb-format-convert -I dvbv5 -O zap -s dvbc/annex_a dvb_channel.conf legacy.conf Reading file dvb_channel.conf Writing file legacy.conf WARNING: missing video PID while parsing entry 8 of legacy.conf WARNING: missing audio PID while parsing entry 8 of legacy.conf WARNING: missing video PID while parsing entry 9 of legacy.conf WARNING: missing audio PID while parsing entry 9 of legacy.conf WARNING: missing video PID while parsing entry 10 of legacy.conf WARNING: missing video PID while parsing entry 11 of legacy.conf WARNING: missing video PID while parsing entry 12 of legacy.conf WARNING: missing video PID while parsing entry 13 of legacy.conf WARNING: missing video PID while parsing entry 14 of legacy.conf WARNING: missing video PID while parsing entry 15 of legacy.conf WARNING: missing audio PID while parsing entry 15 of legacy.conf WARNING: missing video PID while parsing entry 16 of legacy.conf WARNING: missing audio PID while parsing entry 16 of legacy.conf
Please notice that the legacy dvb-apps format assumes that every channel will have one (and just one) audio PID and one (and just one) video PID, while the dvbv5 format supports multiple PID per service type.
The above warnings happened on pure-audio channels and on data-only channels:
Original dvb_channel.conf file:
[SBT] SERVICE_ID = 4 VIDEO_PID = 42 AUDIO_PID = 257 PID_f1 = 768 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Globo] SERVICE_ID = 5 VIDEO_PID = 288 AUDIO_PID = 289 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Record] SERVICE_ID = 7 VIDEO_PID = 36 AUDIO_PID = 305 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Band] SERVICE_ID = 13 VIDEO_PID = 272 AUDIO_PID = 273 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Boa Vontade TV] SERVICE_ID = 18 VIDEO_PID = 368 AUDIO_PID = 369 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [TNT] SERVICE_ID = 48 VIDEO_PID = 336 AUDIO_PID = 337 338 849 PID_86 = 816 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Boomerang] SERVICE_ID = 57 VIDEO_PID = 352 AUDIO_PID = 353 354 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Cartoon] SERVICE_ID = 104 VIDEO_PID = 320 AUDIO_PID = 321 322 PID_86 = 1840 PID_05 = 3295 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [NET Games] SERVICE_ID = 252 PID_05 = 3047 3046 3045 3044 3042 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [NET Música] SERVICE_ID = 300 PID_05 = 3314 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Pagode] SERVICE_ID = 307 AUDIO_PID = 102 PID_05 = 202 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Axé] SERVICE_ID = 309 AUDIO_PID = 101 PID_05 = 201 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Festa] SERVICE_ID = 326 AUDIO_PID = 103 PID_05 = 203 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Trilhas Sonoras] SERVICE_ID = 342 AUDIO_PID = 104 PID_05 = 204 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [Rádio Globo RJ] SERVICE_ID = 347 AUDIO_PID = 629 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [01070138] SERVICE_ID = 800 PID_05 = 40 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A [01070238] SERVICE_ID = 801 PID_05 = 7441 FREQUENCY = 573000000 MODULATION = QAM/256 INVERSION = AUTO SYMBOL_RATE = 5217000 INNER_FEC = NONE DELIVERY_SYSTEM = DVBC/ANNEX_A
So, for the channels with multiple PIDs, the converted legacy.conf file will have just the first one.
For the channels without an audio or video PID, it will store PID=0.
This is the output file for the above channel list.
SBT:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:42:257:4 Globo:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:288:289:5 Record:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:36:305:7 Band:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:272:273:13 Boa Vontade TV:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:368:369:18 TNT:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:336:337:48 Boomerang:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:352:353:57 Cartoon:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:320:321:104 NET Games:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:0:0:252 NET Música:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:0:0:300 Pagode:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:0:102:307 Axé:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:0:101:309 Festa:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:0:103:326 Trilhas Sonoras:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:0:104:342 Rádio Globo RJ:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:0:629:347 01070138:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:0:0:800 01070238:573000000:INVERSION_AUTO:5217000:FEC_NONE:QAM_256:0:0:801