GithubHelp home page GithubHelp logo

mkrufky / libdvbtee Goto Github PK

View Code? Open in Web Editor NEW
79.0 21.0 31.0 2.09 MB

dvbtee: a digital television streamer / parser / service information aggregator supporting various interfaces including telnet CLI & http control

License: GNU Lesser General Public License v2.1

Shell 0.97% C++ 92.45% QMake 1.50% C 1.89% Makefile 1.07% M4 1.24% Python 0.61% JavaScript 0.27%
network-streams udp dvb mpegts atsc psip streaming tv tv-apps parser

libdvbtee's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libdvbtee's Issues

can't open very large files

can`t open very large files. (-F option)

maybe over 2GB file have a problem.

need to add or modify the CPPFLAGS option.
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"

attach modified file (build-auto.sh)
build-auto.zip

Does not compile on Ubuntu 18.04

commit ea75b56 (HEAD -> master, tag: v0.6.7, origin/master, origin/HEAD)

In file included from decoder.cpp:22:0:                                                                                                                                                             
decoder.h:33:10: fatal error: dvbpsi/dvbpsi.h: No such file or directory                                                                                                                            
 #include "dvbpsi/dvbpsi.h"       
hdhr_tuner.cpp:31:10: fatal error: hdhomerun.h: No such file or directory                             
 #include "hdhomerun.h"    

Multicast UDP steam doesnt seem to work

Hi, I'm trying to pull the PSI Data from a multicast UDP stream. I've compiled DVBTee for windows and am trying this line

dvbtee -iudp://239.255.1.201:5004 -O3 -ofile://output.ts -d

This is my output:-
_1527154273 LOG::libdvbtee_set_debug_level: (0xff)
1527154273 out::__add: (0->file://output.ts)
1527154273 rbuf::rbuf: ()
1527154273 out::output_stream: ()
1527154273 out::add: (-->file://output.ts)
1527154273 out::add: opening output.ts...
1527154273 rbuf::reset: ()
1527154273 out::_add: ~(0->file)
1527154273 out::start: ()
1527154273 out::start: (3)
1527154273 rbuf::set_capacity: (260568)
1527154273 parse::add_output: success adding url target id: 0
1527154273 feed::start_socket: ()
1527154273 feed::start_socket: (<--udp://239.255.1.201:5004)
1527154273 out::output_stream_thread: (3)
1527154273 feed::start_udp_unbound_listener: (5004)
bind to local interface failed: No error
1527154273 feed::start_socket: ~(-->udp)
1527154273 feed::stop: ()
1527154273 listen::stop: ()
1527154273 feed::stop: waiting...

build-auto.sh doesn't build or link dvb-vb2.cpp

The build doesn't seem to know about dvb-vb2.cpp: There's no attempt to compile it, and then the linker complains about the undefined references.

I'm trying to build from the source in: mkrufky-libdvbtee-v0.6.6-0-gd291532.zip using build-auto.sh.

I was missing the unenforced build dependency for pkgconf, but adding it changed nothing.

I suspect an autotools issue, but am unfamiliar with it.

How to capture program output?

Hello - first of all THANK YOU for making this software, it is exactly what I have been looking for, a simple "swiss army knife" for transport streams. And it accurately reads and displays the ATSC broadcasts/info!

I'm wondering how to properly capture program output. Specifically I am looking to get the scan output in JSON, and the EPG guide in JSON. When running commands I can see the output in the console - but it appears to be going to stderr, mixed with lots of other debug/logging output.

For example, to get the EPG for channel 17:

dvbtee -C 17 -I 1 -E -j > out.json
# out.json is empty

dvbtee -C 17 -I 1 -E -j -ofile://out.json
# out.json is binary, perhaps a transport stream?

Same story with channel scanning:

dvbtee -s -C 17 -j > out.json
# out.json has the stdout, which is the plaintext version.

Any help would be appreciated. I'm assuming that various string processing of stderr is going to be required to parse the JSON?

build failure with gcc 6.1

Seemed to work OK with 5.x :)

libtool: compile: i686-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../.. -I.. -I../value -I./table -I./descriptor -DFORCE_DECODER_LINKAGE -g -O2 -MT table/tabl_02.lo -MD -MP -MF table/.deps/tabl_02.Tpo -c table/tabl_02.cpp -o table/tabl_02.o
In file included from ../decode/descriptor/descriptor.h:33:0,
from ../decode/table/table.h:28,
from ../decode.h:29,
from ../functions.h:31,
from table/tabl_00.cpp:26:
table/tabl_00.cpp: In member function 'void dvbtee::decode::pat::store(const dvbpsi_pat_t_)':
../log.h:50:50: error: unable to find string literal operator 'operator""CLASS_MODULE' with 'const char [13]', 'unsigned int' arguments
__printf(stderr, "%d "CLASS_MODULE"::%s: " fmt "\n",
^
../log.h:46:47: note: in definition of macro '__printf'
#define __printf(fd, fmt, arg...) fprintf(fd, fmt, ##arg)
^~~
table/tabl_00.cpp:34:30: note: in expansion of macro '__dPrintf'
#define dPrintf(fmt, arg...) __dPrintf(DBG_DECODE, fmt, ##arg)
^~~~~~~~~
table/tabl_00.cpp:78:2: note: in expansion of macro 'dPrintf'
dPrintf("%s", toJson().c_str());
^
Makefile:640: recipe for target 'table/tabl_00.lo' failed
make[2]: ** [table/tabl_00.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../decode/descriptor/descriptor.h:33:0,
from ../decode/table/table.h:28,
from ../decode.h:29,
from ../functions.h:31,
from table/tabl_02.cpp:26:
table/tabl_02.cpp: In member function 'void dvbtee::decode::pmt::store(const dvbpsi_pmt_t
)':
../log.h:50:50: error: unable to find string literal operator 'operator""CLASS_MODULE' with 'const char [13]', 'unsigned int' arguments
__printf(stderr, "%d "CLASS_MODULE"::%s: " fmt "\n",
^
../log.h:46:47: note: in definition of macro '__printf'
#define __printf(fd, fmt, arg...) fprintf(fd, fmt, ##arg)
^~~
table/tabl_02.cpp:34:30: note: in expansion of macro '_dPrintf'
#define dPrintf(fmt, arg...) dPrintf(DBG_DECODE, fmt, ##arg)
^~~~~~~~~
table/tabl_02.cpp:78:2: note: in expansion of macro 'dPrintf'
dPrintf("%s", toJson().c_str());
^
table/tabl_02.cpp: In static member function 'static bool dvbtee::decode::pmt::ingest(dvbtee::decode::TableStore
, const dvbpsi_pmt_t
, dvbtee::decode::TableWatcher
)':
../log.h:50:50: error: unable to find string literal operator 'operator""CLASS_MODULE' with 'const char [62]', 'unsigned int' arguments
__printf(stderr, "%d "CLASS_MODULE"::%s: " fmt "\n",
^
../log.h:46:47: note: in definition of macro '__printf'
#define __printf(fd, fmt, arg...) fprintf(fd, fmt, ##arg)
^~~
table/tabl_02.cpp:34:30: note: in expansion of macro '__dPrintf'
#define dPrintf(fmt, arg...) __dPrintf(DBG_DECODE, fmt, ##arg)
^~~~~~~~~
table/tabl_02.cpp:145:5: note: in expansion of macro 'dPrintf'
dPrintf("PMT v%d, service_id %d, pcr_pid %d: ALREADY DECODED", t->i_version, t->i_program_number, t->i_pcr_pid);
^
Makefile:640: recipe for target 'table/tabl_02.lo' failed

Failed to open stdin

I'm trying to use dvbtee inside a node.js application. I have a tuner module which gives me access to a MPEG-2 transport stream from a DVB-T stick.

Earlier I piped the output to a file record.ts and started dvbtee with the file as its input, which worked. Now I would like to pipe the stream directly to dvbtee. Therefore I'm starting dvbtee without arguments, which works fine on a linux shell but inside node.js will give me this error:

Stderr: reading from STDIN
failed to open stdin!

This is the code:

  var exec = require('child_process').exec;
      
  // both work
  //var command = "cat record.ts | dvbtee";
  //var command ="dvbtee < record.ts";

  // doesn't work
  var command = "dvbtee";
  var dvbtee = exec(command, function(error, stdout, stderr) {

  	console.log("Stdout:", stdout);
  	console.log("Stderr:", stderr);

  });

I was thinking it would wait for input from stdin, but it seems it doesn't. Why can it not open stdin?

Later I would do this:

tuner.pipe(dvbtee.stdin);

What could be the problem here?

Thank you for any help!

FreeBSD

Why do I get

$ autoconf-2.69 
$ ./configure 
configure: error: cannot find install-sh, install.sh, or shtool in . "."/.
$

on FreeBSD?

Quoting issue in JSON output

I want to use dvbtee JSON output to extract EPG information from my stored ts-files.
It looks that I found an issue here:
When a description already contains text quoted with double quotes, the JSON output gets invalid, because this description is wrapped again with double quotes without escaping the inner quotes, see below (...""Mein ...)
{ "descriptors": [ { "descriptorTag": 77, "lang": "deu", "name": ""Mein Kampf". Das gefährliche Buch", "text": "Dokumentation Deutschland 2014" } ]
I'm not a C++ programmer, so it would be difficult to help myself here. Would be great if anybody could fix this. Thanks!

Error while loading shared libraries: libdvbtee.so.0

I built on Ubuntu 18.04.4 using the ./build-auto.sh method, had to install automake and libtools but all looks fine. But when I run /dvbtee/dvbtee < /path/to/file.ts I get the error:
/home/code/dvbtee/dvbtee/.libs/dvbtee: error while loading shared libraries: libdvbtee.so.0: cannot open shared object file: No such file or directory

I've tried this sudo in case of permissions issue, same error. I can't find libdvbtee.so.0, maybe there's a build problem I missed in the build?

EPG Description.

Hey Community,

first of all thank you for the great tool and the job which was been done to build it.

I am trying to get few information out of my stream [name,stream time, description] but somehow it is not working properly. I get the following JSON/Data only when i add "-d3" as parameter.

Is there any way to reduce the output?

Command :
root/libdvbtee/dvbtee/.libs/lt-dvbtee -d3 -iudp://239.22.0.1:1234

Wanted output :

[EIT]::store: {"events":[{"descriptors":[{"descriptorTag":77,"lang":"deu","name":"Dynamische Programmumschaltung","text":"Der Sender Test-R prüft die dynamische PMT Umschaltung. Die PMT sorgt für die korrekte Auswertung und Darstellung der von Sendern ausgestrahlten Umschaltsignale für wechselnde Programme und ermöglicht die Aufteilung in "}],"eventId":3002,"f_free_ca":false,"lengthSec":1179648,"runningStatus":4,"startTime":998597787648,"unixTimeBegin":1635937200,"unixTimeEnd":1635980400},{"descriptors":[{"descriptorTag":77,"lang":"deu","name":"Dynamische Programmumschaltung","text":"Der Sender Test-R prüft die dynamische PMT Umschaltung. Die PMT sorgt für die korrekte Auswertung und Darstellung der von Sendern ausgestrahlten Umschaltsignale für wechselnde Programme und ermöglicht die Aufteilung in "}],"eventId":4001,"f_free_ca":false,"lengthSec":1179648,"runningStatus":1,"startTime":998598967296,"unixTimeBegin":1635980400,"unixTimeEnd":1636023600}],"lastTableId":79,"networkId":1,"serviceId":28726,"tableId":78,"tableName":"EIT","tsId":1051,"version":0}

If i do remove the "-d3" as parameter then the output removes the description JSON/Data

dump_epg_event: id:10304 - 0: SWR RP HD 2021-11-09,21:00,21:45 Die Ökochecker - Wohnen, Möbel, Pflanzen dump_epg_event: id:10304 - 0: SWR RP HD 2021-11-09,21:45,22:00 SWR Aktuell Rheinland-Pfalz dump_epg_event: id:10304 - 0: SWR RP HD 2021-11-09,22:00,22:30 Hannes und der Bürgermeister dump_epg_event: id:10304 - 0: SWR RP HD 2021-11-09,22:30,23:00 Freunde in der Mäulesmühle dump_epg_event: id:10304 - 0: SWR RP HD 2021-11-09,23:00,00:30 Wie der Südwesten wohnte

Thank you all.

Travis builds on OS X fail due to `/usr/local/Library/ENV/4.3/sed: No such file or directory`

$ autoreconf --install
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 407: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 1419: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 2247: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 407: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 407: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 407: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 407: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 407: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 407: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 407: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 2023: /usr/local/Library/ENV/4.3/sed: No such file or directory
configure.ac:51: installing './compile'
configure.ac:10: installing './config.guess'
configure.ac:10: installing './config.sub'
configure.ac:12: installing './install-sh'
configure.ac:58: error: required file './ltmain.sh' not found
configure.ac:12: installing './missing'
dvbtee/Makefile.am: installing './depcomp'
autoreconf: automake failed with exit status: 1

build failure

attempting to follow instructions from readme:

$ autoreconf --install
$./configure
...
$make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in libdvbtee/value
make[2]: Nothing to be done for all'. Making all in libdvbtee/decode depbase=echo decoder.lo | sed 's|[^/]*$|.deps/&|;s|.lo$||'`;
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I.. -I../value -I./table -I./descriptor -g -O2 -MT decoder.lo -MD -MP -MF $depbase.Tpo -c -o decoder.lo decoder.cpp &&
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I.. -I../value -I./table -I./descriptor -g -O2 -MT decoder.lo -MD -MP -MF .deps/decoder.Tpo -c decoder.cpp -fno-common -DPIC -o .libs/decoder.o
In file included from decoder.cpp:22:
./decoder.h:33:10: fatal error: 'dvbpsi/dvbpsi.h' file not found

include "dvbpsi/dvbpsi.h"

     ^

1 error generated.
make[2]: *** [decoder.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Cheers!

file rotate question

Good day.

Does it possible to rotate output files during recording? (Some simple equivalent to DVR).
Or we need to add this kind of functionality? If need to add where you would suggest to start from (just a hint)?

Thanks,
Mikhail.

TDT/TOT question

Good day.

Thank you for good software. :)
We have very small question. Does it possible to extract TDT/TOT timestamps from stream?
If not possible with dvbtee please give us a hint how we can grab it (if you know of course how this possible) :)

Thanks,
Mikhail.

JSON output... isnt?

I fed in a day or so of BBC Radio 1's TS mux into this like so:

cat /dvb/6720/365/14515*.ts | ./dvbtee/dvbtee -j |& tail -n 120 (tailing because I can't find a way to turn off the dots)

And got at the end of it:

[ { 'networkId': 9018, 'services': [ { 'descriptors': [ { 'descriptorTag': 72, 'providerName': '', 'serviceName': 'BBC Radio 1' } ], 'f_eit_present': true, 'f_eit_sched': true, 'f_free_ca': false, 'runningStatus': 4, 'serviceId': 6720 } ], 'tableId': 66, 'tableName': 'SDT', 'tsId': 4164, 'version': 24 }, { 'events': [ { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Benji B', 'text': 'Benji brings in New Year('s Eve) with mixes from Julio Bashmore and Artwork, plus Coldcut with a special History of Ninja Tune mix.' } ], 'eventId': 40789, 'f_free_ca': true, 'lengthSec': 196608, 'runningStatus': 0, 'startTime': 962794160128 }, { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Adele Roberts', 'text': 'Adele's 2015 Live Lounge rewind concludes with Foals, the Maccabees and Wolf Alice.' } ], 'eventId': 40790, 'f_free_ca': true, 'lengthSec': 196608, 'runningStatus': 0, 'startTime': 962795143168 }, { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Dev', 'text': 'Dev fills the gap between Christmas and New Year in style!' } ], 'eventId': 40879, 'f_free_ca': true, 'lengthSec': 196608, 'runningStatus': 0, 'startTime': 962795536384 }, { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'BBC Radio 1's Essential Mix of...', 'text': '...The Year. The shortlist for 2015 is Ben Klock, DJ EZ, Maceo Plex, Nero and Tale of Us. See if you agree with the experts on Radio 1's Essential Mix of 2015.' } ], 'eventId': 40886, 'f_free_ca': true, 'lengthSec': 131072, 'runningStatus': 0, 'startTime': 962810937344 }, { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'B.Traits', 'text': 'B rewinds with some of her favourite tracks from 2015.' } ], 'eventId': 40897, 'f_free_ca': true, 'lengthSec': 196608, 'runningStatus': 0, 'startTime': 962827714560 }, { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Dev', 'text': 'Dev has the weekend breakfast covered.' } ], 'eventId': 40899, 'f_free_ca': true, 'lengthSec': 262144, 'runningStatus': 0, 'startTime': 962828042240 }, { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Seani B', 'text': 'Seani B sits in for Target to keep the nation raving! Plus a guest mix from Deejay Theory.' } ], 'eventId': 40992, 'f_free_ca': true, 'lengthSec': 196608, 'runningStatus': 0, 'startTime': 962844491776 }, { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Diplo and Friends', 'text': 'Diplo and friends exclusively in the mix.' } ], 'eventId': 40906, 'f_free_ca': true, 'lengthSec': 131072, 'runningStatus': 0, 'startTime': 962844688384 }, { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Phil Taggart', 'text': 'The Sunday night support club.' } ], 'eventId': 40882, 'f_free_ca': true, 'lengthSec': 196608, 'runningStatus': 0, 'startTime': 962846654464 } ], 'lastTableId': 81, 'networkId': 9018, 'serviceId': 6720, 'tableId': 78, 'tableName': 'EIT', 'tsId': 4164, 'version': 16 }, { 'events': [ { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'BBC News', 'text': 'The latest news updates from around the world.' } ], 'eventId': 44512, 'f_free_ca': true, 'lengthSec': 1280, 'runningStatus': 1, 'startTime': 962794684416 } ], 'lastTableId': 78, 'networkId': 9018, 'serviceId': 6016, 'tableId': 78, 'tableName': 'EIT', 'tsId': 4164, 'version': 8 }, { 'events': [ { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Horrible Histories', 'text': '5/13. Historical sketch show. People from the Bronze Age argue about building the world's first city and Bob Hale explains the entire history of the Renaissance. Also in HD. [AD,S]' } ], 'eventId': 55992, 'f_free_ca': true, 'lengthSec': 12288, 'runningStatus': 1, 'startTime': 962794696704 } ], 'lastTableId': 78, 'networkId': 9018, 'serviceId': 4608, 'tableId': 78, 'tableName': 'EIT', 'tsId': 4164, 'version': 3 }, { 'events': [ { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Coming up on 5 live sports extra', 'text': 'Coming up at 2.55pm tomorrow, rugby union commentary from the Aviva Premiership as Northampton face Exeter.' } ], 'eventId': 45328, 'f_free_ca': true, 'lengthSec': 393216, 'runningStatus': 1, 'startTime': 962795667456 } ], 'lastTableId': 78, 'networkId': 9018, 'serviceId': 5696, 'tableId': 78, 'tableName': 'EIT', 'tsId': 4164, 'version': 23 }, { 'events': [ { 'descriptors': [ { 'descriptorTag': 77, 'lang': 'eng', 'name': 'Flog It!', 'text': 'Crathes Castle  Antiques programme. Experts Anita Manning and Adam Partridge join Paul Martin to sift through antiques and collectibles at Crathes Castle in Aberdeenshire. Also in HD. [S]' } ], 'eventId': 40271, 'f_free_ca': true, 'lengthSec': 65536, 'runningStatus': 1, 'startTime': 962795491328 } ], 'lastTableId': 78, 'networkId': 9018, 'serviceId': 4287, 'tableId': 78, 'tableName': 'EIT', 'tsId': 4164, 'version': 16 }, { 'events': [], 'lastTableId': 81, 'networkId': 9018, 'serviceId': 4672, 'tableId': 78, 'tableName': 'EIT', 'tsId': 4164, 'version': 22 } ]

This is accurate (other than lengthSec and startTime, those don't seem to make sense, or I'm missing something completely) however the output given here is not JSON that can be read. Mainly because of the single quotes, this makes automating the use of this program tedious

SAT>IP as tuner source

Hi,

I see that this good library has support for both: Linux DVB internal tuners and HDHomeRun devices.
From some time a new protocol for network tuners is available (almos for DVB sources): SAT>IP.

You can get the official specification from here:
http://www.satip.info/sites/satip/files/resource/satip_specification_version_1_2_2.pdf

And a good example code from the last VideoLAN commit (a single file for the input):
https://github.com/videolan/vlc/blob/master/modules/access/satip.c

A brief overview of this standard:

  • SSDP for autodiscovering.
  • Control plane using RTSP.
  • Transport plane using RTP.
  • Commands based on URI like: ?src=1&freq=11347&pol=v&ro=0.35&msys=dvbs2&mtype=8psk&plts=on&sr=22000&fec=23&pids=0,17,18

So, in fact similar to HDHR in functionality:

  • Both are network tuners.
  • Both have autodiscovering (SSDP vs 65001/udp), but addressable directly with the IP address.
  • Both use a message control protocol (RTSP in port 554 vs hdhomerun-binary in 65001/tcp).
  • Both use similar transport protocol (RTP+RTCP vs RTP/UDP).

Then I feel it can be easy to integrate the support for it. The idea is to use the current code for the HDHR input as an example for the concrete class satip_tuner_device, and use part of the code from the VLC project to complete the implementation.

You think that's a good idea?
I hope you agree to consider this upgrade.
Regards.

error in libdvbpsi

This is a recording from a hdhomerun using a file recorded from OTA
Mythtv dvr recorded file.

dvbtee -F 1101_20160207045500.ts -O7 -ofile://output.ts

dvbtee v0.4.3 - http://github.com/mkrufky/libdvbtee

_open_file: using 1101_20160207045500.ts
store PAT: v0, ts_id: 3223
1 | 30
store PMT: v18, service_id 1, pcr_pid 49
es_pid | type
31 | 0x02 (Video MPEG-2) |
34 | 0x81 (Audio AC3 (ATSC)) | eng
35 | 0x81 (Audio AC3 (ATSC)) | spa
36 | 0x81 (Audio AC3 (ATSC)) | eng
Error: libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 1) for PID 0
-d1 get this addition info

1454911323 [PMT]::store: { "pcrPid": 49, "program": 1, "streams": [ { "pid": 49, "streamType": 2, "streamTypeString": "Video MPEG-2" }, { "descriptors": [ { "bitRateCode": 18, "bsid": 8, "bsmod": 0, "description": "", "descriptorTag": 129, "fullSvc": true, "numChannels": "2/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "eng" } ], "descriptorTag": 10 } ], "pid": 52, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "descriptors": [ { "bitRateCode": 6, "bsid": 8, "bsmod": 5, "description": "", "descriptorTag": 129, "fullSvc": true, "numChannels": "1/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "spa" } ], "descriptorTag": 10 } ], "pid": 53, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "descriptors": [ { "bitRateCode": 6, "bsid": 8, "bsmod": 2, "description": "", "descriptorTag": 129, "fullSvc": true, "numChannels": "1/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "eng" } ], "descriptorTag": 10 } ], "pid": 54, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" } ], "tableId": 2, "tableName": "PMT", "version": 18 }

-d3 reveals this additional info
1454911567 decode::updateTable: 0x02
1454911567 parse::take_pmt: (post): v18, service_id 1, pcr_pid 49
1454911567 parse::process_pmt: : v18, service_id 1, pcr_pid 49
Error: libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 1) for PID 0
1454911567 parse::take_pat: (pre): v0, ts_id: 3223
1454911567 parse::set_ts_id: (0c97|3223)

unable to cross compile (mingw) for windows

This library works great. EPG from my TS files!
I tried to make a distribute for "end users" and ran into this:

feed.cpp:22:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
make[2]: *** [feed.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from demux.h:28:0,
                 from demux.cpp:24:
output.h:25:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
make[2]: *** [demux.lo] Error 1
functions.cpp: In function 'time_t datetime_utc(uint64_t)':
functions.cpp:103:19: error: 'timegm' was not declared in this scope
  return timegm(&tm);
                   ^
functions.cpp: In function 'time_t atsc_datetime_utc(uint32_t)':
functions.cpp:121:26: error: 'timegm' was not declared in this scope
  return timegm(&temp_time);
                          ^
make[2]: *** [functions.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
+ exit 1

FWIW. Cheers!

Enhancement Request: EPG TV Show Category and Advisory

Hi again,

Just a quick question to see if it would be possible to get the Category of the TV Show (i.e. "Entertainment" or its Id?) and the Advisory (PG, 18+ etc) in the Output? ... Having a look at a sample output i've captured the descriptorTag always seems to be 77 which i'm guessing means video as its 72 for the radio channels? Sorry if its there and i'm missing something here?!

Currently using the command line (using it in Brisbane Australia, DVBT)
dvbtee.exe -F infile.ts -j

I'm a .NET guy so doing updates will be over my head i'm afraid! But very happy to be a tester or contribute with writing some documentation or wikis whatever I can! :-)

Thanks,

Andrew

build-auto.sh: "git://" to "https://" required to make it work.

Using the build-auto.sh it failed until I changed git clone git://github.com/mkrufky/libdvbpsi.git into git clone https://github.com/mkrufky/libdvbpsi.git in line 28.

With "git://" it failed to fetch anything, then it continued, and the further build process went weird. The script probably should check if the git checkout process went OK or not and then abort instantly too.

Just FYI.

JSON output doesn't include most dates

I can see the programs on the console output as a list but most of them don't include in the JSON output. It is like doesn't include this list in the JSON part.
The command I enter
dvbtee/dvbtee -iudp://239.0.0.4:1234 -t30 -j

and the output.txt

Compilation to Windows 10

Hello,

I want to be able to carry out tests with the compilation, I read in a POST ( https://superuser.com/questions/1027014/how-to-l-extract-epg-data-from-mpeg-ts-files ) that it is possible to run it from windows 10, I tried what is mentioned in the installation instructions and in the README, but I get errors.

image

Could someone give me support?

I tried it from GitBash for windows and I get the following problems,

I don't know if this is the correct way to compile it from windows.

Thank you so much.

Confusing and Errorenous Bitrate Display

The bitrate display is slightly confusing:

…
pid 0000  1713 p/s  322.044 kb/s    2.352 mbit
pid 040e  1713 p/s  322.044 kb/s    2.352 mbit
pid 100e 965624 p/s  181.312 mb/s  1452.496 mbit
pid 104e 30640 p/s    5.320 mb/s   46.560 mbit
pid 120e   134 p/s   25.192 kb/s  201.536 kbit
pid 2000 999824 p/s  187.912 mb/s  1503.296 mbit
…

(1) Something goes wrong in the last column. The value is a bit weird. E.g. if I calculate 1713*188*8 I get to 2,576,352 bit/s = 2.58 Mbit/s. Note how your result is 2[,576,]352? If I do the calculation for the video data: 965624*188*8 / 1000 / 1000 = 1452.298496, note how your result is 1452.[298]496? It seems it simply cuts out 3 chars in the middle to get to the result?

Or I don't understand this at all. Evidently I'm confused by it. 😎

(2) There's also a magical "pid 2000" which doesn't exist in the original stream. I guess it's a way to say "Totals"?

(3) The output is unaligned which makes it hard to read.

In the example "pid 0000" (PAT) and "pid 040e" (no idea) have minimal amount of packets/s, but it looks like it calculates a way higher Mbit/s than for the video stream with "pid 100e". Having 3 fractional digits adds to the confusion with a thousand separator.

(4) in the 2nd value column it uses "kb", and "mb". That's highly confusing too. "small b" always means bit, but here it seems to refer to Byte. Those units should be capitalized. (personally I also would prefer MiB and KiB (aka power of 2 units), but that's another story. 😎) Similar it also should be "Mbit", or probably "Mbit/s" even for the last column.

What I did expect to see:

…
pid 0x0000:   1713 p/s  322.04 KB/s     2.58 Mbit/s
pid 0x040e:   1713 p/s  322.04 KB/s     2.58 Mbit/s
pid 0x100e: 965624 p/s  181.31 MB/s  1452.30 Mbit/s
pid 0x104e:  30640 p/s    5.32 MB/s    46.08 Mbit/s
pid 0x120e:    134 p/s   25.19 KB/s   201.54 Kbit/s
    Totals: 999824 p/s  187.91 MB/s  1503.74 Mbit/s
…

(5) It somehow should make more clear (e.g. in the usage output) that this is the "processing performance" of dvbtee, and not the actual stream bitrates of the input file (e.g. I do dvbtee -b < some_recording.ts)

gcc 6 issue

cross compiling anyway:

libtool: compile: i686-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I.. -I./decode -I./decode/table -I/usr/include/libhdhomerun -I/usr/lib/libhdhomerun -I/opt/local/include -pthread -D__STDC_FORMAT_MACROS -g -O2 -MT curlhttpget.lo -MD -MP -MF .deps/curlhttpget.Tpo -c curlhttpget.cpp -o curlhttpget.o
In file included from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/c++/6.1.0/stdlib.h:36:0,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/combaseapi.h:129,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/objbase.h:14,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/ole2.h:17,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/wtypes.h:12,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/winscard.h:10,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/windows.h:97,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/winsock2.h:23,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/ws2tcpip.h:17,
from dvbtee_config.h:48,
from curlhttpget.cpp:22:
/home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/c++/6.1.0/cstdlib:146:11: error: '::malloc' has not been declared
using ::malloc;
^~~~~~
In file included from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/combaseapi.h:129:0,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/objbase.h:14,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/ole2.h:17,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/wtypes.h:12,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/winscard.h:10,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/windows.h:97,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/winsock2.h:23,
from /home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/ws2tcpip.h:17,
from dvbtee_config.h:48,
from curlhttpget.cpp:22:
/home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/c++/6.1.0/stdlib.h:65:12: error: 'std::malloc' has not been declared
using std::malloc;
^~~~~~
Makefile:535: recipe for target 'curlhttpget.lo' failed
make[2]: *** [curlhttpget.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/win32/libdvbtee/libdvbtee'
Makefile:478: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/win32/libdvbtee'
Makefile:383: recipe for target 'all' failed
make: *** [all] Error 2

mingw compile failure

erve.cpp: In member function 'bool
serve_client::cmd_tuner_scan_channels_save()':
serve.cpp:1192:21: error: too many arguments to function 'int
mkdir(const char*)'
if (mkdir(dir, 0777) < 0) {
^
In file included from
/Users/packrd/dev/ruby/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/fcntl.h:8:0,
from serve.cpp:27:
/Users/packrd/dev/ruby/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/include/io.h:280:15:
note: declared here
int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
^
make[2]: *** [serve.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Cheers!

decoder c++ templates in decoder branch appear to be misaligned at runtime when built with CLANG

1444781573 feed::libdvbtee_set_debug_level: (0xff)
1444781573 rbuf::rbuf: ()
1444781573 listen::socket_listen: ()
1444781573 out::output: ()
1444781573 parse::parse: ()
1444781573 listen::socket_listen: ()
1444781573 feed::feed: ()
1444781573 tune::tune: ()
1444781573 linuxtv_tuner::linuxtv_tuner: ()
1444781573 linuxtv_tuner::set_device_ids: (0, 0, 0, 0)
open_fe: using /dev/dvb/adapter0/frontend0
scan channel 44...
tuned to 653000000
1444781576 parse::reset: ()
1444781576 parse::detach_demux: ()
SCVYL 1444781577 linuxtv_tuner::start_feed: ()
start_feed: using /dev/dvb/adapter0/demux0
1444781578 feed::set_filename: (/dev/dvb/adapter0/dvr0)
1444781578 feed::_open_file: ()
_open_file: using /dev/dvb/adapter0/dvr0
1444781578 feed::file_feed_thread: (fd=6)
1444781578 parse::take_pat: (pre): v1, ts_id: 2161
1444781578 parse::set_ts_id: (0871|2161)

1444781578 decode::decode: ()
1444781578 decode::decode: (copy)
1444781578 decode::decode: (copy)
1444781578 decode::~decode: (ffff|65535)
1444781578 decode::~decode: (ffff|65535)
store PAT: v0, ts_id: 168
152 | 0
136 | 0
120 | 0
15296 | 0
136 | 0
signal_callback_handler: caught signal 11: SIGSEGV
1444781578 feed::close_file: ()
1444781578 parse::cleanup: ()
1444781578 parse::detach_demux: ()
1444781578 decode::~decode: (ffff|65535)
1444781578 feed::close_file: ()
1444781578 parse::cleanup: ()
1444781578 parse::detach_demux: ()
signal_callback_handler: caught signal 6: SIGABRT
1444781578 feed::close_file: ()
1444781578 parse::cleanup: ()
1444781578 parse::detach_demux: ()
1444781578 feed::close_file: ()
1444781578 parse::cleanup: ()
1444781578 parse::detach_demux: ()
signal_callback_handler: caught signal 6: SIGABRT
1444781578 feed::close_file: ()
1444781578 parse::cleanup: ()
1444781578 parse::detach_demux: ()
1444781578 feed::close_file: ()
1444781578 parse::cleanup: ()

*** Error in /home/mk/libdvbtee/dvbtee/.libs/lt-dvbtee': double free or corruption (out): 0x00007f7f00000900 *** *** Error in/home/mk/libdvbtee/dvbtee/.libs/lt-dvbtee': double free or corruption (out): 0x00007f7f00000900 ***
*** Error in `/home/mk/libdvbtee/dvbtee/.libs/lt-dvbtee': double free or corruption (out): 0x00007f7f00000900 ***

...when built using GCC all works properly:

~/libdvbtee$ ./test.sh -a0 -c44 -s -d

dvbtee v0.3.8 - http://github.com/mkrufky/libdvbtee

1444780810 feed::libdvbtee_set_debug_level: (0xff)
1444780810 rbuf::rbuf: ()
1444780810 listen::socket_listen: ()
1444780810 out::output: ()
1444780810 parse::parse: ()
1444780810 listen::socket_listen: ()
1444780810 feed::feed: ()
1444780810 tune::tune: ()
1444780810 linuxtv_tuner::linuxtv_tuner: ()
1444780810 linuxtv_tuner::set_device_ids: (0, 0, 0, 0)
open_fe: using /dev/dvb/adapter0/frontend0
scan channel 44...
tuned to 653000000
1444780810 parse::reset: ()
1444780810 parse::detach_demux: ()
SCVYL 1444780810 linuxtv_tuner::start_feed: ()
start_feed: using /dev/dvb/adapter0/demux0
1444780811 feed::set_filename: (/dev/dvb/adapter0/dvr0)
1444780811 feed::_open_file: ()
_open_file: using /dev/dvb/adapter0/dvr0
1444780811 feed::file_feed_thread: (fd=6)
1444780811 parse::take_pat: (pre): v1, ts_id: 2161
1444780811 parse::set_ts_id: (0871|2161)

1444780811 decode::decode: ()
1444780811 decode::decode: (copy)
1444780811 decode::decode: (copy)
1444780811 decode::~decode: (ffff|65535)
1444780811 decode::~decode: (ffff|65535)
store PAT: v1, ts_id: 2161
3 | 30
4 | 40
5 | 50
1444780811 [PAT]::store: { 'programs': [ { 'number': 3, 'pid': 48 }, { 'number': 4, 'pid': 64 }, { 'number': 5, 'pid': 80 } ], 'tableId': 0, 'tableName': 'PAT', 'tsId': 2161, 'version': 1 }
1444780811 decode::updateTable: 0x00
1444780811 decode::updatePAT: tsid 0871, ver 01, 3 programs
1444780811 parse::take_pat: (post): v1, ts_id: 2161
1444780811 parse::process_pat: ()
1444780811 parse::set_detach: attaching table c7|0000...
1444780811 parse::take_mgt: (pre): v1
store MGT: v1
table type | pid | ver | bytes
0x0000 | 0x1ffb | 1 | 169
0x0100 | 0x1388 | 3 | 760
0x0101 | 0x1389 | 2 | 954
0x0102 | 0x138a | 2 | 1110
0x0103 | 0x138b | 1 | 907
0x0104 | 0x138c | 1 | 739
0x0105 | 0x138d | 1 | 864
0x0106 | 0x138e | 1 | 730
0x0107 | 0x138f | 1 | 905
0x0200 | 0x1408 | 3 | 2625
0x0201 | 0x1409 | 2 | 3119
0x0202 | 0x140a | 2 | 1885
0x0203 | 0x140b | 1 | 2346
0x0204 | 0x140c | 1 | 2259
0x0205 | 0x140d | 1 | 2432
0x0206 | 0x140e | 1 | 1969
0x0207 | 0x140f | 1 | 3271
1444780811 [MGT]::store: { 'tableId': 199, 'tableName': 'MGT', 'tables': [ { 'bytes': 169, 'pid': 8187, 'type': 0, 'version': 1 }, { 'bytes': 760, 'pid': 5000, 'type': 256, 'version': 3 }, { 'bytes': 954, 'pid': 5001, 'type': 257, 'version': 2 }, { 'bytes': 1110, 'pid': 5002, 'type': 258, 'version': 2 }, { 'bytes': 907, 'pid': 5003, 'type': 259, 'version': 1 }, { 'bytes': 739, 'pid': 5004, 'type': 260, 'version': 1 }, { 'bytes': 864, 'pid': 5005, 'type': 261, 'version': 1 }, { 'bytes': 730, 'pid': 5006, 'type': 262, 'version': 1 }, { 'bytes': 905, 'pid': 5007, 'type': 263, 'version': 1 }, { 'bytes': 2625, 'pid': 5128, 'type': 512, 'version': 3 }, { 'bytes': 3119, 'pid': 5129, 'type': 513, 'version': 2 }, { 'bytes': 1885, 'pid': 5130, 'type': 514, 'version': 2 }, { 'bytes': 2346, 'pid': 5131, 'type': 515, 'version': 1 }, { 'bytes': 2259, 'pid': 5132, 'type': 516, 'version': 1 }, { 'bytes': 2432, 'pid': 5133, 'type': 517, 'version': 1 }, { 'bytes': 1969, 'pid': 5134, 'type': 518, 'version': 1 }, { 'bytes': 3271, 'pid': 5135, 'type': 519, 'version': 1 } ], 'version': 1 }
1444780811 decode::updateTable: 0xc7
1444780811 parse::take_mgt: (post): v1
1444780812 parse::take_pmt: (pre): v0, service_id 3, pcr_pid 49
store PMT: v0, service_id 3, pcr_pid 49
1444780812 DESCRIPTOR::decode: failed to decode descriptor! tag: 10
es_pid | type
1444780812 DESCRIPTOR::decode: failed to decode descriptor! tag: 06
31 | 0x02 (Video MPEG-2) |
1444780812 [iso639 lang]::desc_0a: { 'ISO639Lang': [ { 'audioType': 0, 'language': 'eng' } ], 'descriptorTag': 10 }
1444780812 [ac-3 audio]::desc_81: { 'bitRateCode': 10, 'bsid': 8, 'bsmod': 0, 'description': '', 'descriptorTag': 129, 'fullSvc': true, 'language': 'eng', 'numChannels': '2/0', 'sampleRate': '48 or 44.1 or 32', 'surroundMode': 'Not indicated' }
34 | 0x81 (Audio AC3 (ATSC)) | eng
1444780812 [iso639 lang]::desc_0a: { 'ISO639Lang': [ { 'audioType': 0, 'language': 'spa' } ], 'descriptorTag': 10 }
1444780812 [ac-3 audio]::desc_81: { 'bitRateCode': 10, 'bsid': 8, 'bsmod': 0, 'description': '', 'descriptorTag': 129, 'fullSvc': true, 'language': 'spa', 'numChannels': '2/0', 'sampleRate': '48 or 44.1 or 32', 'surroundMode': 'Not indicated' }
35 | 0x81 (Audio AC3 (ATSC)) | spa
1444780812 [PMT]::store: { 'pcrPid': 49, 'program': 3, 'streams': [ { 'pid': 49, 'streamType': 2, 'streamTypeString': 'Video MPEG-2' }, { 'descriptors': [ { 'ISO639Lang': [ { 'audioType': 0, 'language': 'eng' } ], 'descriptorTag': 10 }, { 'bitRateCode': 10, 'bsid': 8, 'bsmod': 0, 'description': '', 'descriptorTag': 129, 'fullSvc': true, 'language': 'eng', 'numChannels': '2/0', 'sampleRate': '48 or 44.1 or 32', 'surroundMode': 'Not indicated' } ], 'pid': 52, 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' }, { 'descriptors': [ { 'ISO639Lang': [ { 'audioType': 0, 'language': 'spa' } ], 'descriptorTag': 10 }, { 'bitRateCode': 10, 'bsid': 8, 'bsmod': 0, 'description': '', 'descriptorTag': 129, 'fullSvc': true, 'language': 'spa', 'numChannels': '2/0', 'sampleRate': '48 or 44.1 or 32', 'surroundMode': 'Not indicated' } ], 'pid': 53, 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' } ], 'tableId': 2, 'tableName': 'PMT', 'version': 0 }
1444780812 decode::updateTable: 0x02
1444780812 parse::take_pmt: (post): v0, service_id 3, pcr_pid 49
1444780812 parse::process_pmt: : v0, service_id 3, pcr_pid 49
1444780812 parse::take_pmt: (pre): v0, service_id 4, pcr_pid 65
store PMT: v0, service_id 4, pcr_pid 65
1444780812 DESCRIPTOR::decode: failed to decode descriptor! tag: 10
es_pid | type
1444780812 DESCRIPTOR::decode: failed to decode descriptor! tag: 06
41 | 0x02 (Video MPEG-2) |
1444780812 [iso639 lang]::desc_0a: { 'ISO639Lang': [ { 'audioType': 0, 'language': 'eng' } ], 'descriptorTag': 10 }
1444780812 [ac-3 audio]::desc_81: { 'bitRateCode': 10, 'bsid': 8, 'bsmod': 0, 'description': '', 'descriptorTag': 129, 'fullSvc': true, 'language': 'eng', 'numChannels': '2/0', 'sampleRate': '48 or 44.1 or 32', 'surroundMode': 'Not indicated' }
44 | 0x81 (Audio AC3 (ATSC)) | eng
1444780812 [PMT]::store: { 'pcrPid': 65, 'program': 4, 'streams': [ { 'pid': 65, 'streamType': 2, 'streamTypeString': 'Video MPEG-2' }, { 'descriptors': [ { 'ISO639Lang': [ { 'audioType': 0, 'language': 'eng' } ], 'descriptorTag': 10 }, { 'bitRateCode': 10, 'bsid': 8, 'bsmod': 0, 'description': '', 'descriptorTag': 129, 'fullSvc': true, 'language': 'eng', 'numChannels': '2/0', 'sampleRate': '48 or 44.1 or 32', 'surroundMode': 'Not indicated' } ], 'pid': 68, 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' } ], 'tableId': 2, 'tableName': 'PMT', 'version': 0 }
1444780812 decode::updateTable: 0x02
1444780812 parse::take_pmt: (post): v0, service_id 4, pcr_pid 65
1444780812 parse::process_pmt: : v0, service_id 4, pcr_pid 65
1444780812 parse::take_pmt: (pre): v0, service_id 5, pcr_pid 81
store PMT: v0, service_id 5, pcr_pid 81
1444780812 DESCRIPTOR::decode: failed to decode descriptor! tag: 10
es_pid | type
1444780812 DESCRIPTOR::decode: failed to decode descriptor! tag: 06
51 | 0x02 (Video MPEG-2) |
1444780812 [iso639 lang]::desc_0a: { 'ISO639Lang': [ { 'audioType': 0, 'language': 'eng' } ], 'descriptorTag': 10 }
1444780812 [ac-3 audio]::desc_81: { 'bitRateCode': 10, 'bsid': 8, 'bsmod': 0, 'description': '', 'descriptorTag': 129, 'fullSvc': true, 'language': 'eng', 'numChannels': '2/0', 'sampleRate': '48 or 44.1 or 32', 'surroundMode': 'Not indicated' }
54 | 0x81 (Audio AC3 (ATSC)) | eng
1444780812 [PMT]::store: { 'pcrPid': 81, 'program': 5, 'streams': [ { 'pid': 81, 'streamType': 2, 'streamTypeString': 'Video MPEG-2' }, { 'descriptors': [ { 'ISO639Lang': [ { 'audioType': 0, 'language': 'eng' } ], 'descriptorTag': 10 }, { 'bitRateCode': 10, 'bsid': 8, 'bsmod': 0, 'description': '', 'descriptorTag': 129, 'fullSvc': true, 'language': 'eng', 'numChannels': '2/0', 'sampleRate': '48 or 44.1 or 32', 'surroundMode': 'Not indicated' } ], 'pid': 84, 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' } ], 'tableId': 2, 'tableName': 'PMT', 'version': 0 }
1444780812 decode::updateTable: 0x02
1444780812 parse::take_pmt: (post): v0, service_id 5, pcr_pid 81
1444780812 parse::process_pmt: : v0, service_id 5, pcr_pid 81
1444780812 parse::set_detach: attaching table c8|0871...
1444780812 parse::take_vct: (pre): v1, ts_id 2161, b_cable_vct 0
1444780812 parse::set_ts_id: (0871|2161)

store VCT: v1, ts_id 2161, b_cable_vct 0
1444780812 [VCT]::store: parsing channel descriptors for mux:
channel | service_id | source_id | service_name
1444780812 [VCT]::vctCh: parsing channel descriptors for service: 3
1444780812 [service location]::desc_a1: { 'descriptorTag': 161, 'serviceLocation': [ { 'esPid': 49, 'streamType': 2, 'streamTypeString': 'Video MPEG-2' }, { 'esPid': 52, 'lang': 'eng', 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' }, { 'esPid': 53, 'lang': 'spa', 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' } ] }
5.1 | 3 | 1 | WNYW | eng, spa
1444780812 [VCT]::vctCh: parsing channel descriptors for service: 5
1444780812 [service location]::desc_a1: { 'descriptorTag': 161, 'serviceLocation': [ { 'esPid': 81, 'streamType': 2, 'streamTypeString': 'Video MPEG-2' }, { 'esPid': 84, 'lang': 'eng', 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' } ] }
5.2 | 5 | 5 | Movies! | eng
1444780812 [VCT]::vctCh: parsing channel descriptors for service: 4
1444780812 [service location]::desc_a1: { 'descriptorTag': 161, 'serviceLocation': [ { 'esPid': 65, 'streamType': 2, 'streamTypeString': 'Video MPEG-2' }, { 'esPid': 68, 'lang': 'eng', 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' } ] }
9.2 | 4 | 4 | WWOR-SD | eng
1444780812 [VCT]::store: { 'channels': [ { 'accessControlled': false, 'carrierFreq': 0, 'descriptors': [ { 'descriptorTag': 161, 'serviceLocation': [ { 'esPid': 49, 'streamType': 2, 'streamTypeString': 'Video MPEG-2' }, { 'esPid': 52, 'lang': 'eng', 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' }, { 'esPid': 53, 'lang': 'spa', 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' } ] } ], 'etmLocation': 0, 'hidden': false, 'hideGuide': false, 'major': 5, 'minor': 1, 'modulation': 4, 'outOfBand': true, 'pathSelect': true, 'program': 3, 'serviceName': 'WNYW ', 'serviceType': 2, 'sourceId': 1, 'tsId': 2161 }, { 'accessControlled': false, 'carrierFreq': 0, 'descriptors': [ { 'descriptorTag': 161, 'serviceLocation': [ { 'esPid': 81, 'streamType': 2, 'streamTypeString': 'Video MPEG-2' }, { 'esPid': 84, 'lang': 'eng', 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' } ] } ], 'etmLocation': 0, 'hidden': false, 'hideGuide': false, 'major': 5, 'minor': 2, 'modulation': 4, 'outOfBand': true, 'pathSelect': true, 'program': 5, 'serviceName': 'Movies!', 'serviceType': 2, 'sourceId': 5, 'tsId': 2161 }, { 'accessControlled': false, 'carrierFreq': 0, 'descriptors': [ { 'descriptorTag': 161, 'serviceLocation': [ { 'esPid': 65, 'streamType': 2, 'streamTypeString': 'Video MPEG-2' }, { 'esPid': 68, 'lang': 'eng', 'streamType': 129, 'streamTypeString': 'Audio AC3 (ATSC)' } ] } ], 'etmLocation': 0, 'hidden': false, 'hideGuide': false, 'major': 9, 'minor': 2, 'modulation': 4, 'outOfBand': true, 'pathSelect': true, 'program': 4, 'serviceName': 'WWOR-SD', 'serviceType': 2, 'sourceId': 4, 'tsId': 2161 } ], 'isCableVCT': false, 'tableId': 200, 'tableName': 'VCT', 'tsId': 2161, 'version': 1 }
1444780812 decode::updateTable: 0xc8
1444780812 parse::take_vct: (post): v1, ts_id 2161, b_cable_vct 0
1444780812 feed::stop: ()
1444780812 listen::stop: ()
1444780812 feed::stop: waiting...
1444780812 feed::close_file: ()
1444780812 feed::stop: done
1444780812 feed::close_file: ()

channel 44, 653000000,

5.1-WNYW :653000000:8VSB:49:52:3
9.2-WWOR-SD:653000000:8VSB:65:68:4
5.2-Movies!:653000000:8VSB:81:84:5
found 3 services
1444780812 feed::stop: ()
1444780812 listen::stop: ()
1444780812 feed::stop: waiting...
1444780812 feed::stop: done
1444780812 feed::close_file: ()
1444780812 parse::cleanup: ()
1444780812 parse::detach_demux: ()
1444780812 decode::~decode: (0871|02161)
1444780812 feed::stop: ()
1444780812 listen::stop: ()
1444780812 feed::stop: waiting...
1444780812 feed::stop: done
1444780812 feed::close_file: ()
1444780812 parse::cleanup: ()
1444780812 parse::detach_demux: ()
1444780812 feed::~feed: ()
1444780812 feed::close_file: ()
1444780812 listen::~socket_listen: ()
1444780812 listen::close_socket: ()
1444780812 parse::~parse: ()
1444780812 parse::cleanup: ()
1444780812 parse::detach_demux: ()
1444780812 out::~output: ()
1444780812 out::stop: ()
1444780812 out::~output: (intermediate) 0 packets in, 0 packets out, 0 packets remain in rbuf
1444780812 listen::~socket_listen: ()
1444780812 listen::close_socket: ()
1444780812 rbuf::~rbuf: ()
1444780812 rbuf::dealloc: ()

How do I know HDHomeRun is working?

voltagex@boxodisks:~/src/libdvbtee$ ./dvbtee/dvbtee -H 123382A1 -S -d
# dvbtee v0.6.7 - http://github.com/mkrufky/libdvbtee

1569412472 LOG::libdvbtee_set_debug_level: (0xff)
1569412472 rbuf::rbuf: ()
1569412472 listen::socket_listen: ()
1569412472 out::output: ()
1569412472 parse::init: ()
1569412472 listen::socket_listen: ()
1569412472 feed::feed: ()
1569412472 tune::tune: ()
1569412472 linuxtv_tuner::linuxtv_tuner: ()
1569412472 listen::socket_listen: ()
1569412472 server::serve: ()
1569412472 server::start_monitor: ()
1569412472 server::start: (64080)
1569412472 listen::start: ()
1569412472 server::check: ()
1569412472 server::reclaim_server_resources: ()
1569412472 server::reclaim_tuner_resources: ()
1569412472 linuxtv_tuner::check: tuner not configured!
1569412472 linuxtv_tuner::start_feed: ()
1569412472 listen::listen_thread: (3)
start_feed: failed to open /dev/dvb-1.demux-1
1569412487 server::check: ()
1569412487 server::reclaim_server_resources: ()
1569412487 server::reclaim_tuner_resources: ()
1569412487 linuxtv_tuner::check: tuner not configured!

it seems like it's not even trying to use the HDHomeRun device. Note that if I use ./hdhomerun_config 123382A1 set /tuner1/target udp://10.1.1.2:5000/ I can receive data via UDP but I'm hoping to use dvbtee as an EPG grabber

Filename with comma breaks

Running the command line specifying an output file containing a comma, produces a strange behavior:

dvbtee -C2 -I2 "-ofile://filename with, comma.ts"

Outputs a broken file of 0 bytes named filename with. I searched around and could not find a , comma.ts file on the filesystem anywhere. Not sure if the comma is a special control character or if this is a bug.

Bug? "starttime" and "lengthSec" time values not converting to human readable times

Just trying to convert the time information for use but having difficulties! .... Below example for the two fields "LengthSec" and "startTime" that don't seem to convert into human readable timespans or datetimes... tried Ticks/Epoch/Milliseconds etc :-)

For example:
{ "descriptors":[ { "descriptorTag":77, "lang":"eng", "name":"Just Jazz", "text":"Just Jazz. Track info at abc.net.au/jazz" } ], "eventId":2299, "f_free_ca":false, "lengthSec":136448, "runningStatus":1, "startTime":965395694848 }

Full outputs below!

http://adgile.blob.core.windows.net/general/ABC_Network.txt
http://adgile.blob.core.windows.net/general/Nine_Network.txt
http://adgile.blob.core.windows.net/general/TEN_Network.txt
http://adgile.blob.core.windows.net/general/SBS_Network.txt
http://adgile.blob.core.windows.net/general/Seven_Network.txt

Thanks!

Typo in `configure`

Hi there,
Using the build-auto.sh to install in a new Ubuntu server today, and the process tripped up on some typos in configure.
Line 18533: Line not commented. Also the 'if' beneath it is inset one place! No biggy.

Thanks so much for such a great tool. We use if for off-air TV recording at the BFI National Archive now:
https://www.youtube.com/watch?v=xZ7-LzYTOho

All the very best,
Joanna

UDP stream input doesn't work

Hello,
I builded libdvbtee on Debian 7 x64. After running this command:

root@test:~/libdvbtee/dvbtee# ./dvbtee -iudp://239.1.1.1:1234/ -t10 -d -s
# dvbtee v0.5.4 - http://github.com/mkrufky/libdvbtee

1495452659 LOG::libdvbtee_set_debug_level: (0xff)
1495452659 rbuf::rbuf: ()
1495452659 listen::socket_listen: ()
1495452659 out::output: ()
1495452659 parse::init: ()
1495452659 listen::socket_listen: ()
1495452659 feed::feed: ()
1495452659 tune::tune: ()
1495452659 linuxtv_tuner::linuxtv_tuner: ()
1495452659 feed::start_socket: ()
1495452659 feed::start_socket: (<--udp://239.1.1.1:1234/)
1495452659 feed::start_udp_unbound_listener: (1234)
1495452659 feed::start_socket: ~(-->udp)
1495452659 feed::udp_listen_feed_thread: (sock_fd=3)
^C1495452661 feed::close_file: ()
1495452661 parse::cleanup: ()
1495452661 parse::detach_demux: ()
1495452661 feed::close_file: ()
1495452661 parse::cleanup: ()
1495452661 parse::detach_demux: ()

iptraf doesn't show any UDP packets so it's not pulling or something. My todo is to parse EPG from multicast TS stream. I tested this on node-dvbtee but I can't figure out how.

Thanks

scanning for channels gets stuck on "_open_file"

Built on raspberry pi 4 running nodejs v14.

Build instructions:
git clone https://github.com/mkrufky/libdvbtee.git
cd libdvbtee
./build-auto.sh
sudo cp -rp dvbtee /opt/
sudo ln -s /opt/dvbtee/dvbtee /usr/local/bin

Command to scan:
dvbtee -s -a0 > out.tmp

Results:
scan appears to run but gets stuck on the following line, resulting in a file with only "# dvbtee v0.6.7 - http://github.com/mkrufky/libdvbtee" written at the top.

...
store PMT: v14, service_id 3, pcr_pid 49
es_pid | type
31 | 0x02 (Video MPEG-2) |
34 | 0x81 (Audio AC3 (ATSC)) | eng
35 | 0x81 (Audio AC3 (ATSC)) | spa
store PMT: v14, service_id 5, pcr_pid 81
es_pid | type
51 | 0x02 (Video MPEG-2) |
54 | 0x81 (Audio AC3 (ATSC)) | eng
scan channel 26...
tuned to 545000000
scan channel 27...
tuned to 551000000
SCVYL start_feed: using /dev/dvb/adapter0/demux0
_open_file: using /dev/dvb/adapter0/dvr0

dvbtee hanging with -q option

Recently dvbtee stopped producing a nice channel list for me when running the scan command with

dvbtee/dvbtee -s -a0 -q > channels.conf

It seems to be running fine without the -q option and ultimately processes channels.conf after several minutes, which is what it used to do in the past.

STDOUT PIPE

Hi,

I need some help. In the README page appears this first example:
dvbtee -c33 -I1 -oudp://192.168.1.100:1234

But I want to pipe the stream like I do with the dvbstream tool. So my objetive is something like:
dvbtee -c33 -I1 -o- | vlc -

The idea is to support -o- or -o/dev/stdout or something similar.
Any help?
Thank you!

Error when running ./build-auto.sh

OS: Ubuntu SERVER 16.04.3 LTS (GNU/Linux 4.4.0-112-generic x86_64)

./configure: line 17269: syntax error near unexpected token 0.20' ./configure: line 17269: PKG_PROG_PKG_CONFIG(0.20)'
make: Entering directory '/home/user/libdvbtee-master'
make: *** No targets specified and no makefile found. Stop.
make: Leaving directory '/home/user/libdvbtee-master'
make failed

Multicast UDP Stream PSI Data colection error

Hi, I was hoping you might be able to help.

I'm using a windows compiled version of dvbtee and am trying to pull the PSI data from a multicast UDP stream. But I seem to be getting an error.

The line I'm using is:
dvbtee -iudp://239.255.1.201:5004 -O3 -ofile://output.ts -d

my output is:
1527154273 LOG::libdvbtee_set_debug_level: (0xff)
1527154273 out::__add: (0->file://output.ts)
1527154273 rbuf::rbuf: ()
1527154273 out::output_stream: ()
1527154273 out::add: (-->file://output.ts)
1527154273 out::add: opening output.ts...
1527154273 rbuf::reset: ()
1527154273 out::__add: ~(0->file)
1527154273 out::start: ()
1527154273 out::start: (3)
1527154273 rbuf::set_capacity: (260568)
1527154273 parse::add_output: success adding url target id: 0
1527154273 feed::start_socket: ()
1527154273 feed::start_socket: (<--udp://239.255.1.201:5004)
1527154273 out::output_stream_thread: (3)
1527154273 feed::start_udp_unbound_listener: (5004)
bind to local interface failed: No error
1527154273 feed::start_socket: ~(-->udp)
1527154273 feed::stop: ()
1527154273 listen::stop: ()
1527154273 feed::stop: waiting...

I might be getting this completely backwards but I was hoping you might be able to point me in the right direction. Though if I loose the port number I get an output file but empty.

Many Thanks in advance James

Use with WinTV-QuadHD tuner card?

Hello,

I have just purchased a WinTV-QuadHD tuner card for use my Ubuntu 20.04 system and am just now learning more about this whole area of media.

I was looking for a small, fast, and easy to use C/C++ library that I can work with the WinTV-QuadHD card to get media streams, (MPEG-2) I think that it has to be, so that I can stream them to other applications from tuners.

Your library seems like it could do the job, but I am not sure and wanted to ask for advice and perhaps some guidance.
Cheers

DMX_SET_PES_FILTER failed: Invalid argument on 3 different DVB devices

Hi,

I've compiled the dvbtee and when I'm trying to run over a specific device always I'm getting this error.

# ./dvbtee/dvbtee -d -a3 -f0
# dvbtee v0.6.8 - http://github.com/mkrufky/libdvbtee

1684609842 LOG::libdvbtee_set_debug_level: (0xff)
1684609842 rbuf::rbuf: ()
1684609842 listen::socket_listen: ()
1684609842 out::output: ()
1684609842 parse::init: ()
1684609842 listen::socket_listen: ()
1684609842 feed::feed: ()
1684609842 tune::tune: ()
1684609842 linuxtv_tuner::linuxtv_tuner: ()
1684609842 linuxtv_tuner::set_device_ids: (3, 0, 0, 0)
1684609842 linuxtv_tuner::start_feed: ()
start_feed: using /dev/dvb/adapter3/demux0
DMX_SET_PES_FILTER failed: Invalid argument
1684609842 linuxtv_tuner::clear_filters: ()
1684609842 feed::stop: ()
1684609842 listen::stop: ()
1684609842 feed::stop: waiting...
1684609842 feed::stop: done
1684609842 feed::close_file: ()
1684609842 parse::cleanup: ()
1684609842 parse::detach_demux: ()
1684609842 feed::stop: ()
1684609842 listen::stop: ()
1684609842 feed::stop: waiting...
1684609842 feed::stop: done
1684609842 feed::close_file: ()
1684609842 linuxtv_tuner::clear_filters: ()
1684609842 linuxtv_tuner::clear_filters: ()
1684609842 parse::cleanup: ()
1684609842 parse::detach_demux: ()
1684609842 feed::~feed: ()
1684609842 feed::close_file: ()
1684609842 listen::~socket_listen: ()
1684609842 listen::close_socket: ()
1684609842 parse::~parse: ()
1684609842 parse::cleanup: ()
1684609842 parse::detach_demux: ()
1684609842 out::~output: ()
1684609842 out::stop: ()
1684609842 out::~output: (intermediate) 0 packets in, 0 packets out, 0 packets remain in rbuf
1684609842 listen::~socket_listen: ()
1684609842 listen::close_socket: ()
1684609842 rbuf::~rbuf: ()
1684609842 rbuf::dealloc: ()

Even is installed fully on my computer and removed the Debian libdvbpsi lib.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.