[FFmpeg-user] Codec error when adding color parameter to fade

pdr0 pdr0 at shaw.ca
Tue Apr 21 18:23:45 EEST 2020


Cemal Direk wrote
> Hi, im using this code
> 
> "ffmpeg -i video.mp4 -filter:v "fade=t=in:color=white:st=0.5:d=1"
> -filter:a
> "afade=in:st=0:d=1, afade=out:st=44:d=1" -c:v libx264 -c:a aac output.mp4"
> 
> then output is wrong codec. i can not open output.mp4 at any player.
> but i dont give to color=white parameter to command i can open
> output.mp4...
> whats the problem when i adding color parameter to command?(:color=white)
> 
> how can i solve this problem?

I'm assuming you are using "regular" yuv420p input.

The default color for fade is black. When you specify white, the output
pixel format is yuv444p for some reason,  and libx264 encodes as yuv444p

As a workaround, you can add format=yuv420p to the filter chain
-filter:v "fade=t=in:color=white:st=0.5:d=1,format=yuv420p"

I don't know if that is intended behavior, but it's not in the documentation





--
Sent from: http://www.ffmpeg-archive.org/


More information about the ffmpeg-user mailing list