Page 1 of 1

Jumping in un-indexed files

Posted: 21 Jun 2009 14:17
by stevedee3
Hi,

The jump hotkeys ("Short forward jump", "Medium forward jump", etc) don't seem to work on MPEG TS files. I assume that this is because there is no index. ( :?: )

Is it possible to jump by a certain number of bytes instead, e.g. "Jump 1 Mb" or "Jump 20 Mb"?

Thanks.

Re: Jumping in un-indexed files

Posted: 21 Jun 2009 15:14
by Jean-Baptiste Kempf
No :D

Re: Jumping in un-indexed files

Posted: 21 Jun 2009 15:36
by stevedee3
Thanks

Re: Jumping in un-indexed files

Posted: 23 Jun 2009 03:31
by The DJ
The problem is that you can't know 100% sure for all formats, from those hotkeys wether timeseek is supported. :(

Re: Jumping in un-indexed files

Posted: 23 Jun 2009 13:35
by stevedee3
The problem is that you can't know 100% sure for all formats, from those hotkeys wether timeseek is supported. :(
Sorry, I'm not sure that I understand your response. Do you mean "the part of the software that implements these hotkeys doesn't know whether the current format supports time seeking"?

My goal is to be able to easily skip advertisements when playing DVB-T (MPEG-TS) recordings. At the moment I can seen two options:
  1. Use the rate control feature to fast forward through the ads, or
  2. Click on the time slider (although it's hard to guess where to click, especially for large files...)
Are there any other techniques that I haven't considered that may be suitable for this purpose?

Thanks.

Re: Jumping in un-indexed files

Posted: 23 Jun 2009 14:17
by The DJ
If all you are concerned with is MPEG-TS, then timeseeking is indeed impossible. The reason is because MPEG-TS does not require monotonic timestamps. Thus without fully parsing the MPEG-TS file, you cannot create an accurate time model for a file. Your options are:

1: Create a timeindex model by using a preparser and saving that result to a .idx file or something. Then implement support for your .idx file in VLC.
2: Create fallback behaviour in vlc that adds, or perhaps automatically switches to % based seeking.
3: Do what you proposed to forward trough the files.

Re: Jumping in un-indexed files

Posted: 24 Jun 2009 10:20
by stevedee3
Thanks for the feedback, DJ.
If all you are concerned with is MPEG-TS, then timeseeking is indeed impossible. The reason is because MPEG-TS does not require monotonic timestamps. Thus without fully parsing the MPEG-TS file, you cannot create an accurate time model for a file.
OK, I understand. This is why I asked about skipping by bytes - I assume that this is how clicking on the time slider works. There's no guarantee of exactly how much time you would advance/retract, but it's better than nothing.
3: Do what you proposed to forward trough the files.
My VLC development skills leave this as my only option for now :)

Re: Jumping in un-indexed files

Posted: 13 Jul 2009 23:26
by msteveb
This is something that has been bugging me for a long time too.

I use vlc to stream video from a Topfield PVR via ftp, and not being able to skip over ads is annoying.

I've created a patch which works well for me, but I'm not sure how well received it will be here.
Here is how it works.

As the stream is read, the first 10ms is examined (while playing) to estimate the mux rate based on the
PCR and the position in the stream. Subsequently, this mux rate is then used to estimate the length
of the file/stream (in seconds) and to estimate how far to skip when the hot keys are pressed.

Since the PCR isn't guaranteed can have discontinuities, any "unreasonable" value for the mux rate
is ignored and the calculation is done again.

If there is any interest, I can post my patch here.