[FFmpeg-user] ffmpeg support for color encoding conversion?

serialhex serialhex at gmail.com
Fri Feb 2 22:32:00 EET 2018


On Fri, Feb 2, 2018 at 2:25 PM, Dan Edwards <edwardsd97 at gmail.com> wrote:
>
> I am looking for an alternate solution to avconv on a Raspberry Pi setup
> running RetroPie.
>
> Have been trying to use it to convert some videos in the color format
> yuv444p to yuv420p which is needed for a hardware accelerated video
> playback feature in RetroPie.


This is pretty easy to accomplish, and you can do it with a command like:

ffmpeg -i infile.mp4 -pix_fmt yuv420p -codec copy -map 0 outfile.mp4

instead of `-codec copy` in the above, you may want to change it to
explicitly convert to h264
(which I know works) as some newer videos are h265 (which i don't think
does on the pi)
so something like:

ffmpeg -i infile.mp4 -vcodec h264 -pix_fmt yuv420p -codec copy -map 0
outfile.mp4

which will copy all the rest of the streams without conversion, and only
reconvert the video

Take care!!
serialhex


More information about the ffmpeg-user mailing list