Jump to content


mx3L

Member Since 16 Jan 2013
Offline Last Active 09 Oct 2017 18:28
*****

#545183 serviceapp - gstplayer and exteplayer3

Posted by mx3L on 29 April 2016 - 12:24

updated recipes:

 

added exteplayer3 v26 recipe:

- fix VC1 playback on some mipsel receivers(et4x00)

- fix EOS detection on VU+ receivers, by @samsamsam

- fix seqfault on close, by @samsamsam

- fix mpeg4p2 playback

 

added ffmpeg bbappend, tested in openpli-oe-core:

- partially taken from @Taapat's ffmpeg bbapend - https://github.com/T...eg_3.%.bbappend

I didn't studied all options, just turned on/off some obvious ones, will look at it further

 

added serviceapp-0.2 recipe:

- add the possibility to choose the player in the MovieSelection menu, this allows the user to choose the ServiceExtEplayer3 or ServiceGstPlayer for movie playback in the MovieSelection menu, without Enigma2 playback system change, by @Taapat

- enigma2 setup skin is used by default, by @Taapat

- added description to config entries, by @Taapat

- fixed imprecise seeking when exteplayer3 was used

 

Installation:

same as in first post, but now you can also build exteplayer3

MACHINE=machinename bitbake exteplayer3

Attached Files




#544777 exteplayer3 - source code

Posted by mx3L on 26 April 2016 - 18:12

Just compiled exteplayer3 and serviceapp. All streams play very well but seeking with 1 and 4 on the remote doesn't work. Also fastforward and fastbackward doesn't work. Can somebody confirm that ?

 

Thank you guys for your work.

 

fast-forward, fast-backward is not implemented even in serviceapp. I don't see point of it, maybe if fast-backward worked properly(I guess this could be done only by pushing keyframes to decoder in reverse) then we can add it.

 

seeking is now fixed in serviceapp, I used seek-relative function of exteplayer3 to make relative seeks, which is not precise since we are using pts from last written packet to decoder instead of pts of shown frame as a start point for seeking.

I need to look at it further but probably this is simple fix in exteplayer3.




#542407 serviceapp - gstplayer and exteplayer3

Posted by mx3L on 13 April 2016 - 16:25

Hello,

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

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

2. build serviceapp service + plugin

MACHINE=machinename bitbake enigma2-plugin-extensions-serviceapp

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

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.

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 $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

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

  2. unpack in root directory

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

Install exteplayer3 binary:

  1. download binary to /usr/bin/exteplayer3

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

  2. give extplayer3 execution permissions:

chmod +x /usr/bin/exteplayer3

Note there are also other versions for ffmpeg and exteplayer3:

 

ffmpeg2.8.5 - http://iptvplayer.pl...psel_fpu.tar.gz
ffmpeg2.8.5 (openssl1.0.2) - http://iptvplayer.pl...ssl1.0.2.tar.gz
exteplayer3 for ffmpeg2.8 - http://iptvplayer.pl...ayer3_ffmpeg2.8
exteplayer3 for ffmpeg3.0 - http://iptvplayer.pl...ayer3_ffmpeg3.0

 

Source:

https://github.com/mx3L/serviceapp

 

Example of bouquet with serviceapp services:

#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.

Attached Files




#542007 GStreamer 1.0

Posted by mx3L on 11 April 2016 - 10:54

qtdemux revert shouldn't be neccessary anymore https://bugzilla.gno...g.cgi?id=764870




#541863 GStreamer 1.0

Posted by mx3L on 10 April 2016 - 13:45

@Beeker

I'm using 1.8.0, no problem there

 

@Alexvrs

This one is culprit in good plugins - 0391a93a3519c2ea4c375e9668b481c851e59d08, if you revert it stream works




#541845 GStreamer 1.0

Posted by mx3L on 10 April 2016 - 13:10

@Alexvrs, similar to previous issue but with different element, qtdemux is not pushing buffers to sink.




#541839 GStreamer 1.0

Posted by mx3L on 10 April 2016 - 12:54

It looks like, we can use this patch until it's pushed, it solves the problem:

https://bugzilla.gno...209&action=edit from https://bugzilla.gno...g.cgi?id=608148




#541825 GStreamer 1.0

Posted by mx3L on 10 April 2016 - 12:21

GST_DEBUG=tsdemux:5 gst-launch-1.0 souphttpsrc location='https://manifest.googlevideo.com/api/manifest/hls_playlist/id/aE7JOds_GtY.2/itag/95/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/cmbypass/yes/goi/16
0/sgoap/itag%3D140/sgovp/itag%3D136/hls_chunk_host/r3---sn-nf5o-cune.googlevideo.com/playlist_type/DVR/gcr/sk/mm/32/mn/sn-nf5o-cune/ms/lv/mv/u/pcm2cms/yes/pl/24/dover/3/fexp/9410705,9416126,9416891,9420452,9422596,9423662,9425791,9426926
,9427414,9427902,9428398,9429854,9431707,9432434,9432825,9432840,9433820/sver/3/upn/WIj7wb0qt7c/mt/1460279261/ip/91.219.135.13/ipbits/0/expire/1460301094/sparams/ip,ipbits,expire,id,itag,source,requiressl,ratebypass,live,cmbypass,goi,sgo
ap,sgovp,hls_chunk_host,playlist_type,gcr,mm,mn,ms,mv,pcm2cms,pl/signature/66B5EF31AE4E76C59D77A0640CAC77DA8B9090AE.1AE0E0A507DC89CCDB14013FC81BF263B248DA15/key/dg_yt0/playlist/index.m3u8' ! hlsdemux ! tsdemux ! h264parse ! fakesink sile
nt=false
0:00:06.147096369  5599   0x68b800 DEBUG                tsdemux tsdemux.c:2104:gst_ts_demux_push_pending_data:<tsdemux0:video_0100> stream:0x75a34b18, pid:0x0100 stream_type:27 state:2
0:00:06.148181369  5599   0x68b800 DEBUG                tsdemux tsdemux.c:2162:gst_ts_demux_push_pending_data: Not enough information to push buffers yet, storing buffer
0:00:06.149055924  5599   0x68b800 DEBUG                tsdemux tsdemux.c:2104:gst_ts_demux_push_pending_data:<tsdemux0:audio_0101> stream:0x75a2ba48, pid:0x0101 stream_type:15 state:0
...

tsdemux is not pushing buffers to next element, that's why it's not working. I just tried to comment this part of code and stream then works, but I don't find anything regarding this part in latest commits, I guess better ask gstreamer developers.

Do we know exactly in what version it worked?

 

https://gist.github....09596a1c514911e




#528410 OpenPLi-4 / Gstreamer 1.7.1 (master git) images 2016-01-05

Posted by mx3L on 1 February 2016 - 18:55

@MastaG

I would suggest you to do remote debugging, since then you don't need to install dbg packages, also symbols are loaded on host, so you will certainly not run out of memory.

 

On target:

1. install gdbserver

opkg install gdbserver

2. start gdbserver

gdbserver localhost:2345 /usr/bin/enigma2

On host:

1. setup cross-development environment, toolchain, and sysroot:

MACHINE=machine bitbake image_name -c populate_sdk
cd openpli-oe-core/build/tmp/sdk
./oecore-x86_64-mips32el-toolchain-nodistro.0.sh #select your $SDK directory

2. setup your environment

source $SDK/environment-setup-mips32el-oe-linux

3. enter directory with enigma2 with debugging symbols

cd $SDK/sysroots/mips32el-oe-linux/usr/bin/.debug

4. create .gdbinit file with sysroot set at $SDK/sysroots/mips32el-oe-linux

echo "set sysroot $SDK/sysroots/mips32el-nf-oe-linux/" > .gdbinit

5. start gdb

mipsel-oe-linux-gdb enigma2

6. in gdb connect to target

(gdb) target remote target-host:2345
(gdb) continue

Hope it helps :),

http://www.yoctoproj...gdb-remotedebug




#527094 Kodi 15.2 for vusolose, vusolo2 and vuduo2

Posted by mx3L on 25 January 2016 - 21:55

@Trial, @darkmantk

 

I see, the problem is that Kodi passes to external player something like this:

smb://NSA210/Media/Serialy/Breaking Bad/Breaking Bad S05E11 HDTV x264-ASAP[ettv]/Breaking.Bad.S05E11.HDTV.x264-ASAP.mp4

Gstreamer cannot open this, at least until we are missing source which could handle this address, maybe giosrc - http://gstreamer.fre...ins-giosrc.html ?

 

 

@lite

@darkmantk already mentioned, that you should add it in xbmc recipe (xbmc.inc).

I want to add this patch but problem is that I always lose audio after switching back from movie which has AC3/DTS sound, I'm not using downmix. So have to figure this out first.




#526546 servicemp3 - http timeout

Posted by mx3L on 22 January 2016 - 12:14

1. When using gstreamer master git, you can do this:

diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
index 7559042..fd59b62 100644
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -782,14 +782,6 @@ RESULT eServiceMP3::stop()
        m_state = stStopped;
 
        GstStateChangeReturn ret;
-       GstState state, pending;
-       /* make sure that last state change was successfull */
-       ret = gst_element_get_state(m_gst_playbin, &state, &pending, 5 * GST_SECOND);
-       eDebug("[eServiceMP3] stop state:%s pending:%s ret:%s",
-               gst_element_state_get_name(state),
-               gst_element_state_get_name(pending),
-               gst_element_state_change_return_get_name(ret));
-
        ret = gst_element_set_state(m_gst_playbin, GST_STATE_NULL);
        if (ret != GST_STATE_CHANGE_SUCCESS)
                eDebug("[eServiceMP3] stop GST_STATE_NULL failure");

2. Yes, I'm referring to 1.7.x stable release

3. Yes




#526177 servicemp3 - http timeout

Posted by mx3L on 20 January 2016 - 16:01

Hi,

 

Continuing from http://forums.openpl...ndpost&p=520325

 

I was investigating use of HTTP timeout in servicemp3, since there were problems that streams sometimes timed out, even when they should not.

 

Current situation:

1. we are setting HTTP_TIMEOUT to souphttpsrc by "timeout" property, when streaming thread is created (GST_STREAM_STATUS_TYPE_CREATE)

2. we are setting HTTP_TIMEOUT to m_streaming_src eTimer and starting it, when streaming thread is created (GST_STREAM_STATUS_TYPE_CREATE)

3. if HTTP_TIMEOUT is reached eTimer will call sourceTimeout, which stops pipeline and emits EOF event

4. if pipeline gets to PAUSED_TO_PLAYING state change before HTTP_TIMEOUT is reached, it stops eTimer, so sourceTimeout is not called

 

What are the problems:

1. We are setting HTTP_TIMEOUT to souphttpsrc when streaming thread is created which is too late, since SOUP client was already initialized, which in effect means that there is default timeout set. In gstreamer1.0 it's 15 seconds, in gstreamer 0.10 it's infinity. (note, since gstreamer 1.4 souphttpsrc has option to set "retries" property which sets 'Maximum number of retries until giving up', default is 3, so it should be, timeout = timeout * 3, but by doing tests it's  only 2* timeout value)

2. From above point it's clear that m_streaming_src eTimer is effectively doing timeout, which is not precise at all.

3. In sourceTimeout we are emitting EOF without emiting evStart ( evStart is now correctly emited in READY_TO_PAUSED state change since https://github.com/O...ffaa6af62c377d)

4. In sourceTimeout we are emitting EOF, after stopping pipeline. EOF event should mean that end of file was reached, and it should be still possible to do for example seek actions. After we stop pipeline we cannot do that anymore, and we correctly shouldn't be able to do that since source timed out, so EOF shouldn't be emitted at all.

 

Solution:

1. set timeout for souphttpsrc in playbinNotifySource, so our timeout is actually applied

2-4. remove m_streaming_src timer and instead catch specific resource error messages on the bus: GST_RESOURCE_ERROR_OPEN_READ or GST_RESOURCE_ERROR_OPEN(http://gstreamer.fre...stResourceError), which among other problems will tell us that timeout is reached, so we can stop pipeline. Note we don't emit EOF event as explained.

 

What's the difference for user:

Playback will behave as before except there will be no unexpected timeout occuring and if stream times out nothing happens, while before EOF event would be emited, which would for example show "END" message in MoviePlayer, or do some other registered action.

 

Todo:

- I think we should consider to create/reuse some event which would signal that there was some error and we cannot start playback, so we can inform user about it.

- Do the same for servicemp3record

 

Patch was tested on gstreamer-1.0 and also on gstreamer-0.10 by @ian1095

 

Any advises are much appreciated.

 

Patch:

https://gist.github....69e1da108009508

 




#523601 Kodi 15.2 for vusolose, vusolo2 and vuduo2

Posted by mx3L on 9 January 2016 - 18:48

Hello,

 

As you probably already know there exists Kodi (XBMC) 13.2 plugin for other images like OpenATV, OpenBH, BH.. but this version is outdated. As a consequence many addons are not supported anymore.

 

Since XBMC modified by vuplus is mostly open-source(aside gles initialization), I ported/modified all neccessary changes to make update to latest stable version of Kodi possible.

 

Changes:

 

Kodi:

- updated to latest stable release 15.2

- ContextMenu is bind to mute button, Escape is bind to exit button (idea taken from http://www.vuplus-community.net/)

- remote mount used hdd can be used as storage

- added Enigma2Player based on ExternalPlayer

 * gathers subtitles links from addons and passes it to clients

- Enigma2Player is set as default player for every video/audio

 

Kodi E2 plugin(kodiext):

- subtitles support by subssupport plugin

- correctly handles xbmc urls with added http headers

 

Known Issues:

 

- audioengine in kodi is disabled since it doesn't work correctly(choppy sound), however it looks to be solvable since alsa is working on vuplus when tested with aplay

- internal video player is working but without sound as said above. It will have only limited use if sound is fixed, since only low quality video is fluent, because of software decoding.

- when kodi exits, it always crashes. I debug it with gdb and find out that problem lies in vu gles drivers:

Program received signal SIGSEGV, Segmentation fault.
0x777b5238 in ?? ()
   from /home/marko/Projects/Sdk/openpli-mipsel32-kodi-image/sysroots/mips32el-oe-linux/usr/lib/libGLESv2.so

....

 

How to build:

 

1. clone openpli-oe-core master-next branch

git clone https://github.com/OpenPLi/openpli-oe-core -b master-next

2. enter to openpli-oe-core directory and setup your build environment

cd openpli-oe-core;make

3. enter meta-vuplus directory, add my remote fork of meta-vuplus layer, checkout kodi_15_2 branch

cd meta-vuplus;git remote add vukodi https://github.com/mx3L/meta-vuplus.git;git fetch vukodi;git checkout kodi_15_2

4. enter meta-local directory, clone kodi recipes

cd ../meta-local/;git clone https://github.com/mx3L/recipes-kodi.git

5. enter build directory, set build environment variables, build kodi-image for your machine(vusolose,vusolo2,vuduo2), I set vusolose.

cd ../build/;source env.source;MACHINE=vusolose bitbake kodi-image

6. If everything goes as it should, your kodi image is in your build directory:

openpli-oe-core/build/tmp/deploy/images/$(MACHINE)/

Note:

If you already built master-next, you have to clean vuplus-dvb-modules from rootfs, otherwise there will be collision with vuplus-dvb-proxy.

MACHINE=yourmachine bitbake vuplus-dvb-modules -f -c clean

Testing images:

 

- these images are built on master-next branch of openpli-oe-core and are only ment for testing(no feeds available, you've to build them or include your packages in kodi-image.bb), only vusolose image is tested, since I don't have other receivers.

Please try vusolo2 and vuduo2 images and let me know if Kodi is working.

 

vusolose:

https://dl.dropboxus...se_kodi_usb.zip

 

vusolo2:

https://dl.dropboxus...o2_kodi_usb.zip

 

vuduo2:

https://dl.dropboxus...o2_kodi_usb.zip

 

 

PS:

Thank you to @samsamsam, who send me his ffmpeg configure options




#517076 GStreamer 1.0

Posted by mx3L on 2 December 2015 - 14:20

http://forums.openpl...ndpost&p=516079

solved - https://bugzilla.gno...g.cgi?id=758946




#516071 GStreamer 1.0

Posted by mx3L on 27 November 2015 - 16:34

@athoik

try to set connection-speed directly for playbin, as you did here:

gst-launch-1.0 playbin uri=http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8 connection-speed=4294967 2>&1 | grep http