Raghbendra Nayak
Raghbendra Nayak

Reputation: 1646

Add multiple metadata in video using ffmpeg command

Command to add single metadata working fine

ffmpeg -i '/var/www/html/public/uploads/wp-video/akka.mov' -metadata kKeyContentIdentifier='com.apple.quicktime.content.identifier' '/var/www/html/public/uploads/video-thumb/updated-akka.mov'

Add multiple metadata command, I pass the multiple metadata tag like below

ffmpeg -i '/var/www/html/public/uploads/wp-video/akka.mov' -metadata kKeyContentIdentifier='com.apple.quicktime.content.identifier' -metadata kKeyStillImageTime = 'com.apple.quicktime.still-image-time' -metadata kKeySpaceQuickTimeMetadata = 'mdta' '/var/www/html/public/uploads/video-thumb/updated-akka.mov'

Its not working, is there any other way to pass multiple metadata in command?

Upvotes: 4

Views: 4699

Answers (1)

Anon
Anon

Reputation: 56

Try this

ffmpeg -i "/var/www/html/public/uploads/wp-video/akka.mov" -c copy -metadata kKeyContentIdentifier="com.apple.quicktime.content.identifier" -metadata kKeyStillImageTime="com.apple.quicktime.still-image-time" -metadata kKeySpaceQuickTimeMetadata="mdta" "/var/www/html/public/uploads/video-thumb/updated-akka.mov"

I replaced ' with ", added a -c copy flag and finally removed the whitespaces from the 2nd and 3rd -metadata declaration. I'm not quite sure if replacing ' with " is necessary but I often had troubles in the past using ' because it was read as if it was escaped instead of being a delimiter. I'm pretty sure you are not supposed to have whitespaces outside of either ' or ", that's why I removed them. Omitting -c copy will also make ffmpeg re-encode the file with standard preset likely giving you a bad result

Upvotes: 4

Related Questions