[MPlayer-dev-eng] [PATCH] keyframes in real rtsp, (auto-)index generation and seeking in realmedia .rm files
rgselk
rgselknospam at yahoo.com
Wed Nov 19 21:51:01 CET 2003
Hello,
Attached are two patches:
The first patch finds keyframes in a real rtsp stream.
The second patch implements index generation and seeking while
generating less (read: no?) SEGV's. The SEGV can be demonstrated very
easy by -dumpstream'ing a stream to disk and then trying to use -idx or
-forceidx on the resulting file...
Index generation is done on the fly when you specify the '-idx' flag to
mplayer. This means that while the stream is playing the index is
extended every time we find a new keyframe. Forward seeking tries to
generate the next part of the index needed for seeking and then uses
this freshly generated index.
The next 2 functions are added for building the index:
add_index_item(demuxer, stream_id, timestamp, offset)
add_index_segment(demuxer, stream_id, timestamp)
The first one adds one single entry to an index.
The second scans through the file upto the timestamp while adding
entries by calling add_index_item() for every keyframe.
The function generate_index() calls add_index_segment() with
timestamp=-1 which in turn scans through the whole file.
One thing I did not care about now is to disable seeking while
streaming from the network instead of from a file. But I guess that
should not be to difficult...
One fundamental problem with realmedia streams and mplayer is the
desynchronization. The keyframes for audio and video are sometimes more
than 2 seconds apart from each other.
You have to use something like '-autosync 1 -mc 10' to get a quick
resynchronization after seeking...
Regards,
rgselk.
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: realrtsp.keyframe.diff.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20031119/df0b5062/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: demux_real.seek.autoindex.diff.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20031119/df0b5062/attachment-0001.txt>
More information about the MPlayer-dev-eng
mailing list