johndavies
Posts: 179
Joined: Fri Dec 20, 2013 1:00 pm

The Pi TVHAT, tvheadend URLs and gkreidls rtranscode4

Thu May 30, 2019 5:41 pm

I did report my attempts to use a different method of producing URLs outlined in a series of Youtube videos made by an Australian. i did manage to watch a few TV programmes but my efforts usually ended in failure. I can only assume that there was a clash with tvheadend. I did say I would report back but I did not because of these failures. I will accept that VLC produces a higher quality output than omxplayergui but I was curious to see if I could use tvheadend-generated URLs with the Pi TVHat and rtranscode4. My problem is that I am a skim reader after too many years of teaching and marking external GCSE History papers and this makes it very difficult for me to absorb technical information. Gkreidl's work on rtranscode4 is very well documented but I could not see how he produced the URLs so I decided to try tvheadend ones. The Minimal Kiosk Browser needs to be saved on the Pi.This also includes omxplayergui. rtranscode4 includes an install for the latest Minimal Kiosk Browser (aka kweb)
PRODUCING A CHANNELS LIST
It is easy to convert an m3u VLC playlist into one which rtranscode4 can use. Enter the following into a terminal for a playlist called playlist.m3u:
rtranscode -i=playlist.m3u -o=channels.dat
This will produce a channels file in the /home/pi directory which rtranscode can use. This needs to be copied elsewhere if you want a default channels list. The manual explains how you can add other lists of channels.

CREATING A DEFAULT CHANNELS LIST FOR RECORDING
This default playlist is stored as /usr/local/share/rtranscode/channels.dat. The way that I did it was to create an empty file by typing sudo nano and the path just mentioned into a Terminal, opening it up and copying the channels data stored in the home/pi/channels.dat into the /usr/local/share/rtranscode/channels.dat one and then saving it.Other channels in the rtranscode format can be added later.

ERECORDING CHANNELS IN REAL TIME
There is no PVR feature which allows you to record hours or days ahead. Typing rtranscode into a terminal will produce a gui for recording the channels stored in Channels.dat and choosing various settings for quality etc. This puts the saved programme in the home/pi directory. There is a command which allows you to save to a named directory. The command is rtranscode -l=/path/to/chosen/directory and, if this is entered, the gui showing channels available and the settings appears. Other commands are easy to apply. t and Enter allow you to enter a time for recording e.g. 1:00 records for one hour. r and Enter starts recording. s and Enter stops recording at any time. q and Enter quits the rtranscode gui.

WATCHING TV PRORAMMES
As far as I know there is no way of watching a TV programme and recording it at the same time. I do not think that there is a rtranscode command that will show a TV programme. The only way i know how to watch a TV programme is by using the RT-GUI. To do this you open up the rtranscode4 and install kweb (Minimal Kiosk Browser) which also loads omxplayergui. Then you open up the kweb directory to gain access to the RT-GUI. To make your channel list available to it, you run create_kpages.py This allows your channels.dat to be added. When ever you add extra channels to your channels.dat, file, you need to run create_kpages.py again for these new channels to be recognised. If you put a copy of RT-GUI in your /home/pi directory, there is an added bonus. Entering ./RT-GUI into a Terminal and pressing Enter will produce the RT-GUi entry scheme where you can choose a programme, press the Transcode box , wait a few seconds until the blue bar stops flashing qand then press the Play Transcoded Stream box to watch the programme of your choice.

I shall finish by apologising to gkreidl and to the Raspberry Pi community if I have missed anything glaringly obvious or made any basic errors.

gkreidl
Posts: 5955
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: The Pi TVHAT, tvheadend URLs and gkreidls rtranscode4

Fri May 31, 2019 6:26 am

johndavies wrote:
Thu May 30, 2019 5:41 pm
... I will accept that VLC produces a higher quality output than omxplayergui ...
No, it doesn't. As long as you stay in window mode (and not go to full screen using the x11 MMAL splitter), you get quite a lot of lost frames in VLC, if the video format is quite demanding (e. g. German 720p50 TV live streams or the typical bbb_sunflower_1080p60 test video) and the window size is maximized.
If you switch to full screen, VLC is running in overlay mode and the quality is much better.
omxplayerGUI always runs in overlay mode and there are no lost frames.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Return to “HATs and other add-ons”