You are not logged in.
Hello,
Trying to use my AMD GPU for transcoding MJPEG to HEVC using VA-API under FFMPEG.
Using this command:
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -c:v mjpeg -f v4l2 -input_format mjpeg -framerate 30 -video_size 1920x1080 -i /dev/video0 -vf 'scale_vaapi=format=nv12' -c:v hevc_vaapi -map 0:a? -map 0:s? -c:s copy -rc_mode 1 -qp 25 -map_chapters 0 output.mp4 -y
And it seems to work fine, no skipped frames, smooth transcoding, only 2-3% CPU usage. However the video output file is completely skewed.
For some reason FFMPEG splits the video into two pieces where one half of the video is the actually the proper video and the other half is all skewed up.
Here is a picture of the video output:
(Note: The camera is a CCTV camera, which is using it's infrared LEDs to view in the dark room. So it is in greyscale color due to the camera and not any issues based on transcoding.)
https://i.imgur.com/OuMlidj.png
Here is the output video file:
https://www.youtube.com/watch?v=XCC4JDffTxM
Any clue why this is happening?
OS: Arch Linux
GPU: AMD Radeon Pro WX 2100.
I am able to use either VA-API or AMD AMF hardware acceleration encoders.
Thanks for any advice.
Last edited by rajhlinux (2022-07-24 04:38:59)
Offline