After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624455 - The matroska muxer seeks even when used with streamable=TRUE
The matroska muxer seeks even when used with streamable=TRUE
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-15 13:47 UTC by Per Smitt
Modified: 2010-07-22 10:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
matroskamux: streamable files need no _finish (7.73 KB, patch)
2010-07-16 10:53 UTC, Mark Nauwelaerts
committed Details | Review

Description Per Smitt 2010-07-15 13:47:54 UTC
Running the following gst-launch command:

GST_DEBUG=filesink:5 gst-launch videotestsrc num-buffers=60 ! ffenc_h263 ! matroskamux streamable=TRUE ! filesink location=/tmp/test.mkv sync=FALSE

And at the end there are seeks being performed even if streamable is set to true.

Extract from output:
0:00:00.199721337 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 7 bytes at 188053
0:00:00.199874736 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 2152 bytes at 188060
0:00:00.201741844 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 7 bytes at 190212
0:00:00.201889714 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 2169 bytes at 190219
0:00:00.203773242 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 19 bytes at 192388
0:00:00.203909031 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 2157 bytes at 192407
0:00:00.205776147 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 7 bytes at 194564
0:00:00.205911239 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 2152 bytes at 194571
0:00:00.207791437 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 7 bytes at 196723
0:00:00.207935346 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 2188 bytes at 196730
0:00:00.209804964 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 19 bytes at 198918
0:00:00.209985634 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 2157 bytes at 198937
0:00:00.211944574 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 7 bytes at 201094
0:00:00.212143894 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 2165 bytes at 201101
0:00:00.214208687 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 7 bytes at 203266
0:00:00.214356689 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 2164 bytes at 203273
0:00:00.216334855 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 19 bytes at 205437
0:00:00.216487392 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 2193 bytes at 205456
0:00:00.216652578 11631  0x9760270 DEBUG               filesink gstfilesink.c:504:gst_file_sink_do_seek:<filesink0> Seeking to offset 170293 using fseeko
0:00:00.216805163 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 8 bytes at 170293
0:00:00.216947841 11631  0x9760270 DEBUG               filesink gstfilesink.c:504:gst_file_sink_do_seek:<filesink0> Seeking to offset 207649 using fseeko
0:00:00.217089858 11631  0x9760270 DEBUG               filesink gstfilesink.c:504:gst_file_sink_do_seek:<filesink0> Seeking to offset 36 using fseeko
0:00:00.217223178 11631  0x9760270 DEBUG               filesink gstfilesink.c:643:gst_file_sink_render:<filesink0> writing 8 bytes at 36
0:00:00.217366385 11631  0x9760270 DEBUG               filesink gstfilesink.c:504:gst_file_sink_do_seek:<filesink0> Seeking to offset 207649 using fseeko
Got EOS from element "pipeline0".
Execution ended after 170615228 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
0:00:00.218223098 11631  0x975e070 DEBUG               filesink gstfilesink.c:442:gst_file_sink_close_file:<filesink0> closed file
Freeing pipeline ...
Comment 1 Mark Nauwelaerts 2010-07-16 10:53:46 UTC
Created attachment 166013 [details] [review]
matroskamux: streamable files need no _finish

The only thing still done for streamable files in _finish (and causing seeks) was the writing of the last cluster size and segment size.
The former was not being done for other clusters and then presumably similar (streaming) semantics mean it need not be done for segment size either.

So, there is no need to _finish at all a streamable file, which attached patch takes care of.
Comment 2 Per Smitt 2010-07-16 12:42:43 UTC
I have tested the patch and I can verify that the seek is gone. However files created this way when streamable=TRUE cannot be played in vlc or Windows Media Player.

This is true both before and after the patch. To play mkv with Windows Media Player I installed the CCCP (codec pack) in Windows. If streamable is set to FALSE both vlc and Windows Media Player accepts the file.

I am uncertain if this is part of the same issue, another muxer issue or even maybe a vlc and WMP issue and not a GStreamer issue at all.
Comment 3 Mark Nauwelaerts 2010-07-16 13:48:21 UTC
It seems that files created with streamable=TRUE cannot be played in vlc with or without this latest patch.  Most likely that is due to cluster sizes being (inherently) indefinite in the streaming case.  So, that's basically a limitation/bug for those players.
Comment 4 Mark Nauwelaerts 2010-07-22 10:21:54 UTC
commit 4b76e95abe6b1cc8fc7d48d5107f857c676585c4
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Fri Jul 16 12:46:50 2010 +0200

    matroskamux: streamable files need no _finish
    
    Fixes #624455.