Inserting proprietary tags (metadata) in FLV stream

Laurent Cogné laurent.cogne at dazzl.tv
Wed Jul 3 10:59:59 UTC 2019


Hi,

 

I need to produce a FLV stream with proprietary tags using gstreamer, but fail to get it for now.

 

My real need is about ingesting an rtsp stream, optionally transcode it (resolution, bitrate…) then inject it in FLV format within a local server, this server needing proprietary metadata in the stream to correctly operate..

However I simplified the problem to just convert an mp4 audio/video file to an flv video only file, but with this needed tag included, assuming that if cannot get this simple example working, I will not get my complete chain working.

 

With ffmpeg, I can just do:

  ffmpeg -i test.mp4 -metadata "key=value" -c:v copy -an test-cp-ffmpeg.flv

(Then retrieve metadata with: ffmpeg -i test-cp-ffmpeg.flv -f ffmetadata meta.txt)

 

With gstreamer, I tried the gst-launch tags option and the taginject plugin, with no success:

  gst-launch-1.0 --tags="key=value" filesrc location=test.mp4 ! qtdemux ! h264parse ! flvmux ! filesink location=test-cp-gst.flv

or:

  gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! h264parse! flvmux ! taginject tags="key=value"  ! filesink location=test-cp-gst.flv

or:

  gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! h264parse ! taginject tags="key=value" ! flvmux ! filesink location=test-cp-gst.flv

 

In the last case, I get a warning:

(gst-launch-1.0:23060): GStreamer-WARNING **: unknown tag 'key'

 

While using the taginject plugin just after h264 parsing, I could successfully inject a ‘title’ tag, but no proprietary one.

I also noticed that while my ffmpeg command preserve original tags from input mp4 file, my gstreamer chain discard them.

 

Any hint about this?

 

Regards,

 

--Laurent.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190703/0094f64c/attachment-0001.html>


More information about the gstreamer-devel mailing list