Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFmpeg conversion FROM UYVY422 TO YUV420P

I have raw video in UYVY422 format and I want to convert it YUV420p. I'am executing that command()

ffmpeg -y -r 25.0 -f rawvideo -s 1920x1080 -pix_fmt uyvy422 -i input.avi -pix_fmt yuv420p -f avi -r 25 -s 1920x1080 output.avi 

and my output video seems to float(right side of video start to be present at left edge and it is moving from left to right)

Has anyone got any idea about what I am doing wrong? I was trying to set output video to raw format, but it didnt work...\

like image 864
risque Avatar asked Jul 07 '12 19:07

risque


1 Answers

ffmpeg -y -r 25.0 -f rawvideo -s 1920x1080 -pix_fmt uyvy422 -i input.avi -pix_fmt yuv420p -f avi -r 25 -s 1920x1080 output.avi

The problem here is that the source is an AVI file. It may contain raw YUV frames, but it's not a raw YUV file, it still has AVI headers etc. around it. You're telling it to parse it as a raw YUV file, which is why you're seeing the rolling frames.

I'd just remove all the options before the -i, and then it should work correctly:

ffmpeg -i input.avi -pix_fmt yuv420p -c:v rawvideo -an -s 1920x1080 -y output.avi
like image 93
Ronald S. Bultje Avatar answered Sep 24 '22 18:09

Ronald S. Bultje