I am trying to add visual filters to mp4
files using FFmpeg
.
I have tried many filters, but 4 of them worked out of which only 1 worked worked perfectly. I am using them in an Android application
, but I tried the same command lines on windows cmd
using FFmpeg
and the result is same. With 3 filters the .mp4
is unplayable by many players and also Androids mediaplayer
. I can still play the "corrupt" files on VLC
and players that have many codex`s, but I need them to work perfectly.
The only filter working as intended is Black and White
and the command is (have tried both -vf
and -filter_complex
):
-i origin.mp4 -filter_complex hue=s=0 blackWhite.mp4
The other 3 are Sepia
, Vintage
and Negative
"colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131", "curves=vintage", "curves=negative"
Since I cannot upload video files here, I have added a link of 3 files, the original video file, black/white filtered file (that works), vintage file (that does not work).
format=yuv420p
to the end of your filterchain. I generally prefer to keep all of the filtering within the filterchain instead of using the legacy-pix_fmt
option. – Rattish