Hi, I hope this is posted at the right place. I would like to enquire if there is any interest for an ffmpeg patch to (I think) the matroska muxer so that it would allow for live webm streams. The Matroska spec mentions it is possible to have live streams, given the stream is a little altered. Gstreamer has such a patch in place. Any pointers would be greatly appreciated. Best, Dirk
On Mon, May 09, 2011 at 06:05:03AM +0200, Dirk Griffioen wrote:
Hi,
I hope this is posted at the right place.
I would like to enquire if there is any interest for an ffmpeg patch to (I think) the matroska muxer so that it would allow for live webm streams.
The Matroska spec mentions it is possible to have live streams, given the stream is a little altered. Gstreamer has such a patch in place.
Any pointers would be greatly appreciated.
all contributions and improvments are welcome [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt.
On 11 May 2011, at 23:27, Michael Niedermayer <michaelni@gmx.at> wrote:
On Mon, May 09, 2011 at 06:05:03AM +0200, Dirk Griffioen wrote:
Hi,
I hope this is posted at the right place.
I would like to enquire if there is any interest for an ffmpeg patch to (I think) the matroska muxer so that it would allow for live webm streams.
The Matroska spec mentions it is possible to have live streams, given the stream is a little altered. Gstreamer has such a patch in place.
Any pointers would be greatly appreciated.
all contributions and improvments are welcome
And there were fixes, in principle that live format should be supported. Of course some corner-cases might still not work due to lack of testing.
On Sun, May 8, 2011 at 9:05 PM, Dirk Griffioen <dirk@code-shop.com> wrote:
Hi,
I hope this is posted at the right place.
I would like to enquire if there is any interest for an ffmpeg patch to (I think) the matroska muxer so that it would allow for live webm streams.
The Matroska spec mentions it is possible to have live streams, given the stream is a little altered. Gstreamer has such a patch in place.
I have interests in this topic. But I am wondering how to have a live stream with MKV file format. All the information is stored in the beginning of the file. Maybe chapter can be used? or what?
Any pointers would be greatly appreciated.
Best, Dirk
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
I have interests in this topic. But I am wondering how to have a live stream with MKV file format. All the information is stored in the beginning of the file. Maybe chapter can be used? or what?
Well, Gstreamer has a patch for webm streaming and the matrsoka spec says how it could be done (http://matroska.org/technical/streaming/index.html) So i guess these are good starting points. I would be interested to know which the fixes are Reimar mentions in his reply ... Dirk
On Thu, May 12, 2011 at 10:15 AM, Dirk Griffioen <dirk@code-shop.com> wrote:
I have interests in this topic. But I am wondering how to have a live stream with MKV file format. All the information is stored in the
beginning
of the file. Maybe chapter can be used? or what?
Well, Gstreamer has a patch for webm streaming and the matrsoka spec says how it could be done (http://matroska.org/technical/streaming/index.html)
Great, on the website, it mentions "A live Matroska stream is different than a file, because it may have no known end (only when the client disconnects). For that the Segment *must* use the "unknow" size (all 1s in the size). The other option would be to concatenate Segments with known sizes one after the other. This solution allows a change of codec/resolution between each segment which can be useful in some cases (switch between 4:3 and 16:9 in some TV programs for example). " I have test concatenate segments with know size together, but it dose not work. Maybe the approach I try to concatenate the segments is not correct. Is there anybody can help? Jianwen _______________________________________________
ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Great, on the website, it mentions "A live Matroska stream is different than a file, because it may have no known end (only when the client disconnects). For that the Segment *must* use the "unknow" size (all 1s in the size). The other option would be to concatenate Segments with known sizes one after the other. This solution allows a change of codec/resolution between each segment which can be useful in some cases (switch between 4:3 and 16:9 in some TV programs for example). "
I have test concatenate segments with know size together, but it dose not work. Maybe the approach I try to concatenate the segments is not correct. Is there anybody can help?
I dont have time at the moment, but I would suggest to look at the gstreamer patch there is also: http://realmike.org/ which describes how to do it with a little python help (see the matroska_live_filter.py script), this also might give valueable clues Best, Dirk
On Fri, May 13, 2011 at 12:01 AM, Dirk Griffioen <dirk@code-shop.com> wrote:
Great, on the website, it mentions "A live Matroska stream is different
a file, because it may have no known end (only when the client disconnects). For that the Segment *must* use the "unknow" size (all 1s in the size). The other option would be to concatenate Segments with known sizes one after
than the
other. This solution allows a change of codec/resolution between each segment which can be useful in some cases (switch between 4:3 and 16:9 in some TV programs for example). "
I have test concatenate segments with know size together, but it dose not work. Maybe the approach I try to concatenate the segments is not correct. Is there anybody can help?
I dont have time at the moment, but I would suggest to look at the gstreamer patch
there is also: http://realmike.org/
which describes how to do it with a little python help (see the matroska_live_filter.py script), this also might give valueable clue
Thanks, Dirk, I will read it. I hope I could figure it out and then I can contribute to this requirement in FFmpge. Regards, Jianwen
Best, Dirk _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
On Sat, May 14, 2011 at 11:43 PM, jianwen chen <jianwen.chen.video@gmail.com
wrote:
On Fri, May 13, 2011 at 12:01 AM, Dirk Griffioen <dirk@code-shop.com>wrote:
Great, on the website, it mentions "A live Matroska stream is different
a file, because it may have no known end (only when the client disconnects). For that the Segment *must* use the "unknow" size (all 1s in the size). The other option would be to concatenate Segments with known sizes one after
than the
other. This solution allows a change of codec/resolution between each segment which can be useful in some cases (switch between 4:3 and 16:9 in some TV programs for example). "
I have test concatenate segments with know size together, but it dose not work. Maybe the approach I try to concatenate the segments is not correct. Is there anybody can help?
I dont have time at the moment, but I would suggest to look at the gstreamer patch
there is also: http://realmike.org/
which describes how to do it with a little python help (see the matroska_live_filter.py script), this also might give valueable clue
Thanks, Dirk, I will read it. I hope I could figure it out and then I can contribute to this requirement in FFmpge.
I have read the code and the webpages, according to the code and the Matroska specification, we know a live stream is designated by setting the “Segment” size to “unknown”. I set the size to a very large value and setting the duration of the video to 100 hours as the python script does. And I also delete the “SeekHead” elements ) and “Cues” elements in 2 mkv files. cat 1split-004-largesize- changeduration-removeseekhead-recues.webm 2split-001-large-chaduration-rmseek-rmcue.webm > aaa.webm But the file aaa.webm can only be played for the 1st segment. What I want to do is concatenate the 2 segments together as a file and the file can be played one segment by one segment. Is there anything wrong above result in this? The detailed info is followed: File1 # mkvinfo 1split-004-largesize-changeduration-removeseekhead-recues.webm + EBML head |+ EBML version: 1 |+ EBML read version: 1 |+ EBML maximum ID length: 4 |+ EBML maximum size length: 8 |+ Doc type: webm |+ Doc type version: 2 |+ Doc type read version: 2 + Segment, size unknown |+ EbmlVoid (size: 4045) |+ Segment information | + Timecode scale: 1000000 | + Muxing application: libebml v1.0.0 + libmatroska v1.0.0 | + Writing application: mkvmerge v4.0.0 ('The Stars were mine') built on Jun 17 2010 18:47:20 | + Duration: 2766143.488s (768:22:23.488) | + Date: Wed May 11 06:02:42 2011 UTC | + Segment UID: 0xfb 0x46 0x6a 0x88 0x4f 0xab 0xd3 0x94 0xa1 0xfd 0xf6 0xa7 0xba 0x5d 0x60 0x35 |+ Segment tracks | + A track | + Track number: 1 | + Track UID: 1 | + Track type: video | + Default flag: 0 | + MinCache: 1 | + Codec ID: V_VP8 | + Default duration: 41.708ms (23.976 fps for a video track) | + Language: und | + Video track | + Pixel width: 640 | + Pixel height: 360 | + Display width: 640 | + Display height: 360 | + A track | + Track number: 2 | + Track UID: 2 | + Track type: audio | + Default flag: 0 | + Codec ID: A_VORBIS | + CodecPrivate, length 4189 | + Language: und | + Audio track | + Sampling frequency: 44100 | + Channels: 2 |+ EbmlVoid (size: 1081) |+ Cluster File2 $ mkvinfo 2split-001-large-chaduration-rmseek-rmcue.webm + EBML head |+ EBML version: 1 |+ EBML read version: 1 |+ EBML maximum ID length: 4 |+ EBML maximum size length: 8 |+ Doc type: webm |+ Doc type version: 2 |+ Doc type read version: 2 + Segment, size unknown |+ EbmlVoid (size: 4045) |+ Segment information | + Timecode scale: 1000000 | + Muxing application: libebml v1.0.0 + libmatroska v1.0.0 | + Writing application: mkvmerge v4.0.0 ('The Stars were mine') built on Jun 17 2010 18:47:20 | + Duration: 8585740.288s (2384:55:40.288) | + Date: Wed May 11 06:09:38 2011 UTC | + Segment UID: 0x12 0xea 0xf1 0x7f 0xb0 0x17 0x15 0x97 0xfb 0x67 0xd7 0x7b 0x91 0x28 0x2d 0xa3 |+ Segment tracks | + A track | + Track number: 1 | + Track UID: 1 | + Track type: video | + Default flag: 0 | + MinCache: 1 | + Codec ID: V_VP8 | + Default duration: 41.708ms (23.976 fps for a video track) | + Language: und | + Video track | + Pixel width: 640 | + Pixel height: 360 | + Display width: 640 | + Display height: 360 | + A track | + Track number: 2 | + Track UID: 2 | + Track type: audio | + Default flag: 0 | + Codec ID: A_VORBIS | + CodecPrivate, length 4189 | + Language: und | + Audio track | + Sampling frequency: 44100 | + Channels: 2 |+ EbmlVoid (size: 1081) |+ Cluster By the way, I find, if I just cat 1file 2 file > test.webm without any modification of the original mkv files, the test webm file can be played well by vlc, but can not played correctly by Mplayer. Thanks, Jianwen
On Wed, May 18, 2011 at 4:49 PM, jianwen chen <jianwen.chen.video@gmail.com>wrote:
On Sat, May 14, 2011 at 11:43 PM, jianwen chen < jianwen.chen.video@gmail.com> wrote:
On Fri, May 13, 2011 at 12:01 AM, Dirk Griffioen <dirk@code-shop.com>wrote:
Great, on the website, it mentions "A live Matroska stream is different
than
a file, because it may have no known end (only when the client disconnects). For that the Segment *must* use the "unknow" size (all 1s in the size). The other option would be to concatenate Segments with known sizes one after the other. This solution allows a change of codec/resolution between each segment which can be useful in some cases (switch between 4:3 and 16:9 in some TV programs for example). "
I have test concatenate segments with know size together, but it dose not work. Maybe the approach I try to concatenate the segments is not correct. Is there anybody can help?
I dont have time at the moment, but I would suggest to look at the gstreamer patch
there is also: http://realmike.org/
which describes how to do it with a little python help (see the matroska_live_filter.py script), this also might give valueable clue
Thanks, Dirk, I will read it. I hope I could figure it out and then I can contribute to this requirement in FFmpge.
I have read the code and the webpages, according to the code and the Matroska specification, we know a live stream is designated by setting the “Segment” size to “unknown”. I set the size to a very large value and setting the duration of the video to 100 hours as the python script does. And I also delete the “SeekHead” elements ) and “Cues” elements in 2 mkv files.
cat 1split-004-largesize- changeduration-removeseekhead-recues.webm 2split-001-large-chaduration-rmseek-rmcue.webm > aaa.webm
But the file aaa.webm can only be played for the 1st segment.
What I want to do is concatenate the 2 segments together as a file and the file can be played one segment by one segment. Is there anything wrong above result in this?
The detailed info is followed: File1 # mkvinfo 1split-004-largesize-changeduration-removeseekhead-recues.webm + EBML head |+ EBML version: 1 |+ EBML read version: 1 |+ EBML maximum ID length: 4 |+ EBML maximum size length: 8 |+ Doc type: webm |+ Doc type version: 2 |+ Doc type read version: 2 + Segment, size unknown |+ EbmlVoid (size: 4045) |+ Segment information | + Timecode scale: 1000000 | + Muxing application: libebml v1.0.0 + libmatroska v1.0.0 | + Writing application: mkvmerge v4.0.0 ('The Stars were mine') built on Jun 17 2010 18:47:20 | + Duration: 2766143.488s (768:22:23.488) | + Date: Wed May 11 06:02:42 2011 UTC | + Segment UID: 0xfb 0x46 0x6a 0x88 0x4f 0xab 0xd3 0x94 0xa1 0xfd 0xf6 0xa7 0xba 0x5d 0x60 0x35 |+ Segment tracks | + A track | + Track number: 1 | + Track UID: 1 | + Track type: video | + Default flag: 0 | + MinCache: 1 | + Codec ID: V_VP8 | + Default duration: 41.708ms (23.976 fps for a video track) | + Language: und | + Video track | + Pixel width: 640 | + Pixel height: 360 | + Display width: 640 | + Display height: 360 | + A track | + Track number: 2 | + Track UID: 2 | + Track type: audio | + Default flag: 0 | + Codec ID: A_VORBIS | + CodecPrivate, length 4189 | + Language: und | + Audio track | + Sampling frequency: 44100 | + Channels: 2 |+ EbmlVoid (size: 1081) |+ Cluster
File2 $ mkvinfo 2split-001-large-chaduration-rmseek-rmcue.webm + EBML head |+ EBML version: 1 |+ EBML read version: 1 |+ EBML maximum ID length: 4 |+ EBML maximum size length: 8 |+ Doc type: webm |+ Doc type version: 2 |+ Doc type read version: 2 + Segment, size unknown |+ EbmlVoid (size: 4045) |+ Segment information | + Timecode scale: 1000000 | + Muxing application: libebml v1.0.0 + libmatroska v1.0.0 | + Writing application: mkvmerge v4.0.0 ('The Stars were mine') built on Jun 17 2010 18:47:20 | + Duration: 8585740.288s (2384:55:40.288) | + Date: Wed May 11 06:09:38 2011 UTC | + Segment UID: 0x12 0xea 0xf1 0x7f 0xb0 0x17 0x15 0x97 0xfb 0x67 0xd7 0x7b 0x91 0x28 0x2d 0xa3 |+ Segment tracks | + A track | + Track number: 1 | + Track UID: 1 | + Track type: video | + Default flag: 0 | + MinCache: 1 | + Codec ID: V_VP8 | + Default duration: 41.708ms (23.976 fps for a video track) | + Language: und | + Video track | + Pixel width: 640 | + Pixel height: 360 | + Display width: 640 | + Display height: 360 | + A track | + Track number: 2 | + Track UID: 2 | + Track type: audio | + Default flag: 0 | + Codec ID: A_VORBIS | + CodecPrivate, length 4189 | + Language: und | + Audio track | + Sampling frequency: 44100 | + Channels: 2 |+ EbmlVoid (size: 1081) |+ Cluster
By the way, I find, if I just cat 1file 2 file > test.webm without any modification of the original mkv files, the test webm file can be played well by vlc, but can not played correctly by Mplayer.
Finally, I figure it out. I will write a detailed instruction about how to generate the webm streaming file, such as how to enable webm file http streaming. Thanks for all the kind help. By the way, how about provide a patch to enable this feature to ffmpeg? Jianwen
Finally, I figure it out. I will write a detailed instruction about how to generate the webm streaming file, such as how to enable webm file http streaming.
great!
Thanks for all the kind help. By the way, how about provide a patch to enable this feature to ffmpeg?
i would be interested - i could help testing if you want Dirk
On 5/23/2011 5:35 PM, jianwen chen wrote:
On Wed, May 18, 2011 at 4:49 PM, jianwen chen <jianwen.chen.video@gmail.com>wrote:
On Sat, May 14, 2011 at 11:43 PM, jianwen chen< jianwen.chen.video@gmail.com> wrote:
On Fri, May 13, 2011 at 12:01 AM, Dirk Griffioen<dirk@code-shop.com>wrote:
Great, on the website, it mentions "A live Matroska stream is different than a file, because it may have no known end (only when the client disconnects). For that the Segment *must* use the "unknow" size (all 1s in the size). The other option would be to concatenate Segments with known sizes one after the other. This solution allows a change of codec/resolution between each segment which can be useful in some cases (switch between 4:3 and 16:9 in some TV programs for example). "
I have test concatenate segments with know size together, but it dose not work. Maybe the approach I try to concatenate the segments is not correct. Is there anybody can help?
I dont have time at the moment, but I would suggest to look at the gstreamer patch
there is also: http://realmike.org/
which describes how to do it with a little python help (see the matroska_live_filter.py script), this also might give valueable clue
Thanks, Dirk, I will read it. I hope I could figure it out and then I can contribute to this requirement in FFmpge.
I have read the code and the webpages, according to the code and the Matroska specification, we know a live stream is designated by setting the “Segment” size to “unknown”. I set the size to a very large value and setting the duration of the video to 100 hours as the python script does. And I also delete the “SeekHead” elements ) and “Cues” elements in 2 mkv files.
cat 1split-004-largesize- changeduration-removeseekhead-recues.webm 2split-001-large-chaduration-rmseek-rmcue.webm> aaa.webm
But the file aaa.webm can only be played for the 1st segment.
What I want to do is concatenate the 2 segments together as a file and the file can be played one segment by one segment. Is there anything wrong above result in this?
The detailed info is followed: File1 # mkvinfo 1split-004-largesize-changeduration-removeseekhead-recues.webm + EBML head |+ EBML version: 1 |+ EBML read version: 1 |+ EBML maximum ID length: 4 |+ EBML maximum size length: 8 |+ Doc type: webm |+ Doc type version: 2 |+ Doc type read version: 2 + Segment, size unknown |+ EbmlVoid (size: 4045) |+ Segment information | + Timecode scale: 1000000 | + Muxing application: libebml v1.0.0 + libmatroska v1.0.0 | + Writing application: mkvmerge v4.0.0 ('The Stars were mine') built on Jun 17 2010 18:47:20 | + Duration: 2766143.488s (768:22:23.488) | + Date: Wed May 11 06:02:42 2011 UTC | + Segment UID: 0xfb 0x46 0x6a 0x88 0x4f 0xab 0xd3 0x94 0xa1 0xfd 0xf6 0xa7 0xba 0x5d 0x60 0x35 |+ Segment tracks | + A track | + Track number: 1 | + Track UID: 1 | + Track type: video | + Default flag: 0 | + MinCache: 1 | + Codec ID: V_VP8 | + Default duration: 41.708ms (23.976 fps for a video track) | + Language: und | + Video track | + Pixel width: 640 | + Pixel height: 360 | + Display width: 640 | + Display height: 360 | + A track | + Track number: 2 | + Track UID: 2 | + Track type: audio | + Default flag: 0 | + Codec ID: A_VORBIS | + CodecPrivate, length 4189 | + Language: und | + Audio track | + Sampling frequency: 44100 | + Channels: 2 |+ EbmlVoid (size: 1081) |+ Cluster
File2 $ mkvinfo 2split-001-large-chaduration-rmseek-rmcue.webm + EBML head |+ EBML version: 1 |+ EBML read version: 1 |+ EBML maximum ID length: 4 |+ EBML maximum size length: 8 |+ Doc type: webm |+ Doc type version: 2 |+ Doc type read version: 2 + Segment, size unknown |+ EbmlVoid (size: 4045) |+ Segment information | + Timecode scale: 1000000 | + Muxing application: libebml v1.0.0 + libmatroska v1.0.0 | + Writing application: mkvmerge v4.0.0 ('The Stars were mine') built on Jun 17 2010 18:47:20 | + Duration: 8585740.288s (2384:55:40.288) | + Date: Wed May 11 06:09:38 2011 UTC | + Segment UID: 0x12 0xea 0xf1 0x7f 0xb0 0x17 0x15 0x97 0xfb 0x67 0xd7 0x7b 0x91 0x28 0x2d 0xa3 |+ Segment tracks | + A track | + Track number: 1 | + Track UID: 1 | + Track type: video | + Default flag: 0 | + MinCache: 1 | + Codec ID: V_VP8 | + Default duration: 41.708ms (23.976 fps for a video track) | + Language: und | + Video track | + Pixel width: 640 | + Pixel height: 360 | + Display width: 640 | + Display height: 360 | + A track | + Track number: 2 | + Track UID: 2 | + Track type: audio | + Default flag: 0 | + Codec ID: A_VORBIS | + CodecPrivate, length 4189 | + Language: und | + Audio track | + Sampling frequency: 44100 | + Channels: 2 |+ EbmlVoid (size: 1081) |+ Cluster
By the way, I find, if I just cat 1file 2 file> test.webm without any modification of the original mkv files, the test webm file can be played well by vlc, but can not played correctly by Mplayer.
Finally, I figure it out. I will write a detailed instruction about how to generate the webm streaming file, such as how to enable webm file http streaming. Thanks for all the kind help. By the way, how about provide a patch to enable this feature to ffmpeg?
Jianwen
Anything ever come of this? Im definitely interested in a solution to do this..... Shawn
participants (5)
-
Dirk Griffioen -
jianwen chen -
Michael Niedermayer -
NokNok Developer -
Reimar Döffinger