FREE+FAST WORLD SHIPPING
UK STOCK NO CUSTOMS UK+EU
2 YEAR WARRANTY
FEATURED  :  MEDIA BOX  :  OTHER  :  FORUM  :  CONTACT
Zidoo Z9S
AUTO REFRESH+RESOLUTION SWITCHING
UHD+BD+DVD ISO FULL MENUS
RAW AUDIO PASSTHROUGH
ZIDOO HOME THEATRE + OPENWRT

Author Topic: [PATCH] More auto framerate switching - HIMEDIAPLAYER  (Read 130050 times)

futeko.com

  • Administrator
  • Senior Member
  • *****
  • Posts: 4124
    • View Profile
[PATCH] More auto framerate switching - HIMEDIAPLAYER
« on: July 14, 2016, 10:26:53 AM »
This script adds the following to HiMediaplayer (Media Centre on home screen) and Kodi+wrapper:

- More auto framerate switching (match HDMI output Hz to video fps). See below for how this differs from regular firmware.
- Auto resolution switching (match HDMI output resolution to video vertical resolution). See below for details.

The two features in combination enable a comprehensive 'source direct' feature.

For Kodi internal player (videoplayer) auto switching see the Kodi add-on thread here: http://www.futeko.com/newforum/index.php?topic=1015.0

Credit

- pcristi (99%!)
- looun
- Many thanks to everyone for testing/feedback

More Auto Framerate Switching

This feature can be disabled by running the script and selecting '5 Force framerate/resolution switching script OFF'.

Without installing this script (and 24p/frame rate adaptation enabled in settings-playback) auto switching already works like this:

Code: [Select]
50/60 Hz --> 23.976/24/25/30/29.97Hz
25/50Hz DVD --> 25Hz
30/60Hz DVD --> 30Hz

With this patch installed auto switching works like this:

Code: [Select]
1080p:
25/50 --> 50Hz
30/60 --> 60Hz
23.976 --> 23.97Hz
24 --> 24Hz
29.970 --> 59.940Hz
59.940 --> 59.940Hz

3840x2160:
25/50 --> 50Hz
30/60 --> 60Hz
23.976 --> 23.97Hz
24 --> 24Hz
29.970 --> 29.97Hz
59.940 --> 60Hz

4096x2160:
25/50 --> 50Hz
30/60 --> 60Hz
23.976 --> 24Hz
24 --> 24Hz
29.970 --> 60Hz
59.940 --> 60Hz

Auto Resolution Switching

This feature can be disabled by running the script and selecting '6 Force only resolution switching OFF flag script'.

Resolution matching is done based on the video vertical resolution and only works when vertical resolution exactly matches valid HDMI output resolution. So:

Code: [Select]
2160px --> 3840x2160p
1080px --> 1920x1080p
720px/23.976/24 --> 1920x1080p
720px/50/60 --> 1280x720p

Instructions

- Requires Windows PC to run the batch file at command prompt.
- Requires Q5/Q10 Pro connected to same network as PC and the IP address of Q5/Q10 Pro (Settings - Network).

- Download to Windows PC: LATEST VERSION HERE.
- Unzip.
- Execute RUN_ME.bat at Windows command prompt.
- Insert Q5/Q10 Pro IP address.
- Select '1 Install Auto FrcRate/Format switching'
- Q5/Q10 Pro will automatically reboot with patch installed.

- HiMedia 24Hz setting (Settings - Playback) must be set: ON for best results on FW 2.0.3 and later. OFF for best results on FW 1.0.1-2.0.1.

- To uninstall run script and select '3 Unistall Auto FrcRate/Format switching'.

Note

- For update just run_me.bat with new version
- HDMI1.4, will not switch 25/50 --> 50Hz, 30/60 --> 60Hz for 4K resolution inside is 25/50 --> 25Hz, 30/60  --> 30Hz.
- This patch is useful for those who use BD Menu or need 25.0 to 50.0 switch.
- It so possible to end with black screen, wrong deep color, wrong resolution, etc., if this happens try use w/o resolution switch.

Changelog

1.3.8
- add flag for not switch resolution
- RUN_ME.bat improved and some more options

1.3.7
- more bug fixed
- removed pause/play actions
- fix not switch from 1080p to 2160p on videos clip collections

1.3.6
- bug fix

1.3.5
- version bump
- mediafire did some strange things

1.3.4
- add force 12bit with BD Menu
- fix original space and deep color not always restore
- remove some delay for befor swtich command

1.3.3
- fix not force 12bit if HiMedia 24Hz ON

1.3.2.1
- void strange height calculation

1.3.1
- fix 720p/59.94, 1080p/59.94 not auto swtich from 2160p output
- fix continue trying switch for 720p output when already 720p output
- force 720p/23.976, 720p/24 to 1080p output if display supported

1.3.0
- add experimental auto switch resolution
- doesn't follow deep color for moment

1.2.3
- add back small delay when restore FMT
- add update buybox for Android 5.1.1 FW
- add support for Perfect Player IPTV, Smart IPTV
- set OMX active for XBMC

1.2.2
- add back pause when switch

1.2.1
- bug fix
- set OMX inactive for XBMC, KODI, SPMC, FTMC, EBMC

1.2.0
- version bump to 1.2.0
- fix maybe not activate on U5PVR box
- get fps from *vdec* inside of hiplayer*/fileinfo
- different switch between HiMedia 24Hz ON/OFF
- experimatal add flag for activate for OMX decode (YouTube, Netflix, Kodi, etc.)

1.1.4
- intial support of beta BD Menu
- fix not switch on/from BD Menu on correct framerate

1.1.3
- fix 3D-->2D switch regressions

1.1.2
- fix for FW v2.0.4 Android 7.0

1.1.1
- 4096x2160/23.976 --> 3840x2160/23.97Hz

1.1.0
- bump version number
- add support for 4096x2160
- buggy HiMedia 24Hz keep OFF with FW v2.0.3 Android 7.0

1.0.11
- fix for FW v2.0.3 Android 7.0

1.0.10.4
- Android 7 firmware 2.0.0 / 2.0.1 compatibility.

1.0.10.3
- add 1 second delay before switch to catch resume point
- add PLAYPAUSE keyevent before/after switch framerate
- replace sleep 1 to ping ~800ms

1.0.10.2
- decrease cpu usage
- fix cat abuse usage

1.0.10.1
- minor fix for Q5/Q10 4K3D

1.0.10
- fix script not work for specific situation report by some users

1.0.9
- add support for Q5/Q10 4K 3D
if not work do a clean installation with last firmware 3.0.3

1.0.8
- rewrite save/restore process of original resolution
- fix not save/restore  original resolution in specific situation
- (hope) fix 2160p back screen after few seconds in 4K TV/Projector

1.0.7
- fix switch resolution in 2160p output 4K TV/Projector

1.0.6
- new run_me.bat with more option
- more test for proper switch in 2160p output

1.0.5
- fix Android FMT maybe not restore proper after paying video 2160p_23.976 in 4K display

1.0.4 - working in progress
- fix 2160p 23.976 not switch
- fix possible script crash until first movie play
- add uninstall script

1.0.3
- add flag to switch OFF/ON
edit /sdcard/autoFMTswitchFlag end cahnge from ON to OFF
- minor bug fix

1.0.2
- fix 3D play broken in 1.0.1
- fix all LG demo report by HiMedia 29.917 fps, not work for 29_9*, 54_9*, 23.97*

1.0.1
- add 1 second and check if next file playing before switch back to Android FMT
« Last Edit: April 12, 2018, 02:44:34 PM by futeko.com »

PJDavis1970

  • Full Member
  • **
  • Posts: 94
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #1 on: July 14, 2016, 11:52:51 AM »
Does this switch 1080p mkv's stored as 800 horizontal lines?

futeko.com

  • Administrator
  • Senior Member
  • *****
  • Posts: 4124
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #2 on: July 14, 2016, 11:54:21 AM »
Yes.

Output Hz is switched to the video fps for any and all video.

Nice Monkey

  • Senior Member
  • ***
  • Posts: 747
  • Loves classic movies
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #3 on: July 14, 2016, 12:06:18 PM »
Yes.

Output Hz is switched to the video fps for any and all video.

Looks great. Thanks all for the good work. :)
Will try it for sure after installing the new 1.05 firmware. The result will be reported here.
« Last Edit: July 14, 2016, 12:09:00 PM by Nice Monkey »

Bostjan

  • Full Member
  • **
  • Posts: 67
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #4 on: July 14, 2016, 02:12:10 PM »
Works as it should.
But there is a thing that would be nice to see in "final" version. Is there a way to temporary disable it? There are occasions, like going through many recordings, which causes many unwanted black screens (it takes 1-2 second on TV to make a switch) when frame rate goes back to Android one and back to video,...
How do I uninstall the patch?

futeko.com

  • Administrator
  • Senior Member
  • *****
  • Posts: 4124
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #5 on: July 14, 2016, 03:01:39 PM »
Works as it should.
But there is a thing that would be nice to see in "final" version. Is there a way to temporary disable it? There are occasions, like going through many recordings, which causes many unwanted black screens (it takes 1-2 second on TV to make a switch) when frame rate goes back to Android one and back to video,...
How do I uninstall the patch?

When it's integrated into official firmware it will be configurable via GUI.

Uninstall.. Ah. There's something we overlooked.

By middle tomorrow we'll have an uninstall script similar to the one above to uninstall via same method.

What you need to do is remove two lines from the end of the file /system/etc/init.bigfish.sh, however to do this you need to know how to use ADB from a PC. We'll have it simplified via a script by tomorrow.


Nedo

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #6 on: July 14, 2016, 03:08:43 PM »
Hello! New Q5 Pro User here (and very, very happy!)
i use Kodi with the HiMediaplayer wrapper, does this framerate switcher work in combination with the wrapper?

R
Nedo

futeko.com

  • Administrator
  • Senior Member
  • *****
  • Posts: 4124
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #7 on: July 14, 2016, 03:09:19 PM »
Hello! New Q5 Pro User here (and very, very happy!)
i use Kodi with the HiMediaplayer wrapper, does this framerate switcher work in combination with the wrapper?

R
Nedo

Yes, it works for the wrapper.

futeko.com

  • Administrator
  • Senior Member
  • *****
  • Posts: 4124
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #8 on: July 14, 2016, 03:26:01 PM »
Works as it should.
But there is a thing that would be nice to see in "final" version. Is there a way to temporary disable it? There are occasions, like going through many recordings, which causes many unwanted black screens (it takes 1-2 second on TV to make a switch) when frame rate goes back to Android one and back to video,...
How do I uninstall the patch?

To temporarily disable it first install the latest version (see OP, we have gone up two version numbers since I posted the thread this morning!) then edit the file '/sdcard/autoFMTswitchFlag' on Q5/Q10 Pro. Use ES FIle Explorer on similar, it has a built in text editor. Change the text inside the file to ON or OFF.

Bostjan

  • Full Member
  • **
  • Posts: 67
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #9 on: July 14, 2016, 04:28:33 PM »
I have two things, first possible bug or question and second proposal for minimizing unnecessary rate switching:
1. I have 1080p/60Hz set in Android, TV via AV receiver is also Full HD (1080). While testing this patch, it occurred that Android's frame rate was not restored after closing 24fps movie and when going back in Android settings I noticed display was set to 2180p/24Hz. Resolution is wrong as AV reported that HDMI was really 1080p/24Hz. Does patch maybe wrongly tries to set resolution from 1080p to 2160p?
2. I noticed that while using player and frequently switching between movies, frame rate is constantly switching from Android's to movie's and back and so on. Assuming that in reality most of content in only in few different frame rates I think that rate switching could be greatly reduced following this rules:
- once closing the video and returning back to menu (but still within the player) do not restore Android's frame rate. Android's frame rate should only be restored when closing player.
- when starting video, do not change frame rate if current frame rate is already correct one (it might be that this is already implemented, but I can't test it)
 Following this, we don't have frame rate switching if we only have let say movies with 24fps and Android is set to 60Hz.

Sully

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #10 on: July 14, 2016, 04:36:50 PM »
Hello, how can I get the zip-file? I have no account for mediafire?
« Last Edit: July 14, 2016, 04:47:24 PM by Sully »

futeko.com

  • Administrator
  • Senior Member
  • *****
  • Posts: 4124
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #11 on: July 14, 2016, 04:49:26 PM »
Link in OP was wrong. It's been corrected.

Latest version: http://www.mediafire.com/?9scd3gn0xm3r3tc

Bear in mind that there will be regular updates.

Sully

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #12 on: July 14, 2016, 05:01:54 PM »
Now is to late. Now I have an account  ;D Another question,...what mus I do with the *.bat? What means "Execeute RUN_ME.bat at command prompt"? Please, can you explain that to me in more detail?

It's okay. It's done. At first I would open it as Admin. But now it works.
« Last Edit: July 14, 2016, 05:05:22 PM by Sully »

Sully

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #13 on: July 14, 2016, 05:17:10 PM »
Now I've done it. Is this okay?


OlivierQC

  • Senior Member
  • ***
  • Posts: 180
    • View Profile
Re: Q5/Q10 Pro - Auto framerate switching - HIMEDIAPLAYER PATCH
« Reply #14 on: July 14, 2016, 05:23:08 PM »
yes, and your box reboot automatically.
Sony XBR65x930c, Onkyo tx-nr656, Focal Dome 5.1.2, Egreat A5/A10, Zidoo X8/X9S, himedia Q10 PRO, Xbox One S

 

Zidoo Z10
3.5" HDD BAY
AUTO REFRESH+RESOLUTION SWITCHING
UHD+BD+DVD ISO FULL MENUS
RAW AUDIO PASSTHROUGH
IN STOCK
DELIVERY  :  WARRANTY  :  RETURNS  :  FAQ  :  BREXIT  :  ABOUT  :  CONTACT
PayPal Acceptance Mark
Prices are charged in £GBP with conversion at Paypal's current rate. The Euro / price on our site is approximate. More info here. Prices for UK + EU delivery include VAT at 20%. PRIVACY+COOKIE POLICY.

© SDHDIGITAL LTD 2019. All rights reserved.