0

I am running FFMPEG on a Windows 10 (64-bit) laptop with Intel i3 (6th generation) processor and AMD R5 M430 GPU.

I shot many videos on a recent trip. Cumulatively, they are over 100 hours long. Each video occupies 2-3 GB minimum and is at least 1 hour long.

I need to trim 2-4 videos and then concatenate them into one single file. This operation needs to be performed for all these videos.

Right now, I am trimming individual videos using the following command:

ffmpeg.exe -i "INPUT_VIDEO" -ss START_TIME -to END_TIME -c copy "OUTPUT_VIDEO"

And then I concatenate the videos using this command:

ffmpeg.exe -f concat -safe 0 -i VideosToBeConcatenated.txt -c copy "CONCATENATED_OUTPUT_VIDEO"

where VideosToBeConcatenated.txt contains the file names of the videos to be concatenated.

Running these commands in a single Command Window gives me a speed of 20-25x. Running them in two Command Windows simultaneously drops the speed to 10-12x, while also making my system lag/freeze.

Is there a way I could use my GPU to speed up these operation? Say, using the i3's Quicksync or R5's AMF/VCE?

I tried using -hwaccel dxva2 in the above mentioned commands as follows:

ffmpeg.exe -hwaccel dxva2 -i "INPUT_VIDEO" -ss START_TIME -to END_TIME -c copy "OUTPUT_VIDEO"

and

ffmpeg.exe -hwaccel dxva2 -f concat -safe 0 -i VideosToBeConcatenated.txt -c copy "CONCATENATED_OUTPUT_VIDEO"

However, I don't notice any increase in speed.

I also set ffmpeg.exe and cmd.exe to "High Performance" in the AMD Switchable Graphics settings. But the in-built Switchable Graphics Monitor suggests that neither of the processes are using the dGPU.

Is there a way I could use my GPUs (i3's Quicksync or R5's AMF/VCE) to speed up these operation without compromising the quality of the output videos?

[Edit:] I am trying to make sense of FFMPEG's Quicksync documentation but it's too mature for an amateur like me.

0

Since you are using -c copy in your commands, there is no decoding, filtering or encoding taking place and so hardware acceleration isn't relevant at all. The main bottleneck is disk I/O. On a regular internal HDD (with a 3rd gen CPU) I get speeds of 400x so I suspect you're reading or writing to an external drive. Or your internal drive could be slow, have a smaller cache. The biggest boost will come from writing to a different drive than the drive on which the inputs reside, with ideally both drives being internal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.