Master from source on Raspberry 4 4GB
Re: Master from source on Raspberry 4 4GB
"it looks like the frames per second is suddenly 10-15 fps."
Is it really 10-15 fps ? If so there is something really wrong, I suspect some setting in mythfrontend.
If you run LiveTV on a suitable channel, what does the screen show if you press "m" key, then Playback, then Playback Data
The fields of interest are:
Video
Codec/Dec
Deint
FPS
Note Deint may only show if using default theme (not all themes have yet been updated for this field)
You can also use "m" key on playback of previously recorded program.
Mike
Is it really 10-15 fps ? If so there is something really wrong, I suspect some setting in mythfrontend.
If you run LiveTV on a suitable channel, what does the screen show if you press "m" key, then Playback, then Playback Data
The fields of interest are:
Video
Codec/Dec
Deint
FPS
Note Deint may only show if using default theme (not all themes have yet been updated for this field)
You can also use "m" key on playback of previously recorded program.
Mike
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: Master from source on Raspberry 4 4GB
Here's the data from a previously recorded program that to me is jumpier than what I had on v30 mythfrontend on DesktopMikeB2013 wrote: ↑Wed Mar 18, 2020 1:50 pm"it looks like the frames per second is suddenly 10-15 fps."
Is it really 10-15 fps ? If so there is something really wrong, I suspect some setting in mythfrontend.
If you run LiveTV on a suitable channel, what does the screen show if you press "m" key, then Playback, then Playback Data
The fields of interest are:
Video
Codec/Dec
Deint
FPS
Note Deint may only show if using default theme (not all themes have yet been updated for this field)
You can also use "m" key on playback of previously recorded program.
Mike
Video 1920x1080@29.97fps
Codec/Dec MPEG2 ffmpeg
Deint 2x GLSL Linearblend
FPS bounces between 29.13 to 31.14
I also check a live TV program and the data is the same.
I got the same data and picture quality using the console eglfs or Desktop.
Re: Master from source on Raspberry 4 4GB
That FPS bounce seems high to me, I do have a small amount of FPS bounce but it is around +/- 0.04 at a nominal 25 FPS.
Just a thought, are you using default audio setting (ALSA:default:CARD=ALSA) or something else.
Probably need a mythfrontend log to see what is happening during playback, but my knowledge of atsc is non existent, hopefully someone else on this board may be able to decipher such a log.
Mike
Just a thought, are you using default audio setting (ALSA:default:CARD=ALSA) or something else.
Probably need a mythfrontend log to see what is happening during playback, but my knowledge of atsc is non existent, hopefully someone else on this board may be able to decipher such a log.
Mike
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: Master from source on Raspberry 4 4GB
my audio is setup using the Mythtv Raspberry pi wiki page for setting up ALSA digital sound. So I have the .asoundrc file cut and pasted from there.MikeB2013 wrote: ↑Wed Mar 18, 2020 3:16 pmThat FPS bounce seems high to me, I do have a small amount of FPS bounce but it is around +/- 0.04 at a nominal 25 FPS.
Just a thought, are you using default audio setting (ALSA:default:CARD=ALSA) or something else.
Probably need a mythfrontend log to see what is happening during playback, but my knowledge of atsc is non existent, hopefully someone else on this board may be able to decipher such a log.
Mike
I'll work on getting a log together.
To baseline this I blew away my Master stuff and did a fresh install of Buster and mythtv v30 and did the livetv thing with the 'm' display to collect the data. This was all done using the Desktop GUI. everything looked the same except the FPS bounce was minimal. 29.99 to 30.01 kind of bounce. This is using OpenMAX.
EDIT: again the Desktop was set to 1920x1080 on a 4K TV
Re: Master from source on Raspberry 4 4GB
Jim,
With my testing on Pi2/3 and 4 over hdmi, I have not used the .asoundrc file, Raspbian Buster seems to have the IEC958 device mentioned in the wiki, so file .asoundrc is not required.
I just use the default audio presented using the Setup Wizard (ALSA:default:CARD=ALSA).
I don't think (but could be wrong!) the .asoundrc file is causing your issues, but it could be useful to remove it (reboot required), just to limit area of testing.
Mike
With my testing on Pi2/3 and 4 over hdmi, I have not used the .asoundrc file, Raspbian Buster seems to have the IEC958 device mentioned in the wiki, so file .asoundrc is not required.
I just use the default audio presented using the Setup Wizard (ALSA:default:CARD=ALSA).
Code: Select all
pi@pi4-20200317:~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
dmix:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample mixing device
dmix:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample mixing device
dmix:CARD=ALSA,DEV=2
bcm2835 ALSA, bcm2835 IEC958/HDMI1
Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample snooping device
dsnoop:CARD=ALSA,DEV=2
bcm2835 ALSA, bcm2835 IEC958/HDMI1
Direct sample snooping device
hw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct hardware device without any conversions
hw:CARD=ALSA,DEV=2
bcm2835 ALSA, bcm2835 IEC958/HDMI1
Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Hardware device with all software conversions
plughw:CARD=ALSA,DEV=2
bcm2835 ALSA, bcm2835 IEC958/HDMI1
Hardware device with all software conversions
Mike
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: Master from source on Raspberry 4 4GB
I eliminated the .asoundrc file and used your suggestion on the sound setting in Setting Wizard.
As suspected no change in bounce FPS.
I rebuilt my system with fixes/31 and built from source. The test is from console using run_mythfrontend.sh. I captured a log file.
The FPS bounces between 29 and 31.
As suspected no change in bounce FPS.
I rebuilt my system with fixes/31 and built from source. The test is from console using run_mythfrontend.sh. I captured a log file.
The FPS bounces between 29 and 31.
- Attachments
-
- mythfrontend.20200318193207.2561.log
- (26.17 KiB) Downloaded 58 times
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: Master from source on Raspberry 4 4GB
Would it be helpful if I uploaded an ATSC file where I'm seeing the problem? I could put it on my Google Drive and PM you the link.
Re: Master from source on Raspberry 4 4GB
Jim,
I can't see anything obvious in the log, probably needs extra logging.
The ./run_mythfrontend.sh script allows for this, by adding the all required logging at end of the line e.g.
./run_mythfrontend.sh --logpath /tmp -v gpu,playback --loglevel debug
Yes, it would be useful for an atsc file, I can put it in Videos group and try playback on my system, not the same as LiveTV
Mike
I can't see anything obvious in the log, probably needs extra logging.
The ./run_mythfrontend.sh script allows for this, by adding the all required logging at end of the line e.g.
./run_mythfrontend.sh --logpath /tmp -v gpu,playback --loglevel debug
Yes, it would be useful for an atsc file, I can put it in Videos group and try playback on my system, not the same as LiveTV
Mike
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: Master from source on Raspberry 4 4GB
I did some more testing and captured a log (--loglevel debug) for LiveTV on 2 different stations. One uses 1080i and one 720p. The 720p picture has less FPS bounce. The standard deviation is twice as high on the 1080i
- Attachments
-
- mythfrontend.20200319134705.15206.log
- (177.23 KiB) Downloaded 56 times
Re: Master from source on Raspberry 4 4GB
Jim,
Thanks for the atsc file, all 5.8GB!
I changed my /boot/config.txt to have (gives 1920x1080 @60Hz)
hdmi_group=1
hdmi_mode=16
On my Pi4 playback is jerky, and from running ./run_mythfrontend --logpath /tmp -v gpu,playback --loglevel debug I noticed that frames are being dropped with Deint: 2x GLSL Linearblend.
Changing Deinterlacer quality (single and double rate) from Medium quality to Low quality resolved the issue.
Deint: should now show 2x GLSL Onefield.
I tried this with Decoder set to Standard and V4L2 acceleration (decode only)
Note: you might still get some judder if OSD is displaying data ("m" key playback data ..), this is normal.
Mike
Thanks for the atsc file, all 5.8GB!
I changed my /boot/config.txt to have (gives 1920x1080 @60Hz)
hdmi_group=1
hdmi_mode=16
On my Pi4 playback is jerky, and from running ./run_mythfrontend --logpath /tmp -v gpu,playback --loglevel debug I noticed that frames are being dropped with Deint: 2x GLSL Linearblend.
Code: Select all
2020-03-19 15:07:09.437996 I [951/951] CoreContext jitterometer.cpp:131 (RecordEndTime) - Player(2): FPS: 30.54 Mean: 32747 Std.Dev: 18907 CPUs: 18% 23% 45% 28%
2020-03-19 15:07:09.521198 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio ahead by 26 ms
2020-03-19 15:07:09.571179 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 47ms
2020-03-19 15:07:09.687810 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 32ms
2020-03-19 15:07:09.687879 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio behind by 23 ms
2020-03-19 15:07:09.712359 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio ahead by 28 ms
2020-03-19 15:07:09.890768 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 34ms
2020-03-19 15:07:09.971211 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio behind by 30 ms
2020-03-19 15:07:10.021208 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 31ms
2020-03-19 15:07:10.087875 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio behind by 34 ms
2020-03-19 15:07:10.221312 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio ahead by 26 ms
2020-03-19 15:07:10.271152 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 43ms
2020-03-19 15:07:10.396634 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 36ms
2020-03-19 15:07:10.396747 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio behind by 37 ms
2020-03-19 15:07:10.396912 I [951/951] CoreContext jitterometer.cpp:131 (RecordEndTime) - Player(2): FPS: 30.25 Mean: 33056 Std.Dev: 20300 CPUs: 39% 37% 44% 43%
2020-03-19 15:07:10.454489 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio behind by 33 ms
2020-03-19 15:07:10.671180 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 38ms
2020-03-19 15:07:10.878808 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 49ms
2020-03-19 15:07:11.021138 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio ahead by 24 ms
2020-03-19 15:07:11.072674 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 45ms
2020-03-19 15:07:11.221186 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio ahead by 26 ms
2020-03-19 15:07:11.271145 I [951/951] CoreContext mythplayer.cpp:1840 (AVSync) - Player(2): Dropping frame: Video is behind by 44ms
2020-03-19 15:07:11.337781 I [951/951] CoreContext mythplayer.cpp:1772 (AVSync) - Player(2): AV Sync: Audio behind by 22 ms
2020-03-19 15:07:11.395524 I [951/951] CoreContext jitterometer.cpp:131 (RecordEndTime) - Player(2): FPS: 29.05 Mean: 34425 Std.Dev: 18180 CPUs: 21% 19% 48% 26%
Deint: should now show 2x GLSL Onefield.
I tried this with Decoder set to Standard and V4L2 acceleration (decode only)
Note: you might still get some judder if OSD is displaying data ("m" key playback data ..), this is normal.
Mike
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: Master from source on Raspberry 4 4GB
I made the changes and in the log file the FPS bounce is reduced. and when watching it seems it's smoother for longer,but when you see a jump,it's far worse.MikeB2013 wrote: ↑Thu Mar 19, 2020 3:21 pmChanging Deinterlacer quality (single and double rate) from Medium quality to Low quality resolved the issue.
Deint: should now show 2x GLSL Onefield.
I tried this with Decoder set to Standard and V4L2 acceleration (decode only)
Note: you might still get some judder if OSD is displaying data ("m" key playback data ..), this is normal.
Mike
Why is mythfrontend on V31 for Rp4 worse than v30? Did something fundamental change that is making it worse and having to be run from the Console?
V30 mythfrontend run from the Desktop GUI is still way better than what I'm seeing with V31 from the console.
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: Master from source on Raspberry 4 4GB
I may have hit on something. I baselined again and started with a fresh Buster on the RP4 and then installed v30 per the mythtv-light wiki. Studied the FPS bounce to see what the numbers were when mythfrontend was run from the Desktop GUI. The video quality is all good on LiveTV at this point. I also noted what the detailed video playback setting were on OpenMAX.
Then I changed the PPA to myth31 and updated. Since OpenMAX had set the CPUs to 4 for decoding I did the same on V4L2 and also used the other setting mentioned above for Deint.
The video looks a lot better and the OSD menu playback data looks better on FPS bounce.
I'll collect more data on running with V4L2 and 4 CPUs and see how that works.
Then I changed the PPA to myth31 and updated. Since OpenMAX had set the CPUs to 4 for decoding I did the same on V4L2 and also used the other setting mentioned above for Deint.
The video looks a lot better and the OSD menu playback data looks better on FPS bounce.
I'll collect more data on running with V4L2 and 4 CPUs and see how that works.
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: Master from source on Raspberry 4 4GB
I found this recommendation on the Mythtv Dev mail-list archive.
So I stumbled across the right solution.With the latest fixes, I'd recommend the following display profile
settings for the Pi4 (probably the same for Pi3):-
- decoder - V4L2
- max cpus - 4
- deinterlacer (both single and double rate) - low quality, Prefer
OpenGL deinterlacers.
This should give the best performance for both H264 hardware decode
and fallback to software decoding (e.g. MPEG2 on Pi4, or no licence on
Pi3).
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: Master from source on Raspberry 4 4GB
After I run from the console "pi-utils/run_mythfrontend.sh" and exit I don't have a blinking underline cursor anymore.
Is there a way to restore that?
Is there a way to restore that?
Re: Master from source on Raspberry 4 4GB
One way is to runjfabernathy wrote: ↑Sat Mar 21, 2020 1:58 pmAfter I run from the console "pi-utils/run_mythfrontend.sh" and exit I don't have a blinking underline cursor anymore.
Is there a way to restore that?
Code: Select all
setterm --reset
Mike