Jump to content


Photo

GStreamer 1.0

gstreamer 1.0 openpli

  • Please log in to reply
2520 replies to this topic

Re: GStreamer 1.0 #2061 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 27 November 2015 - 22:38

Athoik are you using gstreamer 1.6.1 or upstream git?


Latest GIT.
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: GStreamer 1.0 #2062 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 28 November 2015 - 11:16

Here is a channel that I get instant deadlock...
 

<104643.427760> [eServiceMP3] playbin uri=http://94.23.218.186:1935/kanali5/kanali5/playlist.m3u8
<104643.430481> [eServiceMP3] starting pipeline
<104643.493486> [eServiceMP3] state transition NULL -> READY
resolved to PLAY
<104643.555682> [eServiceMP3] trickSeek no need to unpause!
resolved to PLAY
<104643.560472> [eServiceMP3] trickSeek no need to unpause!
resolved to PLAY
<104643.565201> [eServiceMP3] trickSeek no need to unpause!
new service started! trying to download cuts!
RemovePopup, id = ZapError
<104643.570435> [eServiceMP3] GST_STREAM_STATUS_TYPE_CREATE -> setting timeout on souphttpsrc to 30s
<104673.570315> [eServiceMP3] http source timeout! issuing eof...
<104673.570665> [eServiceMP3] stop http://94.23.218.186:1935/kanali5/kanali5/playlist.m3u8
<104676.577402> [gRC] main thread is non-idle! display spinner!
Might be interesting to find what causes the deadlock.


PS. Stream is not playing also with other players eg VLC.

 

 

With that patch everthing is ok!

 

https://github.com/a...fbcdc4084ca6120

 

Please test it if possible.


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: GStreamer 1.0 #2063 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 28 November 2015 - 23:45

Hello,

 

There is the problem with PCM injection. It seems that PES header is ignored at least filed  PTS from PES header. Due to this audio is not synchronized with video after jump.

 

You did not notice this problem?

 

Regards,

SSS



Re: GStreamer 1.0 #2064 babsy98

  • Senior Member
  • 166 posts

+18
Neutral

Posted 28 November 2015 - 23:55

@athoik

good job works now

Re: GStreamer 1.0 #2065 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 29 November 2015 - 03:15

Athoik please create a pull request.

Re: GStreamer 1.0 #2066 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 29 November 2015 - 04:05

Hello,

 

There is the problem with PCM injection. It seems that PES header is ignored at least filed  PTS from PES header. Due to this audio is not synchronized with video after jump.

 

You did not notice this problem?

 

Regards,

SSS

 

It seems that this problem is related with broken drivers.
On others STB problem does not exists.
 
On problematick STB after seek audio decoder return 0 when asked about audio PTS and synchro is lost.


Re: GStreamer 1.0 #2067 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 29 November 2015 - 10:12

There is the problem with PCM injection. It seems that PES header is ignored at least filed  PTS from PES header. Due to this audio is not synchronized with video after jump.

That suggests the code earlier on was a workaround for an existing bug in drivers. On what receiver is this? Can someone test on another manufacturers' receiver?


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: GStreamer 1.0 #2068 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 November 2015 - 00:28

@athoik new bug introduced sinece commit https://github.com/O...9ffaa6af62c377d filesrc mkv containers who requires for stb's who needs dts downmix is broken again.

 

That kind off media full hd several audio track's (lanuguage dts track's) subtitles. So like and actually i'm speaking about real official commercial mkv movies. is broken.

 

It's quit simple mkv media does require sync between video/audio. if not it just stops running. Since we are working async the individual start off gst-audiosink audio is also the interface !!! the video sink and subsink must be together in the same us (and even less then us) segment.

 

So for filesrc media mkv the unpause or pas  from pause to playing may only and only happen when all info for every sink is known. As long that's not the case the general sink must remain in pause. wich means GST_STATE_PAUSE .

 

If for live streams and or just web streams (not filesrc streams) other settings are required quit possible. But for pure file source the unpause may only and only be done after all media info is obtained and set. Anything else will bring an out off sync between audio/video and will cause the media to stop or doing weird things.



Re: GStreamer 1.0 #2069 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 30 November 2015 - 00:58

@christophecvr

Can you provide example of such MKV file which has problem?

 

Regards,

SSS



Re: GStreamer 1.0 #2070 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 November 2015 - 11:17

A very big one

 

dts audio (needs downmix ) on dm

 

audio german and english

subitles complete Dutch, partially german.

 

h264 hd

 

send by pm


Edited by christophecvr, 30 November 2015 - 11:18.


Re: GStreamer 1.0 #2071 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 30 November 2015 - 11:31

@christophecvr

Is it possible to fix it in a way that dts keeps working but the deadlock still doesn't happen?



Re: GStreamer 1.0 #2072 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 November 2015 - 12:08

@christophecvr

Is it possible to fix it in a way that dts keeps working but the deadlock still doesn't happen?

Yes i'm now thinking about a solution.

 

by checking :  if filesrc. It will set the gst state in pause.

 

strictly speaking and normally after :

case GST_STATE_CHANGE_READY_TO_PAUSED:

the gst_state should be paused untill all caps are obtained and eventual extra required settings based on tags such as the audio track,sub title track is set. And in case off chapter info that info is set.

Only then we may move to state playing.

 

Now the videosink already runs when the correct info for audio is not known, this leads to an out off sink situation. And yes weird issues  the mkv demuxer does require sync between audio/video. Other wise it will stop the audio try to adjust to the correct segment relaunch audio. The vu+ dvb driver can have this but on dm8000 and dm800se and other boxes the driver can't handle this.



Re: GStreamer 1.0 #2073 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 November 2015 - 14:43

@christophecvr

Is it possible to fix it in a way that dts keeps working but the deadlock still doesn't happen?

Here the patch now all media plays back ok also the dts who needs downmix and the sometimes weird jump that happen by vu+

It's only for filesrc media. for live or http media nothings changes.

Attached Files



Re: GStreamer 1.0 #2074 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 30 November 2015 - 15:39

So for file:// urls you'll set GST_STATE_PAUSED on case GST_STATE_CHANGE_NULL_TO_READY.

 

Some questions:

1. What if I play the same mkv movie from my web-server (http://) instead.

2. Why not change to pause state for all media instead of just file:// ?



Re: GStreamer 1.0 #2075 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 November 2015 - 16:16

So for file:// urls you'll set GST_STATE_PAUSED on case GST_STATE_CHANGE_NULL_TO_READY.

 

Some questions:

1. What if I play the same mkv movie from my web-server (http://) instead.

2. Why not change to pause state for all media instead of just file:// ?

Well looks that when You play from webserver for some streams it causes a deadlock ??? questionable that I find but if they say so gues it's true. I personally never noticed that or had any deadlock but some others well.

 

This means that unfortunately I did applied it only for file sources. For a file source whatever media the gstreamer may unpause only after all required media data and settings are done . Else there may be sync issues.

And thats actually pretty logic.

 

But it's well clear that now there will be more sync issues comming up then before. For http and actually all media since it may happen that the video starts playing but the audio not and then the audio is tried to play later with a wrong segment.



Re: GStreamer 1.0 #2076 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 30 November 2015 - 16:25

No what  I meant was:

 

This commit by ahtoik: https://github.com/O...9ffaa6af62c377d

fixes the deadlock happening for fragmented streams like these:

<104643.427760> [eServiceMP3] playbin uri=http://94.23.218.186:1935/kanali5/kanali5/playlist.m3u8
<104643.430481> [eServiceMP3] starting pipeline
<104643.493486> [eServiceMP3] state transition NULL -> READY
resolved to PLAY
<104643.555682> [eServiceMP3] trickSeek no need to unpause!
resolved to PLAY
<104643.560472> [eServiceMP3] trickSeek no need to unpause!
resolved to PLAY
<104643.565201> [eServiceMP3] trickSeek no need to unpause!
new service started! trying to download cuts!
RemovePopup, id = ZapError
<104643.570435> [eServiceMP3] GST_STREAM_STATUS_TYPE_CREATE -> setting timeout on souphttpsrc to 30s
<104673.570315> [eServiceMP3] http source timeout! issuing eof...
<104673.570665> [eServiceMP3] stop http://94.23.218.186:1935/kanali5/kanali5/playlist.m3u8
<104676.577402> [gRC] main thread is non-idle! display spinner!

 

But it breaks dts downmix for movies in mkv containers on dreambox and vu receivers right?

 

So in your patch you'll make an exception for file:// sources.

 

But what if I upload my mkv movie to my web-server and play it from http://myserver/mymovie.mkv

Then the exception will not  occur and dts downmix will still be broken right?



Re: GStreamer 1.0 #2077 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 November 2015 - 16:31

@MastaG

 

 

Then the exception will not  occur and dts downmix will still be broken right?

That's right. And also the sometimes (those are at wild sometimes not sometimes well) at media start by mkv containers on a duo2 . That last is not a very bigg problem since it alls come back quick however missing a second or two off audio is a annoying issue.



Re: GStreamer 1.0 #2078 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 30 November 2015 - 16:37

@MastaG

 

 

But it breaks dts downmix for movies in mkv containers on dreambox and vu receivers right?

 

It breaks dts downmix actually for every receiver which needs gstreamer software based downmix. the duo2 is not part off that list but the ones I knwo are :

 

dm8000, dm800se and a couple off et boxes.

 

(all the one who need --with-dtsdownmix option by dvbmediasink conf)


Edited by christophecvr, 30 November 2015 - 16:38.


Re: GStreamer 1.0 #2079 MastaG

  • Senior Member
  • 1,531 posts

+118
Excellent

Posted 30 November 2015 - 16:49

Hmm.

 

Now what if you just alter your patch for all media (not just file://)

 

Something like:

 

#if GST_VERSION_MAJOR >= 1
                    if(m_gst_playbin)
                    {
                        gst_element_set_state(m_gst_playbin, GST_STATE_PAUSED);
                        m_paused = true;
                    }
#endif

 

Will it break other things if used on anything other besides file://?

 

Also isn't there another way to fix dts downmix? eg wait a bit until all info for every sink is known.



Re: GStreamer 1.0 #2080 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 30 November 2015 - 17:16

Why don't you try the following? It will work for all cases, without extra variables, not only for GStreamer 1.0 etc etc.

diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
index f6729ab..ea4bbd4 100644
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -750,7 +750,7 @@ RESULT eServiceMP3::start()
        {
                eDebug("[eServiceMP3] starting pipeline");
                GstStateChangeReturn ret;
-               ret = gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING);
+               ret = gst_element_set_state (m_gst_playbin, GST_STATE_PAUSED);

                switch(ret)
                {
@@ -2030,6 +2030,8 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
                                if (m_errorInfo.missing_codec.find("video/") == 0 || (m_errorInfo.missing_codec.find("audio/") == 0 && m_audioStreams.empty()))
                                        m_event((iPlayableService*)this, evUser+12);
                        }
+
+                       gst_element_set_state (m_gst_playbin, GST_STATE_PLAYING);
                        break;
                }
                case GST_MESSAGE_ELEMENT:

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916



2 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


    Bing (1)