user18155: 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.

user1871: Yes, the rotate tag is ignored for encoded video streams.
Should be patched in git master within a couple of days.

18155: <p>I want to filter a video stream</p>
<pre><code>-vf crop=300:ih,mpdecimate
</code></pre>
<p>and add metadata for it to the output video:</p>
<pre><code>-metadata:s:v:0 rotate=90
</code></pre>
<p>This command filter it, but the <strong>metadata are NOT added</strong>:</p>
<pre><code>ffmpeg -to 6 -i input.3gp -vf crop=300:ih,mpdecimate \
       -metadata:s:v:0 rotate=90 \
        output.mp4
</code></pre>
<p>But I do the same in <strong>2 steps</strong>  (using a temporary output as input),<br />
the result is OK, the <strong>metadata ARE added</strong>:</p>
<pre><code>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
</code></pre>
<p>My question is:</p>
<blockquote>
<p>Is it impossible to filter a video <strong>and</strong> add some metadata in one step?</p>
</blockquote>
<hr />
<p><em>Part of FFprobe output:</em></p>
<p>For the successful <strong>2-steps</strong> method:</p>
<blockquote>
<pre><code>    Metadata:
      handler_name    : Core Media Video
      vendor_id       : [0][0][0][0]
    Side data:
      displaymatrix: rotation of 90.00 degrees
</code></pre>
</blockquote>
<p>For the <strong>1-step</strong> method, the last 2 rows are missing.</p>
 1871: <p>Yes, the rotate tag is ignored for encoded video streams.</p>
<p>Should be patched in git master within a couple of days.</p>
