[gst-devel] How to keep timestamp in the file recorded from RTSP source

Laurence laurenceinc at gmail.com
Mon Oct 25 11:01:49 CEST 2010


Hi all,
I create two applications for "record files from ipcam", and "play the
files". The two application are worked.
The pipelines are as follows:
record: rtspsrc ! identity ! rtph264depay ! filesink
play:    filesrc ! typefind ! rtph264pay ! identity ! fakesink

In the "record" application, I use
"GST_BUFFER_TIMESTAMP()","GST_BUFFER_DURATION",
"GST_BUFFER_TIMESTAMP_IS_VALID","GST_BUFFER_GST_BUFFER_DURATION_IS_VALID" in
identity, and print messages as follows:
...
timestamp:3218 valid:1 duration:4294967295 valid:0
timestamp:3218 valid:1 duration:4294967295 valid:0
timestamp:3333 valid:1 duration:4294967295 valid:0
timestamp:3333 valid:1 duration:4294967295 valid:0
timestamp:3333 valid:1 duration:4294967295 valid:0
...
(print format: timestamp,duration=> unsigned int, valid=>int)

It looks like the value of timestamp is vaild,but the value of duration is
invaild.

Then,I use the "play" application to play the file, and print messages in
identity. The messages are as follows:
...
timestamp:4294967295 valid:0 duration:4294967295 valid:0
timestamp:4294967295 valid:0 duration:4294967295 valid:0
timestamp:4294967295 valid:0 duration:4294967295 valid:0
timestamp:4294967295 valid:0 duration:4294967295 valid:0
timestamp:4294967295 valid:0 duration:4294967295 valid:0
timestamp:4294967295 valid:0 duration:4294967295 valid:0
...

In the recorded file,timestamp and duration are invalid.

I have two questions:
1. In the "record" application,timestamp is existed, but I can't read it in
"play" application. I guess that "rtph264depay" don't keep timestamp, so
there is no timestamp in the recorded file. What do you think of this?
2. I would like to write a "timestamp control function" for recorded files
playing. So I have to get timestamp in the recorded file. Is there any way
to keep timestamp in the recorded file?

Thanks in advance!
-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-keep-timestamp-in-the-file-recorded-from-RTSP-source-tp3009950p3009950.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list