playing, seeking form a non closed mkv file

Farkas Levente lfarkas at
Thu Apr 10 06:40:28 PDT 2014

On 04/03/2014 09:17 AM, Sebastian Dröge wrote:
> On Do, 2014-04-03 at 07:44 +0200, Edward Hervey wrote:
>> Hi,
>> On Wed, 2014-04-02 at 19:11 +0200, Peter BOCZ wrote:
>>> Hi,
>>> i  have a problem, let me introduce it form an example. I have
>>> a pipeline, which is recording video from a source to a file in
>>> matroska format. Meanwhile it is still recording the video i
>>> want to play back it from a different pipeline (maybe form
>>> another process), and it is working. But if I want to seek,
>>> play backward it is not working. Sometimes it's freezing,
>>> sometimes i get "gray" picture (decoded B frame whitout I
>>> frame). I know if i stop the recording as it have to (eos 
>>> ....), and the file will be closed, everything is good, if I
>>> didn't stop the pipleline well, i have the same problems. As i
>>> see (know) the problem is that in an unclosed file the
>>> seek_indexes are not reachable. My idea is to rewrite
>>> matroskademux and every time we seek parse the reachable part
>>> of the file like in the matrokskamux, and build the 
>>> seek_indexes to be able to seek as a closed one. Would you
>>> except such patch to gstreamer ?
>> "rewrite" might be a bit too strong of a word :)
>> Extending matroskademux to support progressively growing files
>> would be nice though. I think we already have this kind of
>> support for some of the demuxers (avidemux maybe ?).
> The only part missing for that is scanning the file when seeking on
> a file without seek table IIRC. Apart from that matroskademux
> should support incomplete files properly already, and that part
> shouldn't be too hard to implement if someone wants to do it :)

  Levente                               "Si vis pacem para bellum!"

More information about the gstreamer-devel mailing list