Linux VLC and DVB-T2 (HD)

*nix specific usage questions
ljones
New Cone
New Cone
Posts: 4
Joined: 04 Jun 2012 14:50

Linux VLC and DVB-T2 (HD)

Postby ljones » 04 Jun 2012 15:10

Hello all :) !

Having a bit of a problem with VLC,DVB-T2 (HD TV) and linux here. What I'm trying to is to record using vlc a digital TV channel (actually BBC HD; I'm in the UK) into a file. However I'm running into a problem. I can view the HD channel without any problems, but recording it dosen't seem to work quite so well -- it stops recording roughly 30 seconds in.

The system I'm using is running slackware current 64 bit, CPU is an AMD FX 4100 quad core with 8GB Ram instaleld running on a PCIe Radeon HD 4850 video card. The DVB T/T2 is USB based and shows as USB ID 2013:024f (Pinnacle T2 290e). Kernel version is 3.2.13. The VLC version I'm using is 2.0.1

While playing a TV channel (for example BBC HD) I get the following messages if I start VLC from the command line (so I can see the messages);

Code: Select all

libdvbpsi error (PSI decoder): TS discontinuity (received 3, expected 0) for PID 0 libdvbpsi error (PSI decoder): TS discontinuity (received 1, expected 0) for PID 18 libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 0) for PID 20 libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 0) for PID 100 [0x7f38ccc2ca18] ts demux error: MPEG-4 descriptor not found [0x7f38ccc2ca18] ts demux error: MPEG-4 descriptor not found [0x7f38cc225cf8] packetizer_mpeg4audio packetizer: AAC channels: 6 samplerate: 48000 libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 0) for PID 17 [h264 @ 0x7f38cc10d580] mmco: unref short failure [h264 @ 0x7f38cc10d580] mmco: unref short failure [h264 @ 0x7f38cc10d580] Increasing reorder buffer to 1 [h264 @ 0x7f38cc1697e0] Increasing reorder buffer to 2 [h264 @ 0x7f38cc1c5a40] Increasing reorder buffer to 3 [h264 @ 0x7f38cc1697e0] mmco: unref short failure [h264 @ 0x7f38cc1697e0] concealing 938 DC, 938 AC, 938 MV errors [h264 @ 0x7f38cc10d580] Reference 3 >= 3 [h264 @ 0x7f38cc10d580] error while decoding MB 15 57, bytestream (2981) [h264 @ 0x7f38cc10d580] concealing 394 DC, 394 AC, 394 MV errors
However playback dosen't stop, video is ok audio is ok with no problems.

Here's what I did to try to save (stream) the channel to a file. First I started vlc, loaded in my channels.conf file. I then pressed VLC's stop button then chose view/playlist and chose "playlist" in the top right hand corner. Right clicked "BBC HD" and chose "stream", then "next", then "add" and chose a filename to record into, then untick "activate transcoding" and chose "next" then finally "stream".

I Get the same sort of error messages;

Code: Select all

[0x7f23e4c27d48] ts demux error: MPEG-4 descriptor not found [0x7f23e4c27d48] ts demux error: MPEG-4 descriptor not found [0x7f23e4225b48] packetizer_mpeg4audio packetizer: AAC channels: 6 samplerate: 48000 [h264 @ 0x7f23e410d340] Increasing reorder buffer to 1 [h264 @ 0x7f23e41c5840] Increasing reorder buffer to 2 [h264 @ 0x7f23e410d340] illegal short term buffer state detected [h264 @ 0x7f23e410d340] Increasing reorder buffer to 4 [h264 @ 0x7f23e41c5840] mmco: unref short failure libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 0) for PID 17 libdvbpsi error (PSI decoder): TS discontinuity (received 9, expected 0) for PID 0 libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 0) for PID 18 [0x7f23c0005358] ts demux error: MPEG-4 descriptor not found [0x7f23c0005358] ts demux error: MPEG-4 descriptor not found [0x7f23c0008828] packetizer_mpeg4audio decoder: AAC channels: 6 samplerate: 48000 [h264 @ 0x7f23e4098dc0] Increasing reorder buffer to 1 [h264 @ 0x7f23e41c51c0] Increasing reorder buffer to 2 libdvbpsi error (PSI decoder): TS discontinuity (received 7, expected 0) for PID 17 [h264 @ 0x7f23e4221460] Increasing reorder buffer to 3
Only that it stops recording - roughly about 30 seconds in. Does anyone have any ideas or is it not possible yet to record DVB2/HD using VLC at all yet?

thanks

ljones

Rémi Denis-Courmont
Developer
Developer
Posts: 15236
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Linux VLC and DVB-T2 (HD)

Postby Rémi Denis-Courmont » 04 Jun 2012 16:49

I guess your computer is too slow (or VLC insufficiently optimized if you will) to transcode the HDTV channel live.

Recording should work if you did not transcode though.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ljones
New Cone
New Cone
Posts: 4
Joined: 04 Jun 2012 14:50

Re: Linux VLC and DVB-T2 (HD)

Postby ljones » 04 Jun 2012 16:59

Ok I double checked what I did and definately made sure I unticked "activate transcoding". It still seems to stop unfortunatly. :(

I checked for any error messages after VLC stops but there's nothing at all.

ljones

ljones
New Cone
New Cone
Posts: 4
Joined: 04 Jun 2012 14:50

Re: Linux VLC and DVB-T2 (HD)

Postby ljones » 04 Jun 2012 19:08

Hmm.....ok. While using VLC I noticed that one of the things it does in the GUI (the "stream output") window is that it shows you what command line it is going to use; there's two fields "Source" and "Type". In my case, source looks like this;

Code: Select all

dvb:// :dvb-inversion=2 :dvb-bandwidth=8 :dvb-fec=9 :dvb-fec=9 :dvb-modulation=0 :dvb-transmission=0 :dvb-guard=0 :program=17472 :dvb-frequency=474000000 :dvb-srate=101
Also I read this page and tried to use one of the command line options from the examples, sout. I must admit I really have no idea about using VLC on a command line! (Though I am trying to use the --sout option).

I came up with this (ok, really I pinched most of this from within VLC's stream output window from the gui);

Code: Select all

$ $ vlc dvb:// :dvb-inversion=2 :dvb-bandwidth=8 :dvb-fec=9 :dvb-fec=9 :dvb-modulation=0 :dvb-transmission=0 :dvb-guard=0 :program=17472 :dvb-frequency=474000000 :dvb-srate=101 --sout "#es{access=file}"
Now this seems to work better though now I get two files - one called "stream-0-h264" and another called "stream-0-mp4a". I guess I need to be able to combine these two (as the larger of the two, stream-0-h264 has no sound). Also I'm not sure how to choose which channel by name on the command line.

This did work better and didn't seem to stop so far .... or rather it didn't stop after about 30 seconds. I'm just not sure about specifying the channel name and how to use the --sout option.

ljones

ljones
New Cone
New Cone
Posts: 4
Joined: 04 Jun 2012 14:50

Re: Linux VLC and DVB-T2 (HD)

Postby ljones » 05 Jun 2012 12:28

Some more information!

So far, the closest I've gotten so far to being able to record HD is using this after reading VLC documentation;

Code: Select all

vlc dvb:// :dvb-inversion=2 :dvb-bandwidth=8 :dvb-fec=9 :dvb-fec=9 :dvb-modulation=0 :dvb-transmission=0 :dvb-guard=0 :program=17472 :dvb-frequency=474000000 :dvb-srate=101 --sout="#duplicate{dst=std{access=file,mux=mp4,dst="test1"}"
This works, but I just have a couple of questions. The first - is there any way to specify a channel by name without having to specify all the options there (e.g. instead of saying...

Code: Select all

'dvb-inversion=2 :dvb-bandwidth=8 :dvb-fec=9 :dvb-fec=9 :dvb-modulation=0 :dvb-transmission=0 :dvb-guard=0 :program=17472 :dvb-frequency=474000000'
.... just use something like a channel name, e.g. BBC HD that is stored in channels.conf, for example ....

Code: Select all

vlc dvb://"BBC HD" -channels channels.conf

( I know those aren't real vlc command line options, just giving an example).

The second - is there any way to "auto-detect" the mux type, so instead of saying "mux=mp4" something like autotect, so ....

Code: Select all

-sout="#duplicate{dst=std{access=file,mux=autodetect,dst="test1"}
and not

Code: Select all

-sout="#duplicate{dst=std{access=file,mux=mp4,dst="test1"}
(Again just an example, I know those aren't valid vlc command line options).

I did manage to find another way to record however (though I didn't know about it at first) I found a program called 'gnutv'.

ljones

tarazed
New Cone
New Cone
Posts: 6
Joined: 01 Dec 2007 00:24

Re: Linux VLC and DVB-T2 (HD)

Postby tarazed » 08 Dec 2012 00:30

I don't know how far you got with this but I found your research very useful. I had been running vlc from a panel icon or the command line using the channels.conf file as a playlist. That works fine. My .tzap directory contains channels.conf for SD and xchannels.conf for HD so I have to run separate commands for the two modes. Now with your code for recording the stream I was able to run a one line script from my local bin directory to specify a file via a parameter:

Code: Select all

vlc /home/lcl/.tzap/xchannels.conf --sout="#duplicate{dst=std{access=file,mux=mp4,dst="$1.mp4"}" &
I do not specify the shell because I assume the $<n> syntax works in all shells.

This can be used cosi:

Code: Select all

pvr whatever
or

Code: Select all

pvr TV/whatever
etc., etc.

which brings up vlc with the playlist menu if you had closed down with playlist invoked, otherwise it has to be selected. Jiggle the slider bar to bring the playlist into view and select the channel (double-click) and play away. The stream goes to a file called whatever.mp4 starting at your current directory.

I shall probably write a little ruby-tk script to wrap this in a gui sometime.

Thanks for saving me the effort of RTFM.

Len


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 9 guests