mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-30 23:58:11 +00:00
2.1.4 added hardware acceleration for ffmpeg
This commit is contained in:
parent
82e84fa3dc
commit
d8543bc16e
@ -13,7 +13,7 @@ __ __ _ _ ___ __ __
|
|||||||
Name: Video2x Controller
|
Name: Video2x Controller
|
||||||
Author: K4YT3X
|
Author: K4YT3X
|
||||||
Date Created: Feb 24, 2018
|
Date Created: Feb 24, 2018
|
||||||
Last Modified: October 23, 2018
|
Last Modified: November 2, 2018
|
||||||
|
|
||||||
Licensed under the GNU General Public License Version 3 (GNU GPL v3),
|
Licensed under the GNU General Public License Version 3 (GNU GPL v3),
|
||||||
available at: https://www.gnu.org/licenses/gpl-3.0.txt
|
available at: https://www.gnu.org/licenses/gpl-3.0.txt
|
||||||
@ -40,7 +40,7 @@ import threading
|
|||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
VERSION = '2.1.3'
|
VERSION = '2.1.4'
|
||||||
|
|
||||||
EXEC_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
EXEC_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||||
FRAMES = '{}\\frames'.format(EXEC_PATH) # Folder containing extracted frames
|
FRAMES = '{}\\frames'.format(EXEC_PATH) # Folder containing extracted frames
|
||||||
@ -196,8 +196,10 @@ def video2x():
|
|||||||
method = 'cpu'
|
method = 'cpu'
|
||||||
elif args.gpu:
|
elif args.gpu:
|
||||||
method = 'gpu'
|
method = 'gpu'
|
||||||
|
ffmpeg_arguments.append('-hwaccel {}'.format(ffmpeg_hwaccel))
|
||||||
elif args.cudnn:
|
elif args.cudnn:
|
||||||
method = 'cudnn'
|
method = 'cudnn'
|
||||||
|
ffmpeg_arguments.append('-hwaccel {}'.format(ffmpeg_hwaccel))
|
||||||
|
|
||||||
# Initialize objects for ffmpeg and waifu2x-caffe
|
# Initialize objects for ffmpeg and waifu2x-caffe
|
||||||
fm = Ffmpeg(ffmpeg_path, args.output, ffmpeg_arguments)
|
fm = Ffmpeg(ffmpeg_path, args.output, ffmpeg_arguments)
|
||||||
@ -288,6 +290,7 @@ config = read_config()
|
|||||||
waifu2x_path = config['waifu2x_path']
|
waifu2x_path = config['waifu2x_path']
|
||||||
ffmpeg_path = config['ffmpeg_path']
|
ffmpeg_path = config['ffmpeg_path']
|
||||||
ffmpeg_arguments = config['ffmpeg_arguments']
|
ffmpeg_arguments = config['ffmpeg_arguments']
|
||||||
|
ffmpeg_hwaccel = config['ffmpeg_hwaccel']
|
||||||
|
|
||||||
# Add a forward slash to directory if not present
|
# Add a forward slash to directory if not present
|
||||||
# otherwise there will be a format error
|
# otherwise there will be a format error
|
||||||
|
Loading…
Reference in New Issue
Block a user