Jump to content


Photo

IPTV (gstreamer) recording


  • Please log in to reply
99 replies to this topic

Re: IPTV (gstreamer) recording #41 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 18 July 2015 - 12:48

If you open timeline you'll see that getLength() is called every half second or second. Problem is that gstreamer don't recognize that file size grows. I need to check but I think E2 don't get DURATION_CHANGED messages.


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: IPTV (gstreamer) recording #42 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 18 July 2015 - 12:59

I don not know if this is involved but progresstime keeping in dvbmediasink is done by :

 

Audiosink

static gint64 gst_dvbaudiosink_get_decoder_time(GstDVBAudioSink *self)
{
	gint64 cur = 0;
	if (self->fd < 0 || !self->playing || !self->pts_written){return GST_CLOCK_TIME_NONE;}

	ioctl(self->fd, AUDIO_GET_PTS, &cur);
	if (cur)
	{
		self->lastpts = cur;
	}
	else
	{
		cur = self->lastpts;
	}
	cur *= 11111;
	cur -= self->timestamp_offset;

	return cur;
}

Video sink

static gint64 gst_dvbvideosink_get_decoder_time(GstDVBVideoSink *self)
{
	gint64 cur = 0;
	if (self->fd < 0 || !self->playing || !self->pts_written) return GST_CLOCK_TIME_NONE;

	ioctl(self->fd, VIDEO_GET_PTS, &cur);
	if (cur)
	{
		self->lastpts = cur;
	}
	else
	{
		cur = self->lastpts;
	}
	cur *= 11111;
	cur -= self->timestamp_offset;

	return cur;
}


Re: IPTV (gstreamer) recording #43 mman

  • Senior Member
  • 218 posts

0
Neutral

Posted 18 July 2015 - 13:06

can anyone tell me from where I can download gstreamer? thank you

Re: IPTV (gstreamer) recording #44 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 18 July 2015 - 13:11

That is only used for current play position. Problem is in this case the getLength().

 

I was a little bit wrong. getLength returns growing values:

eServiceMP3::getLength() returned pts 5866798
eServiceMP3::getLength() returned pts 5894428
eServiceMP3::getLength() returned pts 5931599
eServiceMP3::getLength() returned pts 5967599
eServiceMP3::getLength() returned pts 5998109
eServiceMP3::getLength() returned pts 5998109
eServiceMP3::getSubtitleList finished
poll: unhandled POLLERR/HUP/NVAL for fd 47(16)
eServiceMP3::getLength() returned pts 6750787
eServiceMP3::getLength() returned pts 6750787
eServiceMP3::getLength() returned pts 6750787
eServiceMP3::getLength() returned pts 6750787
eServiceMP3::getLength() returned pts 6750787

But I guess filesrc reads so fast the file that it reads to the end of the file within seconds and returns then EOF. It don't wait long enough for new incoming bits.

 

@mman: Gstreamer is included in the image. Or do you mean the source code?

 

Edit: I don't get GST_MESSAGE_DURATION_CHANGED messages


Edited by betacentauri, 18 July 2015 - 13:12.

Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: IPTV (gstreamer) recording #45 mman

  • Senior Member
  • 218 posts

0
Neutral

Posted 18 July 2015 - 13:21

yes, the source code also, and gstreamer also, in which section is included? maybe I need to update the image?

Re: IPTV (gstreamer) recording #46 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 18 July 2015 - 13:27

Gstreamer is built-in. It's not a plugin you can see in the plugin browser. And you cannot update it yourself. It will be updated automatically during image update.

Here is the source code:
http://cgit.freedesktop.org/gstreamer/

Please use other/new thread for more basic questions regarding gstreamer.


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: IPTV (gstreamer) recording #47 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 18 July 2015 - 14:01

If you start the recording and then wait 5-10 maybe 15 minutes it works. I guess the buffer in the gstreamer filesrc gets filled. If current file size is smaller than buffer size then filesrc can read the whole file in one chunk and sends then EOS signal. If buffer is smaller than file size, buffer size is read and filesrc waits for data processing before reading next chunk.

 

Solutions? Maybe set smaller buffer size. I guess it's not a good idea. Better would be an adaption of gstreamer filesrc. It should not send EOS immediately after reaching end of file.


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: IPTV (gstreamer) recording #48 christophecvr

  • Senior Member
  • 3,131 posts

+140
Excellent

Posted 18 July 2015 - 14:36

If you start the recording and then wait 5-10 maybe 15 minutes it works. I guess the buffer in the gstreamer filesrc gets filled. If current file size is smaller than buffer size then filesrc can read the whole file in one chunk and sends then EOS signal. If buffer is smaller than file size, buffer size is read and filesrc waits for data processing before reading next chunk.

 

Solutions? Maybe set smaller buffer size. I guess it's not a good idea. Better would be an adaption of gstreamer filesrc. It should not send EOS immediately after reaching end of file.

Yes that's then something for the dvbmediasink,

 

But ... If You do not do that And You play for example a cd it will stop playing after the song and hang. The user will have to select each time to play further.

However it's well something into that direction. Perhaps a check on file grow or not before an eos is send something like that.



Re: IPTV (gstreamer) recording #49 Bobsilvio

  • Member
  • 20 posts

0
Neutral

Posted 23 July 2015 - 15:10

this patch only recording? no timeshift?



Re: IPTV (gstreamer) recording #50 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 23 July 2015 - 19:28

Good question. Never tried it. But I think extra code is needed for timeshift. Perhaps I take a look at it.
In the meantime start an instant recording and switch to movie player (but read my posts above, a buffer of some minutes is currently needed).
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: IPTV (gstreamer) recording #51 daif01

  • Senior Member
  • 48 posts

0
Neutral

Posted 28 July 2015 - 13:50

Thank you very much for this great effort. You are genius. I can not receive my favorite channel in northern Sweden although i have 150 cm dish. I can stream my channels to enigma2 as iptv . At day time i am at work , now i can record my iptv channel at day time thanks to you. The only problem is that stream stops working when use Gstreamer 0.1 as in current openpli image. with Gstreamer 1.4.5 works fine. I want to test the patch with Gstreamer 1.4.5. Please how can i apply his patch to Gstreamer 1.4.5 ? which path in enigam2 goes patch till? whats is / are telenet commands.

Thanlks in advance.



Re: IPTV (gstreamer) recording #52 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 28 July 2015 - 18:35

Thanks!

Where did you get the Gstreamer 1.4.5 image? Is it an OpenPli image? If you build it by yourself, just update your environment and start new build.

It's not easy (better to say almost impossible) to patch an existing image. You need a build environment with exact the same sources.

 

If you use an OE-A image, just update the image. Several images are already using my patch (OpenATV, OpenXTA,...).


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: IPTV (gstreamer) recording #53 dylantje

  • Senior Member
  • 2,406 posts

+19
Neutral

Posted 29 July 2015 - 22:58

thanks


Mut@nt HD51 with PLi 7.2 release - Cccam, PLi HD skin, HDD-1,5TB, USB DVB-T,4GB usb backupsuite. AB: harmony smartcontrol 

XTrend ET6500 with PLi 7.2 release - PLi HD skin, Stream remote, 2GB usb backupsuite. AB: Harmony 650 , 1x zgemma h2h with Cccam.

Met een USB Dvb-T Triax 78cm, 2x ALPS quatro LNB /19,2 en 23,5, SAB GSO-multiswitch: 4 sat. in 12 out. 

 


Re: IPTV (gstreamer) recording #54 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 31 July 2015 - 18:52

How is it possible to add recording also to plugins?
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: IPTV (gstreamer) recording #55 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 31 July 2015 - 19:33

Hi,

 

recording logic is in RecordTimer.py if you follow "self.record_service", you will see that you can start simple recording like this:

def record(session, path, sref, name="", description="", tags=""):
    print "record: '%s' to '%s'"% (sref.getName(), path)
    rservice = session.nav.recordService(sref, simulate=False)
    # eServiceMP3Record::prepare(const char *filename, time_t begTime, time_t endTime, int eit_event_id, const char *name, const char *descr, const char *tags, bool descramble, bool recordecm)
    res = rservice.prepare(path, 0, 0, 0,name, description, tags, True, True)
    if res:
        print "record: rservice.prepare() failed - %s" % str(res)
        return
    res = rservice.start()
    if res:
        print "record: rservice.start() failed - %s" % str(res)
        return
    return rservice


Re: IPTV (gstreamer) recording #56 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 31 July 2015 - 20:36

I was hoping that inheriting an InfoBarRecord could be enough! So that any stream (even from plugins) to be able to get recorded, but it seems that every plugin requires changes.
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: IPTV (gstreamer) recording #57 mx3L

  • Senior Member
  • 616 posts

+79
Good

Posted 31 July 2015 - 22:02

Indeed that should be enough. but it looks like that to record with InfoBarInstantRecord is only possible when it's inherited in main InfoBar.



Re: IPTV (gstreamer) recording #58 rhurbarb

  • Senior Member
  • 143 posts

0
Neutral

Posted 10 August 2015 - 18:30

Hi ,Is there a fix for this crashlog please

 

Attribute error none type object has no attibute get frontline data

 

I updated to the latest image then tried to record ..

 

Thank you :mellow:



Re: IPTV (gstreamer) recording #59 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 10 August 2015 - 22:02

Please post crashlog. What skin do you use?


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: IPTV (gstreamer) recording #60 littlesat

  • PLi® Core member
  • 56,123 posts

+685
Excellent

Posted 10 August 2015 - 22:09

As far I understood I just merged the solution....

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users