Skip to content

Commit

Permalink
Version 4.9.4 (#356)
Browse files Browse the repository at this point in the history
* Fixing Apple videotoolbox were not being listed as options (thanks to sublimal)
* Fixing concatenation of large amount of files could cause huge slowdowns to the app
* Fixing thumbnails command did not work when ffmpeg was in a directory with a space in it's lineage (thanks to No Name)
  • Loading branch information
cdgriffith authored Jun 18, 2022
1 parent 232a592 commit adac2c1
Show file tree
Hide file tree
Showing 7 changed files with 760 additions and 372 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Version 4.9.4

* Fixing Apple videotoolbox were not being listed as options (thanks to sublimal)
* Fixing concatenation of large amount of files could cause huge slowdowns to the app
* Fixing thumbnails command did not work when ffmpeg was in a directory with a space in it's lineage (thanks to No Name)

## Version 4.9.3

* Fixing #339 After cancelling queue button stay as cancel (thanks to wynterca)
Expand Down
1,089 changes: 730 additions & 359 deletions fastflix/data/languages.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fastflix/encoders/h264_videotoolbox/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pkg_resources

name = "H264 (Video Toolbox)"
requires = "h264_videotoolbox"
requires = "videotoolbox"
icon = str(Path(pkg_resources.resource_filename(__name__, f"../../data/encoders/icon_h264_toolbox.png")).resolve())


Expand Down
2 changes: 1 addition & 1 deletion fastflix/encoders/hevc_videotoolbox/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pkg_resources

name = "HEVC (Video Toolbox)"
requires = "hevc_videotoolbox"
requires = "videotoolbox"
icon = str(Path(pkg_resources.resource_filename(__name__, f"../../data/encoders/icon_hevc_toolbox.png")).resolve())


Expand Down
2 changes: 1 addition & 1 deletion fastflix/flix.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def generate_thumbnail_command(
enable_opencl: bool = False,
) -> str:
command_options = [
f"{config.ffmpeg}",
f'"{config.ffmpeg}"',
f"-ss {start_time}" if start_time else "",
"-loglevel warning",
f'-i "{clean_file_string(source)}"',
Expand Down
2 changes: 1 addition & 1 deletion fastflix/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "4.9.3"
__version__ = "4.9.4"
__author__ = "Chris Griffith"
29 changes: 20 additions & 9 deletions fastflix/widgets/windows/concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pathlib import Path
import os
import logging
import secrets

from PySide2 import QtWidgets, QtGui, QtCore

Expand Down Expand Up @@ -189,7 +190,8 @@ def check_to_add(file, list_of_items, bad_items, **_):
items = []
skipped = []
tasks = []
for file in Path(folder_name).glob("*"):
file_list = sorted(Path(folder_name).glob("*"), key=lambda x: x.name)
for file in file_list:
if file.is_file():
tasks.append(
Task(
Expand All @@ -198,6 +200,9 @@ def check_to_add(file, list_of_items, bad_items, **_):
kwargs={"file": file, "list_of_items": items, "bad_items": skipped},
)
)
if len(tasks) > 100:
error_message(t("There are more than 100 files, skipping pre-processing."))
return self.save((x.name for x in file_list))

ProgressBar(self.app, tasks, can_cancel=True, auto_run=True)

Expand All @@ -213,11 +218,16 @@ def check_to_add(file, list_of_items, bad_items, **_):
)
)

def save(self):
concat_file = self.app.fastflix.config.work_path / "concat.txt"
def save(self, file_list=None):
concat_file = self.app.fastflix.config.work_path / f"concat_{secrets.token_hex(4)}.txt"
with open(concat_file, "w") as f:
f.write(
"\n".join([f"file '{self.folder_name}{os.sep}{item}'" for item in self.concat_area.table.get_items()])
"\n".join(
[
f"file '{self.folder_name}{os.sep}{item}'"
for item in (self.concat_area.table.get_items() if not file_list else file_list)
]
)
)
self.main.input_video = concat_file
self.main.source_video_path_widget.setText(str(self.main.input_video))
Expand All @@ -230,8 +240,9 @@ def save(self):
self.main.widgets.deinterlace.setChecked(False)
self.hide()
self.main.page_update(build_thumbnail=True)
error_message(
"Make sure to manually supply the frame rate in the Advanced tab "
"(usually want to set both input and output to the same thing.)",
title="Set FPS in Advanced Tab",
)
# TODO present if images
# error_message(
# "Make sure to manually supply the frame rate in the Advanced tab "
# "(usually want to set both input and output to the same thing.)",
# title="Set FPS in Advanced Tab",
# )

0 comments on commit adac2c1

Please sign in to comment.