Jump to content


mx3L

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

#480012 GStreamer 1.0

Posted by mx3L on 9 March 2015 - 10:52

Buffering settings for playbin are not optimal. Currently we have buffer-size set to 5MB and buffer-duration set to 5 seconds. When one of this values is reached durring buffering than buffering stops.

This means that buffer-size of 5MB is almost never filled, since buffer-duration is too low.

 

For example:

 

SD media(45min - 350MB) : ~650KB/5s
HD media(90min - 4000MB) : ~3700KB/5s

 

This causes prefill buffer mode to be almost unusable, because of incessant re-buffering, since buffer is immediately drained after reaching 100% to bigger HW buffer.

 

So either we should increase buffer duration to some reasonable limit ~40s or turn it off, meaning that buffering will always stop after it reaches 5MB, which significantnly reduces re-buffering.

 

 

I did tests on et6500 with gst1.0:

 

There is no bottleneck on source's side

 

buffer-duration 5s:

- default buffer mode - 410MB/50min(SD)  sometimes stuttering

- default buffer mode - 900MB/50min(HD) stuttering

- prefill buffer mode - 410MB/50min(SD)  endless re-buffering

- prefill buffer mode - 900MB/50min(HD) endless re-buffering

 

buffer-duration turned off:

- default buffer mode - 410MB/50min(SD)  seamless playback

- default buffer mode - 900MB/50min(HD) stuttering

- prefill buffer mode - 410MB/50min(SD)  seamless playback

- prefill buffer mode - 900MB/50min(HD) one time re-buffering, then seamless playback

 

So it improves buffering performance, mainly in prefill buffer mode.

Attached Files




#473352 GStreamer 1.0

Posted by mx3L on 2 February 2015 - 08:45

0001-enable-gstreamer1.0-support-in-configure.ac.patch - openpli-plugins-enigma2

other patches - openpli-oe-core




#472395 GStreamer 1.0

Posted by mx3L on 27 January 2015 - 22:36

Now it applies cleanly, this patch should be added directly to openpli-plugins-enigma2 git.

 

and this to openpli-oe-core:

diff --git a/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugins.bb b/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugins.bb
index d02d5c5..1f054e9 100644
--- a/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugins.bb
+++ b/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugins.bb
@@ -31,6 +31,7 @@ EXTRA_OECONF = " \
        STAGING_INCDIR=${STAGING_INCDIR} \
        STAGING_LIBDIR=${STAGING_LIBDIR} \
        --without-debug \
+       ${@base_contains("GST_VERSION", "1.0", "--with-gstversion=1.0", "", d)} \
        ${@base_contains("MACHINE_FEATURES", "tpm", "--with-tpm" , "", d)} \
 "
 




#458187 GStreamer 1.0

Posted by mx3L on 29 November 2014 - 07:38

updated patch (pts_written flag was not set):

diff --git a/gstdvbvideosink.c b/gstdvbvideosink.c
index 8ce68cd..ccc4497 100755
--- a/gstdvbvideosink.c
+++ b/gstdvbvideosink.c
@@ -850,7 +850,7 @@ static GstFlowReturn gst_dvbvideosink_render(GstBaseSink *sink, GstBuffer *buffe
 #if GST_VERSION_MAJOR < 1
        if (GST_BUFFER_TIMESTAMP(buffer) != GST_CLOCK_TIME_NONE)
 #else
-       if (GST_BUFFER_PTS_IS_VALID(buffer) || (self->codec_type == CT_DIVX311 && GST_BUFFER_DTS_IS_VALID(buffer)))
+       if (GST_BUFFER_PTS_IS_VALID(buffer) || ((self->codec_type == CT_DIVX311 || (self->codec_type == CT_MPEG4_PART2 && !GST_BUFFER_FLAG_IS_SET(buffer, GST_BUFFER_FLAG_DELTA_UNIT))) && GST_BUFFER_DTS_IS_VALID(buffer)))
 #endif
        {
                pes_header[7] = 0x80; /* pts */
@@ -1233,7 +1233,7 @@ static GstFlowReturn gst_dvbvideosink_render(GstBaseSink *sink, GstBuffer *buffe
 #if GST_VERSION_MAJOR < 1
        if (GST_BUFFER_TIMESTAMP(buffer) != GST_CLOCK_TIME_NONE)
 #else
-       if (GST_BUFFER_PTS_IS_VALID(buffer) || (self->codec_type == CT_DIVX311 && GST_BUFFER_DTS_IS_VALID(buffer)))
+       if (GST_BUFFER_PTS_IS_VALID(buffer) || ((self->codec_type == CT_DIVX311 || (self->codec_type == CT_MPEG4_PART2 && !GST_BUFFER_FLAG_IS_SET(buffer, GST_BUFFER_FLAG_DELTA_UNIT))) && GST_BUFFER_DTS_IS_VALID(buffer)))
 #endif
        {
                self->pts_written = TRUE;

Every test file in post #289 now works also directly from HTTPS source.

Attached Files




#453479 GStreamer 1.0

Posted by mx3L on 7 November 2014 - 10:40

That was quick :)

"profile" field is only added in caps for mpeg4 in mp4 video format and not for mpeg4 in avi, at least that's my experience




#453463 GStreamer 1.0

Posted by mx3L on 7 November 2014 - 09:43

Patches for third solution

--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -486,7 +486,8 @@ gst_riff_create_video_caps (guint32 codec_fcc,
     case GST_MAKE_FOURCC ('R', 'M', 'P', '4'):
       caps = gst_caps_new_simple ("video/mpeg",
           "mpegversion", G_TYPE_INT, 4,
-          "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
+          "systemstream", G_TYPE_BOOLEAN, FALSE,
+          "fourcc", G_TYPE_UINT, codec_fcc, NULL);
       if (codec_name)
         *codec_name = g_strdup ("MPEG-4");
       break;

diff --git a/gstdvbvideosink.c b/gstdvbvideosink.c
index d8d5635..e6f8002 100755
--- a/gstdvbvideosink.c
+++ b/gstdvbvideosink.c
@@ -1299,6 +1299,22 @@ static gboolean gst_dvbvideosink_set_caps(GstBaseSink *basesink, GstCaps *caps)
                        break;
                        case 4:
                        {
+                               streamtype = 4;
+#if GST_VERSION_MAJOR >= 1
+                               guint32 fourcc = 0;
+                               gst_structure_get_uint(structure, "fourcc", &fourcc);
+                               switch (fourcc)
+                               {
+                                       case GST_MAKE_FOURCC('R', 'M', 'P', '4'):
+                                       case GST_MAKE_FOURCC('x', 'v', 'i', 'd'):
+                                       case GST_MAKE_FOURCC('X', 'V', 'I', 'D'):
+                                               streamtype = 10;
+#ifdef PACK_UNPACKED_XVID_DIVX5_BITSTREAM
+                                               self->must_pack_bitstream = TRUE;
+#endif
+                                       break;
+                               }
+#endif
                                const GValue *codec_data = gst_structure_get_value(structure, "codec_data");
                                if (codec_data)
                                {
@@ -1307,8 +1323,7 @@ static gboolean gst_dvbvideosink_set_caps(GstBaseSink *basesink, GstCaps *caps)
                                        self->codec_type = CT_MPEG4_PART2;
                                        gst_buffer_ref (self->codec_data);
                                }
-                               streamtype = 4;
-                               GST_INFO_OBJECT (self, "MIMETYPE video/mpeg4 -> VIDEO_SET_STREAMTYPE, 4");
+                               GST_ELEMENT_INFO (self, STREAM, FORMAT, (NULL), ("MIMETYPE video/mpeg4 -> VIDEO_SET_STREAMTYPE, %d",streamtype));
                        }
                        break;
                        default:




#452980 GStreamer 1.0

Posted by mx3L on 5 November 2014 - 09:40

So the best solution is to put all available timestamps(PTS/DTS) to PES packet so decoder can choose what it needs.

I managed to do that, tested on et4x00 and playback of xvid/divx is flawless.

 

Please test

 

 

Attached Files




#451790 GStreamer 1.0

Posted by mx3L on 29 October 2014 - 10:37

There is a problem with playback of HTTPS streams.
 

gst-launch-1.0 playbin uri='https://r3---sn-nf5o-cune.googlevideo.com/videoplayback?sparams=id%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cratebypass%2Crequiressl%2Csource%2C
upn%2Cexpire&itag=22&id=o-ACJOt5TMeGnFpXs_EIp9XIEu9IV-AfhihawzjYvKB0te&source=youtube&ratebypass=yes&initcwndbps=2307500&ip=91.219.132.80&key=yt5&fexp=912130%2C914020%2C917000%2C924637%2C927622%2C930666%2C93067
2%2C931983%2C932404%2C947209%2C952302%2C952901%2C955102%2C957103&expire=1414536219&sver=3&mv=m&mt=1414514563&signature=7F5C5F9795251F2F1C5CAF5FFD5F921174E94CA8.50B604DAECD4161FCD4B4D1EE8F65F3A62934193&ms=au&mm=
31&ipbits=0&requiressl=yes&upn=ObSfxayrIVA'
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source: Secure connection setup failed.
Additional debug info:
/home/marko/git/openpli-oe-core/build/tmp/work/mips32el-oe-linux/gstreamer1.0-plugins-good/1.4.3-r0/gst-plugins-good-1.4.3/ext/soup/gstsouphttpsrc.c(1502): gst_soup_http_src_parse_status (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstSoupHTTPSrc:source:
Unacceptable TLS certificate (6), URL: https://r3---sn-nf5o-cune.googlevideo.com/videoplayback?sparams=id%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&itag=22&id=o-ACJOt5TMeGnFpXs_EIp9XIEu9IV-AfhihawzjYvKB0te&source=youtube&ratebypass=yes&initcwndbps=2307500&ip=91.219.132.80&key=yt5&fexp=912130%2C914020%2C917000%2C924637%2C927622%2C930666%2C930672%2C931983%2C932404%2C947209%2C952302%2C952901%2C955102%2C957103&expire=1414536219&sver=3&mv=m&mt=1414514563&signature=7F5C5F9795251F2F1C5CAF5FFD5F921174E94CA8.50B604DAECD4161FCD4B4D1EE8F65F3A62934193&ms=au&mm=31&ipbits=0&requiressl=yes&upn=ObSfxayrIVA, Redirect to: (NULL)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...


This is related to change in latest gstreamer version:
 

Gstreamer 1.4.3 introduced for souphttpsrc: Add properties for selecting SSL/TLS certificate checking
And by default properly check certificates against the system's CA certificates. Everything else is not a good default at all.

 



I managed to playback this video with ssl-strict option turned off:

gst-launch-1.0 -v souphttpsrc ssl-strict=false location='https://r3---sn-nf5o-cune.googlevideo.com/videoplayback?sparams=id%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmm%2Cms%2Cmv%2Crateby
pass%2Crequiressl%2Csource%2Cupn%2Cexpire&itag=22&id=o-ACJOt5TMeGnFpXs_EIp9XIEu9IV-AfhihawzjYvKB0te&source=youtube&ratebypass=yes&initcwndbps=2307500&ip=91.219.132.80&key=yt5&fexp=912130%2C914020%2C917000%2C924
637%2C927622%2C930666%2C930672%2C931983%2C932404%2C947209%2C952302%2C952901%2C955102%2C957103&expire=1414536219&sver=3&mv=m&mt=1414514563&signature=7F5C5F9795251F2F1C5CAF5FFD5F921174E94CA8.50B604DAECD4161FCD4B4
D1EE8F65F3A62934193&ms=au&mm=31&ipbits=0&requiressl=yes&upn=ObSfxayrIVA' !queue!qtdemux!dvbvideosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstDVBVideoSink:dvbvideosink0.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)high\,\ codec_data\=\(buffer\)0164001fffe1001c6764001facb4028022fcdff819081900800001f480005dc0078c195001000468ee3cb0\,\ width\=\(int\)1280\,\ height\=\(int\)534\,\ framerate\=\(fraction\)24000/1001\,\ pixel-aspect-ratio\=\(fraction\)801/800"
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

So in case we don't figure out why ssl-strict option enabled doensn't work, even with ca-certificates package installed, we could turn it off.

 

Attached Files




#450369 GStreamer 1.0

Posted by mx3L on 21 October 2014 - 06:25

athoik,

 

I was refering to this

 

Most of my movies are working without a problem, although there are some movies that don't play smoothly (they have the same problem as mx3L notice on #137)

So I mean movies that didn't play smoothly.

 

What I found out about this issue:

 

Video de-sync is issue for xvid and probably 3ivx videos. dvbvideosink has specific treatment for these video codecs, but it's not triggered because mimetypes for xvid(video/x-xvid) and 3ivx(video/x-3ivx) are no longer propagated, instead both use video/mpeg mimetype with mpegversion 4.

This means that dvbvideosink is playing xvid videos as mpeg4 videos.

 

It looks like that this was introduced by these two commits:

http://cgit.freedesk...03014f7b5b0cb7f

http://cgit.freedesk...d793701d1c376b9

 

So I was trying to fix the issue just by reverting them, but this is probably not a proper way, I was debugging riff, and it looks like xvid will be somewhere in caps, so patch for dvbmediasink will suffice. Will try and post patches in case of success.




#429373 ET9200 problems with mp4 playback

Posted by mx3L on 17 June 2014 - 14:13

We are not using keyframe seeking, and it looks like it's problem for some receivers. I found mp4 which has exactly same problems like this. After enabling keyframe seeking there is no freezing anymore.

 

 

Attached Files




#334163 Build environment.

Posted by mx3L on 13 February 2013 - 18:23

We will see..
http://www.et-view-s...6-VP6-On2-codec