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 \

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 \

ffmpeg -i temp.mp4 -c copy \
       -metadata:s:v:0 rotate=90 \

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:

      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.

1 Answer 1


Yes, the rotate tag is ignored for encoded video streams.

Should be patched in git master within a couple of days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.