Video to jpeg: embedding timecode into the jpegs
Thiago Santos
thiagoss at osg.samsung.com
Tue Aug 4 16:45:48 PDT 2015
On 08/04/2015 08:35 PM, Graham Leggett wrote:
> On 05 Aug 2015, at 1:08 AM, Thiago Santos <thiagoss at osg.samsung.com> wrote:
>
>> The jifmux element can write exif tags to jpeg streams.
>>
>> frame. ! videorate ! video/x-raw,framerate=1/1 ! jpegenc ! jifmux ! queue ! multifilesink location=frame%d.jpg
>>
>>
>> You can have a buffer pad probe in the jpegenc source pad and on the probe push a tag event to the jifmux with the tags you want to have written. For each buffer you send a new tag event updating the time for the frame.
> Do you have an example pipeline to show this in action? I tried adding the jifmux element as above, but it seems there is no change to the exif data - I am assuming I am missing a step:
>
> pi at raspberrypi3 ~ $ identify -format '%[EXIF:*]' /var/www/stream/frame0.jpg
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.
>
>> jifmux also implements the GstTagSetter interface so you can also use this API http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstTagSetter.html on it from the pad probe to update the tags for that jpeg buffer.
> Can the above API be called from gst-launch?
No, you need to write an application for it.
>
> Regards,
> Graham
> —
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
Thiago Sousa Santos
Senior Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley
More information about the gstreamer-devel
mailing list