Page 1 of 1

Early Use Of The TV Hat And VLC

Posted: Mon Nov 19, 2018 7:37 pm
by johndavies
I had hoped that someone would explain the intricacies of streaming from the Pi TV Hat to a television or computer via the new Raspbian version of an accelerated VLC. Since no one has done this yet, you will have to put up with my ramblings. I am using the newly-updated Raspbian. First you have to type the tvheadend address into the address bar of your browser. I prefer to start with my pi identity since typing just "192" autocompletes the necessary tvheadend address. If you want to run a currently broadcasting station with much better quality that tvheadend's internal TV player, use the Electronic Programming Guide. Find a live station you want to record and press the Information icon on the far left of the screen. An information box appears. Just press the blue play arrow and nothing appears to happen. When you open up the "Downloads" directory in your home folder you will see a music symbol with a number of letters and numbers below it. When you double click on this, VLC is loaded if it is not already present and a station begins playing. Once you know what the station is you can use the "Rename" feature to give it a name e.g. "Yesterday". Should you want to record part of a live programme, click on the screen, select "Record" from the menu and it will appear as a "vlc-record-"file which you can rename.

I have not done any timed recordings yet so I hope that the following information is correct.Repeat the steps outlined above for a programme that you want to record. When the information box appears. Press on the "Record" button and,hopefully, the programme will be recorded. You will have to leave the pi switched on with tvheadend still running.

There is so much about VLC that I need to know. Could someone produce a "Sticky" on its main features? I gave up on it years ago when I realised that the unaccelerated version could not play videos properly. I moved to omxplayer, then omxplayergui and Rpi_Mike's excellent accelerated mpv. To play music I used mpc/mpd and then gkreidl's very useful improvements to omxplayergui which allowed me to play music, recorded TV programmes, videos, recorded radio and live radio stations . I do not know how to change the output directory of VLC or how to produce a random play feature when accessing my music directory. Perhaps the forthcoming issue of The Magpi will provide the information on VLC.

Re: Early Use Of The TV Hat And VLC

Posted: Tue Nov 20, 2018 12:21 am
by gkreidl
Hi John,

if you install the latest hotfix to my kweb suite you can use the youtube-dl-server to control VLC, just like the web interface of omxplayerGUI. The only thing you have to do is to start the server manually. You can access it with any browser at http://localhost:9192. On the front pacge you can switch the player (omxplayerGUI or VLC) at run time.

viewtopic.php?f=66&t=40860&p=1392789#p1392789

Re: Early Use Of The TV Hat And VLC

Posted: Wed Nov 21, 2018 10:27 am
by johndavies
I am still experimenting with the TV Hat. In my first post I mentioned how to run live TV stations. A file is saved in the Downloads section of the /home/pi/ directory. If you open up that file with the Text Editor, you are given a URL address in EXTMU format. This means that you should be able to set up a list of TV stations e.g. Sky News provides the following output:
#EXTM3U
#EXTINF:-1, Put your Title here e.g Sky News
http://your pi id:9981 or localhost:9981/stream/channel/289f18e71ca53e097afb5556d5e9af64ticket=829B4E6FA69B56B3294DDD041632BFB5C0BAEBDE
(The http:// address should be in one line)
Omxplayer, omxplayergui and mpv all stream the URL. I prefer the omxplayer output as it is full screen. omxplayergui provides a window while mpv provides a full screen but cannot be quit. Omxplayer and omxplayergui will also play saved programmes. I do not understand this as the saved programme files are only about 161 bytes in size so I assume the main file is saved elsewhere. You do of course need the aerial attached to your TV HAT to play live TV. Probably this will run without VLC being installed but I do not want to remove VLC to test this hypothesis.

Re: Early Use Of The TV Hat And VLC

Posted: Wed Nov 21, 2018 12:25 pm
by gkreidl
johndavies wrote:
Wed Nov 21, 2018 10:27 am
I am still experimenting with the TV Hat. In my first post I mentioned how to run live TV stations. A file is saved in the Downloads section of the /home/pi/ directory. If you open up that file with the Text Editor, you are given a URL address in EXTMU format. This means that you should be able to set up a list of TV stations e.g. Sky News provides the following output:
#EXTM3U
#EXTINF:-1, Put your Title here e.g Sky News
http://your pi id:9981 or localhost:9981/stream/channel/289f18e71ca53e097afb5556d5e9af64ticket=829B4E6FA69B56B3294DDD041632BFB5C0BAEBDE
(The http:// address should be in one line)
Omxplayer, omxplayergui and mpv all stream the URL. I prefer the omxplayer output as it is full screen. omxplayergui provides a window while mpv provides a full screen but cannot be quit. Omxplayer and omxplayergui will also play saved programmes. I do not understand this as the saved programme files are only about 161 bytes in size so I assume the main file is saved elsewhere. You do of course need the aerial attached to your TV HAT to play live TV. Probably this will run without VLC being installed but I do not want to remove VLC to test this hypothesis.
You can easily confugure omxplayerGUI to start in full screen mode if you prefer it.

VLC is much better for live TV streams than all ffmpeg based systems (including omxplayer). They start much faster and switching between different channels from a transponder (or "mux" in tvheadend) is also much faster: 2-3 seconds compared to 7-12.