I want to filter a video stream
-vf crop=300:ih,mpdecimate
and add metadata for it to the output video:
-metadata:s:v:0 rotate=90
This command filter it, but the metadata are NOT added:
ffmpeg -to 6 -i input.3gp -vf crop=300:ih,mpdecimate \
-metadata:s:v:0 rotate=90 \
output.mp4
But I do the same in 2 steps (using a temporary output as input),
the result is OK, the metadata ARE added:
ffmpeg -to 6 -i input.3gp -vf crop=300:ih,mpdecimate \
temp.mp4
ffmpeg -i temp.mp4 -c copy \
-metadata:s:v:0 rotate=90 \
output.mp4
My question is:
Is it impossible to filter a video and add some metadata in one step?
Part of FFprobe output:
For the successful 2-steps method:
Metadata: handler_name : Core Media Video vendor_id : [0][0][0][0] Side data: displaymatrix: rotation of 90.00 degrees
For the 1-step method, the last 2 rows are missing.