Jump to content


Photo

exteplayer3 default player for mp4, mkv


  • Please log in to reply
No replies to this topic

#1 hw9258

  • Senior Member
  • 33 posts

+3
Neutral

Posted 7 March 2022 - 13:13

Thanks to all involved in the development of gstreamer/gstplayer, serviceapp and exteplayer3.

With the default enigma2 playback system, most freely available streams zap very fast like they are regular dvb-s2 channels and at most in 1-2 seconds. Setting serviceapp to either gstplayer or exteplayer3, introduces almost the twice zap time of 2-4 seconds and audio crackling in some streams.

On the other hand, the default enigma2 playback system is excellent with .ts files but does not support smooth skip time for buttons 1/3, 4/6 and 7/9 for mp4 and mkv files while exteplayer3 does. The mp4/mkv files are freely available lectures from universities.

It would be great if there was a setting in serviceapp or elsewhere to select exteplayer3 as default player only for mp4, mkv so that there isn't always the need to press menu and select Play with exteplayer3, especially for inexperienced users.

For now, it can be done by redirecting mp4/mkv files to be played via service reference 5002 so here is a very hacky but tested solution for release 8.1.

1st step: opkg install enigma2-plugin-systemplugins-serviceapp

Do not change its default settings, leave Enigma2 playback system disabled.

2nd step: keep a backup of InfoBar.pyo and MovieSelection.pyo from /usr/lib/enigma2/python/Components/Screens/ for easily reverting changes.

3rd step: either copy the attached files InfoBar.py and MovieSelection.py to /usr/lib/enigma2/python/Components/Screens/

or use the attached patch

 

or: opkg install enigma2-src

and edit

/usr/lib/enigma2/python/Components/Screens/InfoBar.py
Lines 207-208

        config.usage.last_movie_played.value = self.cur_service and self.cur_service.toString() or ""
        config.usage.last_movie_played.save()

change to

        config.usage.last_movie_played.value = self.cur_service and self.cur_service.toString() or ""
        # exteplayer3 default player for mp4, mkv
        if "5002:0:0:0:0:0:0:0:0:0:" in config.usage.last_movie_played.value:
            config.usage.last_movie_played.value = config.usage.last_movie_played.value.replace("5002", "4097")
        config.usage.last_movie_played.save()

Lines 323-324

            ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
            self.returning = True

change to

            ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
            # exteplayer3 default player for mp4, mkv
            if "5002:0:0:0:0:0:0:0:0:0:" in ref.toString():
                ref = eServiceReference(4097, 0, ref.getPath())
            self.returning = True

/usr/lib/enigma2/python/Components/Screens/MovieSelection.py
Lines 1213-1214

        current = self.getCurrent()
        if current is not None:

change to

        current = self.getCurrent()
        # exteplayer3 default player for mp4, mkv
        if current.getPath().lower().endswith(('.mp4', '.mkv')):
            current = eServiceReference(5002, 0, current.getPath())
        if current is not None:

4th step: restart enigma2

Attached Files


Edited by hw9258, 7 March 2022 - 13:16.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users