hasls.blogg.se

Ffmpeg copy chapters metadata
Ffmpeg copy chapters metadata












ffmpeg copy chapters metadata

Unfortunately, the only way I can think of to do this used a pipe and two avconv processes. This works because most of the time, the data streams have no meaningful metadata written to them however, sometimes they do, and you want to completely get rid of that metadata. This will take the metadata from the first data stream (normally the video stream) and use that to replace the global metadata of the container file. avconv -i input.mp4 -map 0 -map_metadata 0:s:0 -c copy output.mp4 NOTE: I'm using avconv, because that's in the Ubuntu 12.04 repositories this will probably be drop-in compatible with ffmpeg, since their syntax always is in my experience. The easiest way to do this is to set -map_metadata to use one of the input streams, rather than using global metadata. I'm leaving this here for anyone using an outdated version. I recommend solution because it's less typing and up to date. NOTE: I have since updated ffmpeg (previously I had the outdated version of avconv from the Ubuntu repositories). This way any metacontent should be different from the original file: ffmpeg -y -i "test.mkv" -c copy -map_metadata -1 -metadata title="My Title" -metadata creation_time=T21:30:00 -map_chapters -1 "test.mkv" My solution to strip metadata, chapters, to change creation time and title. I posted on the FFmpeg mailing list, asking whether there were any updates or comments on that. However, I didn't get the creation date to change, which is strange because it seemed to work in the Ubuntu version. Note that you can't simply remove all metadata, some things will stay. The result is (again, checked with exiftool), a metadata record reduced from 81 to 52 lines. It expects an final END chapter which is ignored, but provides the end point for the last real chapter.Slightly modifying the command line by I got this: ffmpeg -i in.mov -map_metadata -1 -c:v copy -c:a copy out.mov.It expects no existing chapters in the file.It appends to an existing FFMETADATAFILE.

ffmpeg copy chapters metadata

It expects the chapters.txt file to be a txt file with 1 chapter per line starting with 0:00:00 style time stamps and followed by the title of the chapter.It expects to be in the same directory as a 'chapters.txt' file to read from, and an 'FFMETADATAFILE' file to output to.The requirement to specify times as an integer of some time base, instead of the 1:30:20.5 style format usually used for displaying time is very off-putting to me, so I created a small helper script so I could just note down times while watching a video and have the metadata entries automatically worked out how my automatically.














Ffmpeg copy chapters metadata