DVB-T(2)?
Just a question to see if anyone has played with DVB reception on a Pi? I have been having a play, with varying degrees of success...
I started off using a PCTV USB TripleStick 292E, which I got for my laptop. My "goto" application for DVB is Kaffeine, which compiled without errors on Slarm64. However, whilst it scanned and found all my local DVB channels, it wouldn't actually play them! At best I would occasionally get a few "blocks" of noise, as if the signal level were marginal, but no actual pictures. My next stop was the DVB utilities. I used dvbv5-scan to get a channels file for my local transmitter, and then used Code:
dvbv5-zap --lna=1 -c dvb/BeaconHillv5.conf "BBC ONE HD" -r Code:
mpv /dev/dvb/adapter0/dvr0 This works flawlessly, and by adding Code:
-o /path/to/recordings/filename.mts This is clumsy, however, as you need two terminals open - one for tuning (dvbv5-zap) and the other for mpv. Trying to tune mpv directly from Smplayer works, but has a very high cpu useage and is jittery. Trying to tune from VLC using an xspf playlist also doesn't work, producing no output at all - just like Kaffeine. Probably not too surprising, as Kaffeine uses libvlc. I did wonder if the problem was not being able to enable the lna in Smplayer or VLC, so I invested in a Pi TV uHAT (very cheap on Amazon, at the moment!). This doesn't use an LNA, but exactly the same issues arise. Raspbian recommend TVHeadend and Kodi. I have used these in the past on x86_64, but TVHeadend needs to be started before Kodi, and needs to be manually terminated after exiting Kodi. And my experiences with Kodi is that it is a pig to compile! I would rather avoid this route if possible! Has anyone else experimented with this, and found a lighweight solution that works? Cheers, -- Pete |
Maybe this will give you some ideas .....
I haven't done this on a SBC but I've been using bash scripts for yonks to save DVB to file either scheduled or real time on my desktop. Scripts offers channel list from channels.conf file then asks for a duration of show, name and start time. They then will create a script that is either run at nominated time using atd or records immediately. Atd runs as a daemon so you can close your terminal.Rrealtime save requires terminal to remain open. My simple script uses tzap and ffmpg. My mre complicated one uses dvbstream which does the encoding on the fly. In the past I set up an nfs share on the directory shows were saved in so my daughter could watch shows I saved/was saving to disc from her box on the lan. Both scripts create a temporary script to actually save the show and they are overwritten the next time a show is scheduled. The first one below using tzap and ffmpg is the simplest of the two. The second is from the more complicated script which does realtime as well as save and appends a timestamp to the filename. I've been using that one for about 11 years. Code:
#!/bin/bash Code:
#!/bin/bash |
Here's another lightweight solution that may give you an idea or two. ... I also set up a realtime dvb player script that uses yad to select channels. I run it with an icon on my desktop. and use a second script with icon to shut down the stream. Select a channel hit ok and mplayer pops up with the dvb stream with audio.
Code:
#!/bin/bash |
Justwantin: Thanks for your comments!
Yes, I too have used scripts - called at a preset time - to record programs using the dvbv5-zap program as outlined above. Your scripts have taken it all a step further, which is great! What I don't understand is why - for example, Kaffeine - is able to tune the local transmitter whilst scanning, with exactly the same signal strengths and S/N ratios as my x86_64 system (which works perfectly), but is then unable to actually play any of the channels. Same problem with VLC. And why does MPV play dvb perfectly when called directly from the command line, but struggle when called by smplayer? There is clearly something I'm missing somewhere. Kaffeine and VLC both use libvlc, which is a clue as to why they are not working. There must be something about the way the graphics works on the Pies that is upsetting things. I don't think its anything to do with hardware decoding, as MPV works fine from the command line. Maybe libvlc amd smplayer are trying to invoke hardware decoding? Smplayer has the video driver set to default - anything else produces a blank output. Must dig deeper..... -- Pete |
I haven't used kaffeine/kde or vlc in a very long time. I usually watch what I saved with xine and live with mplayer. Raspbian VLC according to this website has been patched
Quote:
|
Thanks for pointing that out! Unfortunately, I'm running Slarm64 (64-bit), and I believe Raspbian is only 32-bit.
As an aside, one of the recent upgrades seems to have broken Mara's version of VLC (compiled for Slarm64). I must find the old thread about this and see if he's published any slackbuilds for it... I have tried rebuilding VLC using a tweaked script from slackbuilds.org, but it keeps failing for a variety of reasons. I haven't tried AlienBob's version - largely because it is such a huge build! I may give it a go, and leaving it running overnight, if all else fails! ;) -- Pete |
I had a quick scan through the search results for rpi, 64 bit, vlc, etc. and I had the impression that your vlc problem might be hardware and not software related, in particular video acceleration. All I have here is a couple rpi zero w's and bpros which I run headless so I can't really have a play with this. Please do post again though I'd be interested to see how you get along.
|
Quote:
The recent upgrades to Slarm64 seemed to break VLC, and I couldn't get it to recompile. I notified sndwvs, and I see he has posted an upgrade for VLC. I'll give that a whirl shortly and see if it helps... -- Pete |
A little bit of an update on this: I've tracked the VLC problem down to an inability of VLC to play .ts files at present. Sndwvs has been very helpful in compiling the latest version, but for some reason, when I try to compile it, it fails. (See the VLC thread)
I can't play files recorded by my video camera either (also .ts files) in VLC of Kaffeine, although all works fine on x86_64. I'm also enquiring on the VLC forum to see if anyone there has any ideas. In the meantime, I've managed to simplify viewing and recording under mpv substantially. I've made up a channels.conf file, and put it in the mpv config folder. I can now tune any channel by simply issuing a command such as: Code:
mpv dvb://"BBC ONE HD" Code:
mpv dvb://"BBC ONE S West" --stream-record=Videos/Record/test-1.ts It also means that I can use something like the "at" command to start recording at a preset time, preceding the mpv command with "timeout 30m" to stop recording after 30 mins (or whatever duration I choose to set). Not as convenient as Kaffeine, but a good enough workaround until I can get VLC and Kaffeine to play ball! -- Pete |
I've been following on the your VLC thread. I don't watch much in realtime excepting maybe abc morning news. In the interim why don't you just encode on the fly and watch with Kaffeine or VLC off of the mpg file as it is put to disc. You'd be what seconds ... a minute behind the realtime broadcast. Run your save dvb script via ssh and if it is saved to an nfs share you could watch it from any machine on your lan. I use tzap for below but you could use mpv to do the same thing. Dvbstream encodes on the fly but using it is rather onerous.
Code:
tzap -c /etc/channels.conf -r 'ABC NEWS(ABC)' &>/dev/null & |
Just put an update in the VLC thread that provides a bit more info, but no cure!
-- Pete |
All times are GMT -5. The time now is 09:05 PM. |