mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-01 10:29:09 +00:00
fixing issue #94
This commit is contained in:
parent
f8d3fa5c25
commit
5151be4122
@ -6,10 +6,9 @@
|
|||||||
Name: FFMPEG Class
|
Name: FFMPEG Class
|
||||||
Author: K4YT3X
|
Author: K4YT3X
|
||||||
Date Created: Feb 24, 2018
|
Date Created: Feb 24, 2018
|
||||||
Last Modified: July 9, 2019
|
Last Modified: July 26, 2019
|
||||||
|
|
||||||
Description: This class handles all FFMPEG related
|
Description: This class handles all FFmpeg related operations.
|
||||||
operations.
|
|
||||||
"""
|
"""
|
||||||
from avalon_framework import Avalon
|
from avalon_framework import Avalon
|
||||||
import json
|
import json
|
||||||
@ -18,9 +17,9 @@ import os
|
|||||||
|
|
||||||
|
|
||||||
class Ffmpeg:
|
class Ffmpeg:
|
||||||
"""This class communicates with ffmpeg
|
"""This class communicates with FFmpeg
|
||||||
|
|
||||||
This class deals with ffmpeg. It handles extracitng
|
This class deals with FFmpeg. It handles extracitng
|
||||||
frames, stripping audio, converting images into videos
|
frames, stripping audio, converting images into videos
|
||||||
and inserting audio tracks to videos.
|
and inserting audio tracks to videos.
|
||||||
"""
|
"""
|
||||||
@ -103,7 +102,7 @@ class Ffmpeg:
|
|||||||
"""Extract every frame from original videos
|
"""Extract every frame from original videos
|
||||||
|
|
||||||
This method extracts every frame from videoin
|
This method extracts every frame from videoin
|
||||||
using ffmpeg
|
using FFmpeg
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
input_video {string} -- input video path
|
input_video {string} -- input video path
|
||||||
@ -239,8 +238,18 @@ class Ffmpeg:
|
|||||||
value = self.ffmpeg_settings[phase][key]
|
value = self.ffmpeg_settings[phase][key]
|
||||||
|
|
||||||
# null or None means that leave this option out (keep default)
|
# null or None means that leave this option out (keep default)
|
||||||
if value is None or value is False or isinstance(value, list) or isinstance(value, dict):
|
if value is None or value is False or isinstance(value, dict):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# if the value is a list, append the same argument and all values
|
||||||
|
elif isinstance(value, list):
|
||||||
|
|
||||||
|
for subvalue in value:
|
||||||
|
configuration.append(key)
|
||||||
|
if value is not True:
|
||||||
|
configuration.append(str(subvalue))
|
||||||
|
|
||||||
|
# otherwise the value is typical
|
||||||
else:
|
else:
|
||||||
configuration.append(key)
|
configuration.append(key)
|
||||||
|
|
||||||
|
@ -77,10 +77,12 @@
|
|||||||
},
|
},
|
||||||
"migrating_tracks": {
|
"migrating_tracks": {
|
||||||
"output_options": {
|
"output_options": {
|
||||||
"-map": "0:v:0?",
|
"-map": [
|
||||||
"-map": "1?",
|
"0:v:0?",
|
||||||
|
"1?",
|
||||||
|
"-1:v?"
|
||||||
|
],
|
||||||
"-c": "copy",
|
"-c": "copy",
|
||||||
"-map": "-1:v?",
|
|
||||||
"-pix_fmt": null
|
"-pix_fmt": null
|
||||||
},
|
},
|
||||||
"-y": true
|
"-y": true
|
||||||
|
Loading…
Reference in New Issue
Block a user