[MPlayer-dev-eng] [RFC] Playing growing file
Doc Holliday
doc4holliday at gmail.com
Thu Jan 5 16:37:53 CET 2012
On 01/03/2012 08:47 PM, Vlad Seryakov wrote:
>>> Vlad Seryakov<vseryakov<at> gmail.com> writes:
>>> Hi,
>>> This is just some crazy idea i am thinking about while trying to figure out
>>> how to play MPEG TS recordings with
>>> mplayer. Really this is not full timeshift solution and never be, player is
>>> just a player but supporting
>>> growing file may be very useful.
>>>
>>> I decided to try with adding one function to stream_file.c which will handle
>>> pipe:// urls and just use different fill_buffer function which indefinitely reads
>>> from file but process events to avoid hangs.
>>>
>>> Just wondering what other think about this solution.
>>> Thanks
>>>
>
>> Hi Vlad,
>> I've run into a slight problem with your file. Specifically, while playing a
>> test mkv file, mplayer would just freeze. I realized that in some cases demux
>> might try to search all the way to the end of the file (eg in order to determine
>> its length), which will cause it to freeze.
>>
>> So I took liberty in adding a few lines and making it into an actual patch
>> (attached). I also changed the prefix from
>> pipe:// to grow://.
>> Hope you don't
>> mind ;)
>>
>> -Doc
>
> Hello Doc,
>
> No problem, i never thought it will make it but wanted to get opinion if it is possible. Actually, i wanted to use it with MPEG TS files only, recording from DVB tuner, never thought about playing other file formats. I've added some timeouts so it will exit if no data after some interval but never sent it. Without maintaining proper length it may work in very narrow cases and may never be usable generically. For example, in my case i do not care about duration, i have guide info and know how long any particular program will run for, but without it, duration is necessary and this may require updating all demuxers to detect new file length but for some formats even that may not work well
>
> Thanks
Hi Vlad, Incidentally, I am also playing back MPEG TS (or maybe PS, not
sure) files recorded by HVR-1950, but for testing I grabbed an .mkv,
which is where I discovered the problem.
You are correct about the length, although mplayer seems to be happily
playing MPEG files as long as new data keeps coming.
Unfortunately, in my particular case I do need to know the current
length of the file. And for that I have to resort to a special form of
hackery, which is made possible by your mod and is described in my other
post. :)
Anyway, thanks for your patch.
-D
More information about the MPlayer-dev-eng
mailing list