<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=FR link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>I need to produce a FLV stream with proprietary tags using gstreamer, but fail to get it for now.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>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..<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>With ffmpeg, I can just do:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>  ffmpeg -i test.mp4 -metadata "key=value" -c:v copy -an test-cp-ffmpeg.flv<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>(Then retrieve metadata with: ffmpeg -i test-cp-ffmpeg.flv -f ffmetadata meta.txt)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>With gstreamer, I tried the gst-launch tags option and the taginject plugin, with no success:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>  gst-launch-1.0 --tags="key=value" filesrc location=test.mp4 ! qtdemux ! h264parse ! flvmux ! filesink location=test-cp-gst.flv<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>or:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>  gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! h264parse! flvmux ! taginject tags="key=value"  ! filesink location=test-cp-gst.flv<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>or:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>  gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! h264parse ! taginject tags="key=value" ! flvmux ! filesink location=test-cp-gst.flv<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>In the last case, I get a warning:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>(gst-launch-1.0:23060): GStreamer-WARNING **: unknown tag 'key'<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>While using the taginject plugin just after h264 parsing, I could successfully inject a ‘title’ tag, but no proprietary one.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>I also noticed that while my ffmpeg command preserve original tags from input mp4 file, my gstreamer chain discard them.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Any hint about this?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;color:black'>--Laurent.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>