-1

ffmpeg 3.4.9 ubuntu16.04

I use follow command to decode a mp4 to bmp files (all in one),then I split 1.bmps to image array.

    ffmpeg -y -i 1632035082_1.mp4 -r 20/1 -vcodec bmp -f image2pipe - > 1.bmps

How can I use cuda acceleration.

I would be very grateful if anyone could help me.

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Nov 18, 2021 at 13:14

1 Answer 1

0

You can use something like

ffmpeg -c:v h264_cuvid -i /path/to/video.mp4 /path/to/output/file/template%03d.bmp

-c:v h264_cuvid: This part applies to the input file since it comes before -i

-i /path/to/video.mp4: This specifies the input

/path/to/output/file/template%03d.bmp: The output type is deduced from the file ending (.bmp).

Double check to ensure that using hardware decoding is faster for your use case (it was actually slower on my computer).

For more info on hardware decoding go to the NVDEC/Cuvid section of this ffmpeg documentation

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .