is there a fastest nooblet way to take advantage of GPU in no time?

For the developers that use FFmpeg in Windows software.
Post Reply
Posts: 1
Joined: Tue May 16, 2017 7:20 am

is there a fastest nooblet way to take advantage of GPU in no time?

Post by ggffmpeg000 » Tue May 16, 2017 7:30 am

OK, I am software engineer, but that does not know, i should know everything. I got haystack of responsibility on my back. Now I occasionally have a need to use ffmpeg to use to convert *.avi to *flv format in large numbers.

Recently I converted 4GB of movies into flv and process took more than two day. I have a AMD 8300 with GeForce 750 Ti.
Question arises
- Is there a way to take advantage of using GPU without re-compiling? Any fast way, I just dont know have experience and looking for a fastest and simplest way to get it up and running with GPU. I am not sure current command I am using using CPU only or CPU + GPU. (Please see scripts I am using below). If there is any can someone give me a good example?

- Is there a way to see threads processes that are assigned to CPU-s and/or GPU-s during conversion?

I am willing to pay out 20$ worth of bitcoin for very helpful response that got me get up and running.

Code: Select all

import os
import datetime
import re
import sys
import time


supportedOutputFormats = ['mpg','flv','mp4']

print str(len(sys.argv))

if len(sys.argv) >= 2:
	if sys.argv[1] in supportedOutputFormats:
		outputFileExtension = "." + sys.argv[1]
		print "outputFileExtension set to : " + outputFileExtension
		print "outputFileExtension specified is not supported. Will use default: " + outputFileExtension
		print "No outputFileExtension specified. Will use default: " + outputFileExtension
print os.getcwd()
videoOption = "-s hd1080"
#videoOption = ""

counter = 0
outputList = []
command = ""
debug = 0

for i in files:
	if i[-3:] == "avi":
		print "converting to: " + i[:-4] + outputFileExtension
		outputName = "movie" + str(counter) + outputFileExtension
		# HD1080 looks very low resolution. Trying higher resolution.	
		#command = "ffmpeg -i \"" + str(i) + "\" -s hd1080 " + outputName
		# right speed, output is less ideal whtn uhd4320		
		command = "ffmpeg -i \"" + str(i) + "\" -s 4k " + outputName
		# too slow bogs down computer
		#command = "ffmpeg -i \"" + str(i) + "\" -s uhd4320 " + outputName
		print "convert command: " + str(command)
		counter += 1
		if counter > 1 and debug:
outputListFileName = "outputList.log"		
fp=open(outputListFileName, 'w+')

for i in outputList:
	fp.write('file \'' + i + '\'\n')

outputConcatFile = re.sub(":", ".", str(
print "outputConcatFile: " + str(outputConcatFile)

command = "ffmpeg -f concat -i "+ str(outputListFileName) +" -c copy " + outputConcatFile + outputFileExtension
print "concatenation command: " + str(command)

print "deleting intermediate files: " 

#for i in outputList:
	#os.system("del " + i)

Post Reply