DM800HD MastaG OpenPLi 4.0 better IPTV lib-upgrade - ffmpeg2+exteplayer3

Reminder : You can install ffmpeg2/exteplayer3 from the feeds, and do as explained in Dreambox_from_ext_storage.txt to extend your Flash with external stick. Probable a 128 Mb or even less is enough.

As stated by MastaG, on the DM800HD boxes, the GStreamer 1.9.0.1 is taking too much ressources for some HD streams, and he found a solution upgrading the software to a better result.

I am posting here his instructions, and I hope this can help you guys, with DM800HD to get the best of your hardware, but for it, you MUST install an external USB Memory stick as the 64 Mb are not enough. Probably an old useless stick like 128 Mb (Thanks to Marco : Seems minimum 256 Mb is required), or more, up to 4 Gb can be enough. I let you test and give us your feedback about this matter. But as you can see, the DM800HD has endless possibilities !

Enjoy,

Admin

-------------

About :
http://forums.openpli.org/topic/41198-serviceapp-gstplayer-and-exteplayer3/


For those who don't know @samsamsam created excellent IPTVPlayer plugin, he also managed to create players for this plugin which run in separate process, so it's possible to have entire control over playback. One of these players also uses ffmpeg which was not used for playback in mipsel receivers yet.

Comparison of exteplayer3 (ffmpeg) to gstplayer (gstreamer1.0):

pros:
- uses much less memory
- needs much less cpu power -> immediate seeking, AV sync after seeking
- doesn't have problem with TS streams
- doesn't have problem with secure HLS streams

cons:
- framedrops in playback of packed mpeg4-part2
- HLS streams with variant playlists are pixelated



I really like the idea of separating player from enigma2 and running it as external process. We don't have to move quite big enigma2 binary to receiver in order to test. We can test player from command line without enigma2 running and AFAIK this should also mean that there are no memory leaks created by player process after it exits.



So I've created service 'serviceapp' for enigma2 which allows us to use these players.



serviceapp:

- adds service 5001: uses gstplayer
* possibility to change sink, buffer size, buffer duration
* possibility to enable/disable embedded subtitles support
- adds service 5002: uses exteplayer3
* TODO add exteplayer3 settings
- adds possibility to replace default servicemp3 service(4097)
- adds support for custom plugins settings

Thought there are still some thing things missing when compared to servicemp3:
- external subtitles support
- tags support
- cuesheet support
- epg support
- fast forward/backward



ServiceApp enigma2 plugin:

- possibity to replace enigma2 playback system, so you can use these players not only from bouquet but for example from MoviePlayer, MediaPlayer(restart enigma2 necessary)
* switch players gstplayer/exteplayer3 at enigma2 runtime
* change gstplayer settings at enigma2 runtime
- change gstplayer(5001) settings at enigma2 runtime
* sink, buffer size, buffer duration, enable/disable subtitles


Installation:
1. unpack recipes in serviceapp.tar.gz in $openpli-oe-core/meta-local/recipes-local

Code:
tar xzf serviceapp_recipes.tgz -C $openpli-oe-core_dir/meta-local/recipes-local


2. build serviceapp service + plugin

Code:
MACHINE=machinename bitbake enigma2-plugin-extensions-serviceapp


3. build @samsamsam's gstplayer + patches of mine

Code:
MACHINE=machinename bitbake gstplayer


4. (optional) You can build also experimental sink, which you can then select in ServiceApp menu, it's basically openpli dvbmediasink + mpeg4part2 unpacking + oldgen xtrend improvements mentioned in Gstreamer-1.0 topic.

Code:
MACHINE=machinename bitbake gstreamer1.0-plugin-dvbmediasink-experimental


Note, I've added this experimental sink with no intention of replacing original one. It's there so you know how can we have more sinks and make comparisons on the fly. For example this can be useful to have one sink stable and introduce new changes in experimental one, so users can freely switch between them if they want to try experimental one and report back if there are any problems, and if there are they can switch back to stable, etc..

5. ipk's are located in
Code:
$openpli_oe_core_dir/build/tmp/deploy/mips32el and $openpli_oe_core_dir/build/tmp/deploy/machinename


6. For exteplayer3 there is no recipe yet, since source is not public. @samsamsam mentioned that once he cleans it up, he will make it public. For now you have to build or download pre-built ffmpeg and exteplayer3 binary.

Using pre-built ffmpeg by @samsamsam:

1. download pre-built ffmpeg archive

Code:
wget http://iptvplayer.pl/resources/ffmpeg2.8.5_mipsel_fpu.tar.gz


2. unpack in root directory

Code:
tar xzf ffmpeg2.8.5_mipsel_fpu.tar.gz -C /


Install exteplayer3 binary:

1. download binary to /usr/bin/exteplayer3

Code:
wget http://iptvplayer.pl/resources/bin/mipsel/exteplayer3_ffmpeg2.8 -O /usr/bin/exteplayer3


2. give extplayer3 execution permissions:

Code:
chmod +x /usr/bin/exteplayer3


Note there are also other versions for ffmpeg and exteplayer3:

Code:
ffmpeg2.8.5 - http://iptvplayer.pl/resources/ffmpeg2.8.5_mipsel_fpu.tar.gz
ffmpeg2.8.5 (openssl1.0.2) - http://iptvplayer.pl/resources/ffmpeg2.8.5_mipsel_fpu_openssl1.0.2.tar.gz
exteplayer3 for ffmpeg2.8 - http://iptvplayer.pl/resources/bin/mipsel/exteplayer3_ffmpeg2.8
exteplayer3 for ffmpeg3.0 - http://iptvplayer.pl/resources/bin/mipsel/exteplayer3_ffmpeg3.0


Source:

Code:
https://github.com/mx3L/serviceapp


Example of bouquet with serviceapp services:

Code:
#SERVICE 4097:0:0:0:0:0:0:0:0:0:http%3a//movietrailers.apple.com/movies/sony_pictures/hoteltransylvania2/hoteltransylvania2-tlr2_h480p.mov?#User-Agent=iTunes:MOV_TRAILER_USER_AGENT
#SERVICE 5001:0:0:0:0:0:0:0:0:0:http%3a//movietrailers.apple.com/movies/sony_pictures/hoteltransylvania2/hoteltransylvania2-tlr2_h480p.mov?#User-Agent=iTunes:MOV_TRAILER_USER_AGENT_GST
#SERVICE 5002:0:0:0:0:0:0:0:0:0:http%3a//movietrailers.apple.com/movies/sony_pictures/hoteltransylvania2/hoteltransylvania2-tlr2_h480p.mov?#User-Agent=iTunes:MOV_TRAILER_USER_AGENT_EXT3


Certainly there are mistakes but hopefully not many :), any input is welcome.

-------------

In a nutshell here's how it works.

In your /etc/enigma2/ directory you have your channel bouquets with the .tv and .radio extensions.

Inside these files there's this for example:

Code:
#SERVICE 4097:0:0:0:0:0:0:0:0:0:http%3a//cdn.djing.com/tv/u-05.m3u8:DJING Underground (CDN)
#DESCRIPTION DJING Underground (CDN)


By default this will play with the gstreamer dvbmediasink (which is currently broken for sh4).

If you like to play your stream with exteplayer3 instead you should change the 4097 to 5002, like this:

Code:
#SERVICE 5002:0:0:0:0:0:0:0:0:0:http%3a//cdn.djing.com/tv/u-05.m3u8:DJING Underground (CDN)
#DESCRIPTION DJING Underground (CDN)


You can also change it to play with gstplayer using 5001:

Code:
#SERVICE 5001:0:0:0:0:0:0:0:0:0:http%3a//cdn.djing.com/tv/u-05.m3u8:DJING Underground (CDN)
#DESCRIPTION DJING Underground (CDN)


Now let's say you'd like to convert your entire bouquet to play with exteplayer3, simply login to your receiver with telnet/ssh (use PuTTY for Windows).

And issue to the following commands:

First stop enigma2:

init 4

Then change your bouquet to make all streams play with exteplayer3, lets say userbouquet.favourites.tv:

Code:
cd /etc/enigma2
sed -i 's/^#SERVICE 4097/#SERVICE 5002/g' userbouquet.favourites.tv


Then restart enigma2:

Code:
init 3


That's it !

You can also make exteplayer3 the default backend for playing back everything.

Go to Menu -> Plugins -> ServiceApp and set exteplayer3 as default.

Keep in mind that with exteplayer3 or gstplayer as default backend you will not have support for external subtitles (.srt for example).

That's why I've added MediaPlayer2 and SubsSupport from mx3L.

I haven't tested it for myself yet, since I simply changed my IPTV streams with type 5002 (exteplayer3) so everything else like DreamPlex for example keeps using the dvbmediasink.

Play around and let us know your findings!

MastaG

From Feeds :
Code:
opkg update
opkg install ffmpeg exteplayer3 gstreamer1.0-libav


Attachments
Dreambox_from_ext_storage.txt (99 downloads)
serviceapp_recipes.zip (79 downloads)
ffmpeg2.8.5_mipsel_fpu.tar.zip (35 downloads)
ffmpeg2.8.5_mipsel_fpu_openssl1.0.2.tar.zip (51 downloads)
exteplayer3_ffmpeg_2.8_3.0-ELF.zip (61 downloads)

_________________________