problem with mythpreviewgen on raspberry pi 3 ubuntu
problem with mythpreviewgen on raspberry pi 3 ubuntu
Hi everyone,
I just got my backend running on a raspberry pi 3. I used Ubuntu MATE for pi3 with LTS 16.04. Running mythbackend version: fixes/0.28 [v0.28-2-g15cf421]
Everything seems to be in working order, except it is unable to generate preview thumbnails for mythweb.
I believe that I've traced this to a bus error caused by mythpreviewgen, which may be related to the ARM processor of the Pi3. I've done my standard searching and haven't been able to find anything related, but I assume that may just be because relatively few are trying to use the Raspberry Pi 3 as a backend. Given that 0.28 seems to have some support for ARM and is running well, I assume there's a goal to get everything working.
I'm attaching a file with portions from the relevant logfiles that I know of - if you need something else let me know and I'll try to track it down. In short, each time mythpreview gen is called, it seems to crash and I get an unhandled fault: alignment exception in my dmesg output.
Any thoughts on possible fixes would be greatly appreciated. This system is actually running very well for me - able to record 2+ HD streams and playback to a remote Raspberry pi 2 frontend at the same time. I'd really like to get this thumbnail generation working.
I just got my backend running on a raspberry pi 3. I used Ubuntu MATE for pi3 with LTS 16.04. Running mythbackend version: fixes/0.28 [v0.28-2-g15cf421]
Everything seems to be in working order, except it is unable to generate preview thumbnails for mythweb.
I believe that I've traced this to a bus error caused by mythpreviewgen, which may be related to the ARM processor of the Pi3. I've done my standard searching and haven't been able to find anything related, but I assume that may just be because relatively few are trying to use the Raspberry Pi 3 as a backend. Given that 0.28 seems to have some support for ARM and is running well, I assume there's a goal to get everything working.
I'm attaching a file with portions from the relevant logfiles that I know of - if you need something else let me know and I'll try to track it down. In short, each time mythpreview gen is called, it seems to crash and I get an unhandled fault: alignment exception in my dmesg output.
Any thoughts on possible fixes would be greatly appreciated. This system is actually running very well for me - able to record 2+ HD streams and playback to a remote Raspberry pi 2 frontend at the same time. I'd really like to get this thumbnail generation working.
- Attachments
-
- mythpreviewgen.txt
- Excerpts from relevant log files
- (10.24 KiB) Downloaded 238 times
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
So just to add to this a bit - looking through the log, and trying to follow it through the code, it appears the problem is more likely within the myth avformatdecoder than with mythpreviewgen directly, given that is the last log message before the actual crash.
Mostly I'm hoping that adding 'avformatdecoder' may attract the attention of someone to this post who knows about that piece, since my searching still hasn't turned up any likely fixes.
Mostly I'm hoping that adding 'avformatdecoder' may attract the attention of someone to this post who knows about that piece, since my searching still hasn't turned up any likely fixes.
- dizygotheca
- Developer
- Posts: 267
- Joined: Wed Sep 03, 2014 9:02 am
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
Myth uses a version of https://ffmpeg.org for video processing. avformatdecoder is part of that project.
Myth modifies its version slightly but it is runnable as mythffmpeg with the standard ffmpeg arguments. That is basically what mythpreviewgen does.
I suspect you'll see the same crash if you run
Google reports several ffmpeg 'alignment exception' crashes with ARM/RPi.
I suggest you repeat the test on the latest (or development) ffmpeg.
If you can find a version that doesn't crash, or better still an ffmpeg issue/patch that fixes the problem, then please raise a ticket on https://code.mythtv.org/trac
with all the versions/references.
However, AFAIK no other RPi user has mentioned the issue
There are some RPi builds available somewhere. They may have a work-around already.
Myth modifies its version slightly but it is runnable as mythffmpeg with the standard ffmpeg arguments. That is basically what mythpreviewgen does.
I suspect you'll see the same crash if you run
Code: Select all
mythffmpeg -i <problem file> -ss 5 -vframes 1 out.png
I suggest you repeat the test on the latest (or development) ffmpeg.
If you can find a version that doesn't crash, or better still an ffmpeg issue/patch that fixes the problem, then please raise a ticket on https://code.mythtv.org/trac
with all the versions/references.
However, AFAIK no other RPi user has mentioned the issue
There are some RPi builds available somewhere. They may have a work-around already.
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
Hmmm... Thanks for the info. I tried the mythffmpeg command you suggested, and that seems to run just fine. (see attached)
I'll try to poke around some more based on this - or maybe just create my own workaround with mythffmpeg since that seems to work.
I'll try to poke around some more based on this - or maybe just create my own workaround with mythffmpeg since that seems to work.
- Attachments
-
- mythffmpeg.txt
- Output from mythffmpeg successfully creating a thumbnail
- (2.57 KiB) Downloaded 180 times
- dizygotheca
- Developer
- Posts: 267
- Joined: Wed Sep 03, 2014 9:02 am
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
Ok. A backtrace of mythpreviewgen should give some clues then
https://www.mythtv.org/wiki/Debugging
https://www.mythtv.org/wiki/Debugging
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
My priority is the frontend on raspberry pi. At this stage I do not have any opinion on the viability of using it as a backend.
Please create a ticket ( https://code.mythtv.org/trac/newticket ). Set the component as Ports - rPi and I will take a look at it. If you have a mythffmpeg or other workaround, please give the details and I can look at incorporating the workaround in a future release.
Please create a ticket ( https://code.mythtv.org/trac/newticket ). Set the component as Ports - rPi and I will take a look at it. If you have a mythffmpeg or other workaround, please give the details and I can look at incorporating the workaround in a future release.
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
Hi,
I am running Mythtv Backend 0.28 on a Raspberry Pi 3 with Raspbian, and have the same problem with mythpreviewgen. I haven't been able to find a solution to this problem. mythffmpeg works fine when run from a command line.
If a solution has been identified and someone could direct me appropriately, it would be greatly appreciated.
Thank you!
I am running Mythtv Backend 0.28 on a Raspberry Pi 3 with Raspbian, and have the same problem with mythpreviewgen. I haven't been able to find a solution to this problem. mythffmpeg works fine when run from a command line.
If a solution has been identified and someone could direct me appropriately, it would be greatly appreciated.
Thank you!
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
I haven't made any progress - the previous replies recommending posting a ticket/doing a backtrace are still sitting in my inbox because things have been 'mostly working' (except for the thumbnails) and I haven't made it a priority to just do it.
I am still watching though, and still have my good intentions to file the ticket at some point. Feel free to beat me to it and gather the necessary info/data (let us know if you do).
Sorry!
I am still watching though, and still have my good intentions to file the ticket at some point. Feel free to beat me to it and gather the necessary info/data (let us know if you do).
Sorry!
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
There is a ticket, and a patch that requires changing source code of FFMPEG, which we don't want to do. The next version (29) of MythTV has a new version of FFMPEG, and perhaps that will fix the issue.
Ticket url: https://code.mythtv.org/trac/ticket/12888
I have not given this priority, because I have concentrated on Raspberry Pi as a frontend, not a backend.
Ticket url: https://code.mythtv.org/trac/ticket/12888
I have not given this priority, because I have concentrated on Raspberry Pi as a frontend, not a backend.
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
Thanks for the update!
I'm glad there's a ticket and it looks like it's mostly understood, and there's even a possible workaround in there for me (since I'm not using my backend pi3 to actually view videos, I do that on a remote frontend pi2).
And thanks for your work with the Pi both frontend and backend - I've been really impressed/surprised at how well it seems to work for both of these tasks. My backend is just ~12 OTA channels, but it can record those in HD and serve them up like a champ so far.
I'm glad there's a ticket and it looks like it's mostly understood, and there's even a possible workaround in there for me (since I'm not using my backend pi3 to actually view videos, I do that on a remote frontend pi2).
And thanks for your work with the Pi both frontend and backend - I've been really impressed/surprised at how well it seems to work for both of these tasks. My backend is just ~12 OTA channels, but it can record those in HD and serve them up like a champ so far.
Re: problem with mythpreviewgen on raspberry pi 3 ubuntu
I have made a fix for this bug. Grab the latest fixes/0.28 or mythtv light. Let me know if you still have problems with mythpreviewgen..