25fps video using 60Hz mode
#1
I have lots of 25fps content from BBC iPlayer which causes a switch to 60Hz when using OMXPlayer acceleration and the "Adjust display refresh rate" setting. I would expect it to use 50Hz.

The issue appears to be caused by the fps being detected as 1000 instead of 25, e.g. http://sprunge.us/VTcW

Code:
20:48:56 T:1539306560    INFO: OMXPlayerVideo::OpenDecoder : Video codec omx-h264 width 1280 height 720 profile 100 fps 25.000000
...
20:48:56 T:1823196224   DEBUG: COMXVideo::PortSettingsChanged - [email protected] interlace:0 deinterlace:0
20:48:56 T:1823196224   DEBUG: ResolutionUpdateCallBack - change configuration. video:1920x1080. framerate: 1000.00. 1280x720 format: BYPASS
20:48:56 T:1823196224   DEBUG: CMMALRenderer::Configure - 1280x720->[email protected] flags:10 format:14 ext:0 orient:0
20:48:56 T:1823196224   DEBUG: Resolution 1920x1080 (1920x1080) @ 50.00 - Full Screen (16) not a very good match for fps 1000.000 (weight: 0.950), trying 2:3 cadence
20:48:56 T:1823196224   DEBUG: Resolution 1920x1080 (1920x1080) @ 50.00 - Full Screen (16) not a very good match for fps 1000.000 with 2:3 cadence (weight: 0.980), choosing 60 hertz
20:48:56 T:1823196224  NOTICE: Display resolution ADJUST : 1920x1080 (1920x1080) @ 60.00 - Full Screen (22) (weight: 0.940)
Leopold's Repository: Home of LibreELEC Dev Updater ...
Reply
#2
Any different with omxplayer disabled?
Can you provide a sample file?
Reply
#3
Yes it's fine with OMXPlayer disabled.

sample

Thanks.
Leopold's Repository: Home of LibreELEC Dev Updater ...
Reply
#4
@popcornmix Did you get anywhere with this? Is there a problem with the file?
Leopold's Repository: Home of LibreELEC Dev Updater ...
Reply
#5
To now, #411 is the last build that omxplayer works fine, No matter H264/Mpeg2 50hz/60Hz/24Hz DTS/PTS timestamp, all play smooth no stutter.
Reply
#6
@Leopold can you set "Adjust display refresh rate" to "always" rather than "on start/stop" and test?

EDIT: Seems to be a problem with the encoding of this file:
Code:
12:03:29 241436.359375 T:1732244560    INFO: OMXPlayerVideo::OpenDecoder : Invalid framerate 1000, using forced 25fps and just trust timestamps

It reports 1000 fps in the header. The "always" setting means after the initial framerate change, it is willing to change again if the framerate seems wrong.
Reply
#7
(2015-07-06, 13:13)startv Wrote: To now, #411 is the last build that omxplayer works fine, No matter H264/Mpeg2 50hz/60Hz/24Hz DTS/PTS timestamp, all play smooth no stutter.

Can you test a latest build with "prefer pts timestamps" enabled/disabled?
If you have a file that plays better with #411 than with either of those settings, then a sample would be useful.
Reply
#8
(2015-07-06, 13:59)popcornmix Wrote: @Leopold can you set "Adjust display refresh rate" to "always" rather than "on start/stop" and test?

EDIT: Seems to be a problem with the encoding of this file:
Code:
12:03:29 241436.359375 T:1732244560    INFO: OMXPlayerVideo::OpenDecoder : Invalid framerate 1000, using forced 25fps and just trust timestamps

It reports 1000 fps in the header. The "always" setting means after the initial framerate change, it is willing to change again if the framerate seems wrong.

Yes setting "Adjust display refresh rate" to "always" switches to 60Hz and then back to 50Hz once it starts playing. This is quite annoying though as it takes ages for the video to start playing properly. I don't want to switch off the refresh rate adjust as I use 24Hz mode for movies. I could set the gui to 60Hz and "Adjust display refresh rate" to "on start/stop". This would stop the mode change happening for the iplayer content while enabling a change for 24fps movies, but playing 25fps in 60Hz mode would obviously not be ideal.

BTW, This is happening because I use the --mkv option with get_iplayer which converts the flv to mkv with avconv. This seems to make seeking work better but apparently introduces this frame rate issue. I'm confused though because mediainfo reports

Code:
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps

Are there multiple headers? I didn't see a frame rate of 1000 when using mediainfo so where is this value coming from? Is there a way I can manually correct the frame rate in the header?
Leopold's Repository: Home of LibreELEC Dev Updater ...
Reply
#9
By the way.... what is OMX (OpenMax) useful for?
Reply
#10
Sad 
(2015-07-06, 14:03)popcornmix Wrote:
(2015-07-06, 13:13)startv Wrote: To now, #411 is the last build that omxplayer works fine, No matter H264/Mpeg2 50hz/60Hz/24Hz DTS/PTS timestamp, all play smooth no stutter.

Can you test a latest build with "prefer pts timestamps" enabled/disabled?
If you have a file that plays better with #411 than with either of those settings, then a sample would be useful.

I have three sample video files, A: H264 60Hz 1080P, B:H264 50Hz 1080P, C: MEPG2 50Hz 1080P, I tested these files from build #412 to #0705, OMXPlayer acceleration check on, PTS check on,sample A and B playes smooth,C stutter,then PTS check off,sample A and B stutter ,C playes smooth, but with #411, it has no PTS option, used OMXPlayer acceleration,three files all play smooth, the three samples all have Marquee,So I can see smooth or not easily.I'd like to upload these sample files. but I can not open dropbox/google webpage,there is no where I can upload.Sad
Reply
#11
(2015-07-06, 15:36)Leopold Wrote: Are there multiple headers? I didn't see a frame rate of 1000 when using mediainfo so where is this value coming from? Is there a way I can manually correct the frame rate in the header?

I suspect mediainfo is reading the first N frames and calculating the framerate from that.
I would imagine ffmpeg can add the correct framerate to the headers (use with "-vcodec copy -acodec copy" to avoid reencoding).
Reply
#12
(2015-07-06, 15:48)Warez Wrote: By the way.... what is OMX (OpenMax) useful for?
On Pi2 it shouldn't be required but I'm pretty sure there was a reason I needed it enabled. Maybe that's no longer valid so I'm going to leave it disabled for a while as that's the simplest way to get around this problem.
Leopold's Repository: Home of LibreELEC Dev Updater ...
Reply
#13
This looks like the same problem I have https://bugs.launchpad.net/ubuntu/+sourc...bug/779535
mkvinfo shows
Code:
Default duration: 1.000ms (1000.000 frames/fields per second for a video track)
Leopold's Repository: Home of LibreELEC Dev Updater ...
Reply
#14
That is quite an old bug report. Are you using a new ffmpeg (or avconv if you are using debian/Ubuntu).
Reply
#15
(2015-07-06, 17:41)popcornmix Wrote: That is quite an old bug report. Are you using a new ffmpeg (or avconv if you are using debian/Ubuntu).
Yes I was wondering whether the problem may have been reintroduced or not completely fixed. I'm using avconv version 9.18-6:9.18-0ubuntu0.14.04.1

BTW I've just managed to fix a file using the command
Code:
mkvmerge --default-duration 0:40ms in.mkv -o out.mkv
Leopold's Repository: Home of LibreELEC Dev Updater ...
Reply

Logout Mark Read Team Forum Stats Members Help
25fps video using 60Hz mode0