Video to jpeg: embedding timecode into the jpegs

Thiago Santos thiagoss at osg.samsung.com
Tue Aug 4 16:08:48 PDT 2015


On 08/04/2015 11:00 AM, Graham Leggett wrote:
> Hi all,
>
> I have an mpeg2 stream that I am splitting up into individual jpegs 1 per second, and this works well with the following pipeline fragment:
>
> frame. ! videorate ! video/x-raw,framerate=1/1 ! jpegenc ! queue ! multifilesink location=frame%d.jpg
>
> What I need to do is emded the timecode of each frame into the jpeg metadata (exif?).
>
> Is there a specific way to do this?
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.

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.

Regards,
>
> 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