问题
I would like to add metadatas to an MP4 video file with GStreamer:
- How to do it while recording the file?
- How to do it when the file is already recorded?
- Is that possible to check these modifications with GStreamer?
For example, with FFmpeg, I can add a title to my video with this command line:
ffmpeg -i in.mp4 -metadata title="my title" out.mp4
And then, I check the result with mediainfo:
mediainfo out.mp4
回答1:
I found a way to do it with a debug plugin: taginject
For example, in order to tag a file:
gst-launch-1.0 filesrc location=file.mp4 ! qtdemux ! h264parse ! taginject tags="title=\"MyTitle\",artist=\"MyArtist\"" ! mp4mux ! filesink location=tagged_file.mp4
If you want to check it:
gst-launch-1.0 -t filesrc location=tagged_file.mp4 ! qtdemux ! fakesink
来源:https://stackoverflow.com/questions/41470961/how-to-tag-or-add-metadata-to-a-video-file-with-gstreamer