Backend on Pi 4

For discussion of topics specific to MythTV on Raspberry Pi devices
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Backend on Pi 4

Post by MikeB2013 » Sun Feb 23, 2020 2:46 pm

Jim,
Thanks for reporting.

I will add libxml-simple-perl to pi-mythbackend-helper.sh.

I have also raised a trac ticket as I believe libxml-simple-perl should be in install depends of mythtv-light (to ensure consistency with packaging for ubuntu/debian) see https://code.mythtv.org/trac/ticket/13586

Edit 20200224 updated pi-mythbackend-helper in original post viewtopic.php?f=46&t=3232&p=15773#p15773

Mike

knappster
Junior
Posts: 30
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: Backend on Pi 4

Post by knappster » Thu Mar 05, 2020 11:51 pm

kojaked wrote:
Sat Jul 13, 2019 5:20 am
Dare I ask: how well does commercial flagging work on a Pi 4?
I am also curious about this. I've never used slave backends, but I was also wondering if it would be possible to queue commflagging on the pi primary backend and setup a more powerful machine as a slave backend to wake up at a certain time, run commercial flagging, and go back to sleep.

User avatar
jfabernathy
Senior
Posts: 295
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Fri Mar 06, 2020 12:45 am

IMHO commercial flagging doesn't work well enough on USA OTA ATSC programming to be worth the CPU cycles. It misses about half the commercials so you still have to manually do it. So it's turned off even on my production core i7 backend.

knappster
Junior
Posts: 30
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: Backend on Pi 4

Post by knappster » Sat Mar 07, 2020 3:00 am

jfabernathy wrote:
Fri Mar 06, 2020 12:45 am
IMHO commercial flagging doesn't work well enough on USA OTA ATSC programming to be worth the CPU cycles. It misses about half the commercials so you still have to manually do it. So it's turned off even on my production core i7 backend.
I agree that commercial detection is not as reliable as I would like, but I think that it helps me more than 50% of the time. I am also curious whether 2-4 simultaneous HDHomerun MPEG-2 recordings if an rpi4 would be able to handle it when compared to my current machine with a 7 year old:
Asus M5A78L-M LX3 motherboard and...
amd athlon(tm) ii x2 270 processor

with an internal hdd.

abennetts
Newcomer
Posts: 7
Joined: Tue Jul 08, 2014 7:38 pm
New Zealand

Re: Backend on Pi 4

Post by abennetts » Sat Mar 07, 2020 5:52 am

knappster wrote:
Sat Mar 07, 2020 3:00 am
I agree that commercial detection is not as reliable as I would like, but I think that it helps me more than 50% of the time. I am also curious whether 2-4 simultaneous HDHomerun MPEG-2 recordings if an rpi4 would be able to handle it when compared to my current machine with a 7 year old:
Asus M5A78L-M LX3 motherboard and...
amd athlon(tm) ii x2 270 processor
I find commercial detection, even when not perfect, to be worth it as well. I use this detection code as it is very low power and is nearly realtime on an old Intel Atom. I'd expect it run well on an RPi, but I haven't heard anyone mention using it nor how well it runs on USA recordings.

https://www.mythtv.org/wiki/Commercial_ ... h_silences

User avatar
jfabernathy
Senior
Posts: 295
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sat Mar 07, 2020 11:33 am

abennetts wrote:
Sat Mar 07, 2020 5:52 am
knappster wrote:
Sat Mar 07, 2020 3:00 am
I agree that commercial detection is not as reliable as I would like, but I think that it helps me more than 50% of the time. I am also curious whether 2-4 simultaneous HDHomerun MPEG-2 recordings if an rpi4 would be able to handle it when compared to my current machine with a 7 year old:
Asus M5A78L-M LX3 motherboard and...
amd athlon(tm) ii x2 270 processor
I find commercial detection, even when not perfect, to be worth it as well. I use this detection code as it is very low power and is nearly realtime on an old Intel Atom. I'd expect it run well on an RPi, but I haven't heard anyone mention using it nor how well it runs on USA recordings.

https://www.mythtv.org/wiki/Commercial_ ... h_silences
It might be worth me setting up a test case. I do know that the RP4 is very good as a Mythtv Combo frontend/backend. I know I've documented this somewhere in the Raspberry pi category, but I used a RP4 with 4GB DRAM and a SATA 6GB/s SSD via a USB3 to SATA adapter. My tests were 4 different HD recordings at the same time while watching another previously recorded program using the fronend on the RP4. It all worked as I wanted, no issues.
So it's possible that commercial detection could be adding back in.

The reason I choose to not do commercial detection is I waste more time fixing what it does wrong than just skipping manually to start with. For example, I've noticed that some commercials are complete missed, some skip too far and some start late or end early. I've learned my shows and know which networks and which shows do 4 minute commercials or 5. And which part of the program do the longest or shortest commercials. I've built up muscle-memory with my remote hand to do all this without thinking.

I guess we all find what works for us and our families.

User avatar
jfabernathy
Senior
Posts: 295
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sat Mar 07, 2020 12:11 pm

Questions about Mike's helper script updated at viewtopic.php?f=46&t=3232#p15773
It's now been updated to work with v31/fix. This is great for a combo FE/BE device, but doesn't it force any remote FEs to be on v31/fix?

knappster
Junior
Posts: 30
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: Backend on Pi 4

Post by knappster » Sat Mar 07, 2020 12:42 pm

jfabernathy wrote:
Sat Mar 07, 2020 11:33 am
abennetts wrote:
Sat Mar 07, 2020 5:52 am
knappster wrote:
Sat Mar 07, 2020 3:00 am
I agree that commercial detection is not as reliable as I would like, but I think that it helps me more than 50% of the time. I am also curious whether 2-4 simultaneous HDHomerun MPEG-2 recordings if an rpi4 would be able to handle it when compared to my current machine with a 7 year old:
Asus M5A78L-M LX3 motherboard and...
amd athlon(tm) ii x2 270 processor
I find commercial detection, even when not perfect, to be worth it as well. I use this detection code as it is very low power and is nearly realtime on an old Intel Atom. I'd expect it run well on an RPi, but I haven't heard anyone mention using it nor how well it runs on USA recordings.

https://www.mythtv.org/wiki/Commercial_ ... h_silences
It might be worth me setting up a test case. I do know that the RP4 is very good as a Mythtv Combo frontend/backend. I know I've documented this somewhere in the Raspberry pi category, but I used a RP4 with 4GB DRAM and a SATA 6GB/s SSD via a USB3 to SATA adapter. My tests were 4 different HD recordings at the same time while watching another previously recorded program using the fronend on the RP4. It all worked as I wanted, no issues.
So it's possible that commercial detection could be adding back in.

The reason I choose to not do commercial detection is I waste more time fixing what it does wrong than just skipping manually to start with. For example, I've noticed that some commercials are complete missed, some skip too far and some start late or end early. I've learned my shows and know which networks and which shows do 4 minute commercials or 5. And which part of the program do the longest or shortest commercials. I've built up muscle-memory with my remote hand to do all this without thinking.

I guess we all find what works for us and our families.
There is nothing wrong with your process. I have been using kodi as a frontend for some time and find that the commercial detection is generally correct for either beginning, ending, or both. I dont remember mythfrontend's functionality for this, but Kodi will skip a commercial break if I jump forward into it, but not if I jump back. There are also buttons to skip to the beginning or ending of the commercial break.

So essentially, if it misses the start of the break I can press one button to skip it. If it skips too early I can press a button to go back where it skipped from. If the end is wrong, I can jump forward or back to find it. I think your muscle memory just developed differently than mine :lol:

I remember back in the analog days that the commercial detection was so accurate that I could safely automate flagging commercials, generating a cut list, and transcoding recordings. No way would I consider that today...

P.S. are your recordings MPEG2 or MPEG4? I have the HDHomeruns that do not transcode so I want to make sure I am comparing apples to apples.

User avatar
jfabernathy
Senior
Posts: 295
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sat Mar 07, 2020 1:08 pm

P.S. are your recordings MPEG2 or MPEG4? I have the HDHomeruns that do not transcode so I want to make sure I am comparing apples to apples.
Mine are all MPEG2 from either HDHR Duo or Hauppauge WinTV-Quad PCIe card

User avatar
jfabernathy
Senior
Posts: 295
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sat Mar 07, 2020 10:12 pm

updated pi-mythtv helper script acting funny.

I installed fresh on a RPi4 using the latest helper script. I had some issues with permissions when mythtv-setup was working on Storage volumes. I went to look at users and groups and found pi was not part of the mythtv group. Only root was in that group other than mythtv.
I added pi to mythtv group and my problems went away.

I don't remember having to deal with that when the last version of the helper script used v30 or master. V31-fixes is what the new script uses.

User avatar
jfabernathy
Senior
Posts: 295
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sat Mar 07, 2020 10:27 pm

jfabernathy wrote:
Sat Mar 07, 2020 10:12 pm
updated pi-mythtv helper script acting funny.

I installed fresh on a RPi4 using the latest helper script. I had some issues with permissions when mythtv-setup was working on Storage volumes. I went to look at users and groups and found pi was not part of the mythtv group. Only root was in that group other than mythtv.
I added pi to mythtv group and my problems went away.

I don't remember having to deal with that when the last version of the helper script used v30 or master. V31-fixes is what the new script uses.
Could this be caused by running the helper script with sudo??? I've always done that with the older script.

User avatar
jfabernathy
Senior
Posts: 295
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sun Mar 08, 2020 12:00 am

jfabernathy wrote:
Sat Mar 07, 2020 10:27 pm
jfabernathy wrote:
Sat Mar 07, 2020 10:12 pm
updated pi-mythtv helper script acting funny.

I installed fresh on a RPi4 using the latest helper script. I had some issues with permissions when mythtv-setup was working on Storage volumes. I went to look at users and groups and found pi was not part of the mythtv group. Only root was in that group other than mythtv.
I added pi to mythtv group and my problems went away.

I don't remember having to deal with that when the last version of the helper script used v30 or master. V31-fixes is what the new script uses.
Could this be caused by running the helper script with sudo??? I've always done that with the older script.
I looked at the helper script and based on the fact that commands to install stuff in the script has sudo in from of the command, I'm betting that I should run the helper script as pi.

MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Backend on Pi 4

Post by MikeB2013 » Sun Mar 08, 2020 12:46 pm

Yes, the helper script should be run under pi user ./pi-mythbackend-helper.sh
Raspbian does not have a password for sudo (unlike Ubuntu/Debian), the script only uses sudo when required.

Mike

User avatar
jfabernathy
Senior
Posts: 295
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sun Mar 08, 2020 5:13 pm

Now that I have the new helper script working as I should have done the first time, I've found an issue with audio that I didn't have with the previous install with the previous helper script.

I used to setup the ~/.asoundrc file as the Mythtv Raspberry Pi wiki says for digital sound. That doesn't work now and I can't find any other audio setting that doesn't generate a motorboat sound or buzzing. Video is still fine with OpenMax.

Any ideas?

User avatar
jfabernathy
Senior
Posts: 295
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: Backend on Pi 4

Post by jfabernathy » Sun Mar 08, 2020 8:49 pm

jfabernathy wrote:
Sun Mar 08, 2020 5:13 pm
Now that I have the new helper script working as I should have done the first time, I've found an issue with audio that I didn't have with the previous install with the previous helper script.

I used to setup the ~/.asoundrc file as the Mythtv Raspberry Pi wiki says for digital sound. That doesn't work now and I can't find any other audio setting that doesn't generate a motorboat sound or buzzing. Video is still fine with OpenMax.
I have it working but I'm still confused. Playing the videos that are a part of the Setup Wizard on the frontend yields different results than just playing ATSC OTA HD TV from a HDHR Quatro. Those videos still sound like a motorboat. I'm still using the mythtv:CARD=ALSA device setup by the $HOME/.asoundrc file. I have 5.1 set with Dolby and DTS checked. My RPi4 is connected to the TV via HDMI and the TV sends it's digital sound to the AV receiver via Optical cable.

I can't see why changing the repository in the helper script has anything to do with this??

Post Reply