Forums » Tutorial and setups »
New article: How to Watch and Record Live TV on a Raspberry Pi
Added by Jim McDonnell almost 5 years ago
Good evening all,
I've written a new article explaining how to record and watch TV on a Raspberry Pi. It is oriented for the UK but should work for other countries.
http://unixetc.co.uk/2019/11/22/how-to-watch-and-record-live-tv-with-a-raspberry-pi
The set up, using OSMC/TVHeadend, is described in detail from scratch. I hope it does not duplicate existing resources too much.
The latest versions of OSMC/Kodi/TVH are used (at the time of writing). Also covers Flirc remote control setup, modifying Kodi font sizes, tuner setup, TVH optimization, power supply selection, recommended hardware, ongoing power consumption (6W!) and adding storage.
I hope somebody finds it useful, because it certainly took a lot of testing. I was looking for something to replace my ageing Topfield/MyStuff DVR. And, so far, the Pi/TVH/OSMC does make a good replacement.
Jim.
Replies (5)
RE: New article: How to Watch and Record Live TV on a Raspberry Pi - Added by Hiro Protagonist almost 5 years ago
A couple of comments:
"If you would prefer not to format, perhaps because you want to preserve some other data already on the drive, then don’t format it. Just skip to the next section"
Suggest you add a caveat - drives formatted with NTFS will work, but at the expense of considerably more CPU overhead than a linux filesystem. It's really best to
reformat rather than use NTFS.
Putting swap onto the SD card is a bad idea. Much better to put it on spinning media if you have it, or a USB stick if you don't.
HTH
RE: New article: How to Watch and Record Live TV on a Raspberry Pi - Added by Jim McDonnell almost 5 years ago
Hi HTH, thanks for reading. Regarding the swap, perhaps I should have mentioned - I have been a unix systems administrator for 27 years. Swapping to the SD card is fine in this case, especially since there won't be any actual swapping in the normal course of events, not with a 1 GB Pi running OSMC and TVHeadend. However, you have reminded me - not all Pi 2 and 3 models have 1 GB - the 3A has only 0.5GB, not enough, so I will add a note about that to the procedure.
About the NTFS - Yes I know NTFS takes CPU on Linux because there is an extra stack of FUSE code to push the data through. Nonetheless, I don't think recording, say, 2 channels onto NTFS simultaneously would tax the CPU unduly - in my tests, an SD video stream takes only about 0.4 megabytes/s. Two of those - 1 megabyte/s, say, isn't a lot, and should be only a small fraction of the maximum write speed of NTFS/Fuse. So (unless you have test results to the contrary), I won't warn people off NTFS. Some people like to use a disk on both Linux and Windows. I don't want to get too much into different file systems in the article anyway, as it would lead to many questions in the comments about this or that individual disk setup, and I can't comment on everybody's as there are a million variations.
When the article is amended, in the next day or two, I will put a note on here..
Jim
RE: New article: How to Watch and Record Live TV on a Raspberry Pi - Added by Hiro Protagonist almost 5 years ago
Jim McDonnell wrote:
Regarding the swap, perhaps I should have mentioned - I have been a unix systems administrator for 27 years. Swapping to the SD card is fine in this case, especially since there won't be any actual swapping in the normal course of events, not with a 1 GB Pi running OSMC and TVHeadend.
Yeah, I've administered a few unix systems in my time, but I don't want to get into 'mine is bigger than yours'.
Regarding "there won't be any actual swapping" - in a lot of cases this is true, but it does depend on what the user is doing & what else they install. That said I've not noticed any TVH memory leaks.
My main point is that if you do end up swapping, the issues of media bandwidth and flash wear mean that the SD card should be the last choice, not the first.
RE: New article: How to Watch and Record Live TV on a Raspberry Pi - Added by Jim McDonnell almost 5 years ago
Hi HTH, sorry, it wasn't intended to be a put-down. It's just than when you post a 6000 word article, and somebody pokes a dubious hole in it 5 minutes later, without trying the procedure first, it is a little exasperating. If you want to actually try the procedure and comment on the results, that is different.
"My main point is that if you do end up swapping, the issues of media bandwidth and flash wear mean that the SD card should be the last choice, not the first."
That advice is not applicable in this case. As stated, there is little or no swapping on the system in question, so wear and bandwidth considerations are academic. Swapping to a USB drive is fine, but introduces a small risk of said device not being available at boot time. Remember, this article is aimed at all levels of user, including beginners.
Yeah, I've administered a few unix systems in my time, but I don't want to get into 'mine is bigger than yours'.
Good for you, on both counts. As an old Unix sysadmin / consultant, I am more interested in sharing my knowledge through online articles than in arguing with other users/admins. If anyone follows the above article, I promise (within reason) the resulting system will work perfectly. It has been exhaustively tested. And if it doesn't work, I will help them through comments under the article, and modify the procedure as warranted.
Cheers,
Jim.
RE: New article: How to Watch and Record Live TV on a Raspberry Pi - Added by Jim McDonnell almost 5 years ago
The article has been updated with a note about the Pi 3A and memory requirements (it's half a gig being too small).
Also, I have had an NTFS file system on test for about a week, running on an external spinning disk as the Recordings repository. When writing 2 recordings, the mount.ntfs process takes between 15% and 30% of one core. That is, between 4% and 7.5% of the Pi 2 CPU as a whole. As described, this is not an issue, as overall CPU usage remains less than 20 - 25%.
Jim