Hello! I must be doing something wrong but forgive me. I want to strip all metadata/exif info from a video. This is what I am using:
stream = ffmpeg.input("./" + ranFilename + ".mp4").
stream = ffmpeg.output(stream, "./" + ranFilename + "2.mp4")
ffmpeg.run(stream).extra_args('-map_metadata', -1)
I dont get how to pass extra arguments but essentially I need to pass this:
ffmpeg -i in.mov -map_metadata -1 -c:v copy -c:a copy out.mov
Gotten from here: https://superuser.com/questions/441361/strip-metadata-from-all-formats-with-ffmpeg
How am i supposed to pass the "-map_metadata -1" into the argument?
@SingitBatch40 try this in your output declaration:
ffmpeg.output(stream, "./" + ranFilename + "2.mp4", map_metadata=-1)
Complete example at https://github.com/spirulence/ffmpeg-issues/blob/master/279-strip-metadata/279.py
If you do a before and after with a tool like ExifTool, you should find less metadata in your output file.
I say less because there's still a lot of information there. If you're interested in providing even less metadata, you might consider changing the video format you're transcoding to. I know that OGV files, for example, have only about 10 fields of metadata readable by ExifTool if you process them this way.