Size of the video output file changes after mirror effect.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Size of the video output file changes after mirror effect.

Mehta Naisargi Rajeshbhai

Hello Everyone,

I am using this  below ffmpeg command for giving the mirror effect in the video output file :

ffmpeg -i <video input file> -pix_fmt yuv420p -vf "hflip" -metadata:s:v rotate=180 <video output file>

size of video input file is 3.0 M and
size of video output file is 1.5M

Here size of video output file decreases after giving mirror effect. And rest of the things remains same for example resolution remains the same. So can anyone tell me that why the size of video output file is changing?
And  what steps I need to follow for mirror effect to keep the size of the output file  same as that of the input file.

Please guide me with the  proper steps.

Thanking you.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Size of the video output file changes after mirror effect.

Lou Logan
On Mon, Jun 11, 2018, at 10:17 AM, Mehta Naisargi Rajeshbhai wrote:
>
> Here size of video output file decreases after giving mirror effect. And
> rest of the things remains same for example resolution remains the same.
> So can anyone tell me that why the size of video output file is
> changing?

Filtering requires encoding. The input is decoded, filtering is applied, then it is sent to the encoder to create the output. Since the output is not the exact same data as the input, and due to the differences between formats and encoder implementations, the resulting file size will be different.

> And  what steps I need to follow for mirror effect to keep the size of
> the output file  same as that of the input file.

Why do you want to keep the file size the same?

Mirror it using your player instead. For example:

ffplay -vf hflip input.mp4
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".