Video to jpeg: embedding timecode into the jpegs

Graham Leggett minfrin at sharp.fm
Sat Aug 15 10:03:40 PDT 2015


On 05 Aug 2015, at 1:45 AM, Thiago Santos <thiagoss at osg.samsung.com> wrote:

> gst-launch-1.0 won't push tags for you automatically.
> 
> gst-launch-1.0 videotestsrc num-buffers=1 ! jpegenc ! taginject tags="datetime=2015-05-05" ! jifmux ! filesink location=/tmp/test.jpg
> 
> This will save a single jpeg image with the datetime tag but you can't change the tags value from gst-launch-1.0 so you need to write an application to be able to change it for each buffer.
> 
> Don't use taginject in your application, it is not meant for that. Just use a probe and events or the tagsetter interface as I suggested.

Next step is to work out where to get this timecode from in the first place.

Reverse engineering the mpegtsdemux component shows that DTS/PTS frames seem to be what I am looking for. When I add the timeoverlay plugin to get a quick idea as to the timestamp value, I get a time offset relative to the point at which I started the video, rather than the time in the stream.

Is this expected?

Regards,
Graham
—



More information about the gstreamer-devel mailing list