Skip to content

Commit

Permalink
Merge pull request #264 from jeanslack/fix_seeking
Browse files Browse the repository at this point in the history
Fix seeking
  • Loading branch information
jeanslack authored Feb 18, 2024
2 parents a74092c + 26361d8 commit d4834c5
Show file tree
Hide file tree
Showing 142 changed files with 334 additions and 343 deletions.
18 changes: 16 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ License: GPL3
Change Log:

+------------------------------------+
Tue, 08 Feb 2024 V.5.0.5
Tue, 17 Feb 2024 V.5.0.5

* Fixed `ValueError: could not convert string to float: 'N/A'` given by the
`get_milliseconds()` function.
Expand All @@ -25,7 +25,21 @@ Tue, 08 Feb 2024 V.5.0.5
close the app (see #260 and #113 issues).
* Fixed small bug in preferences dialog causing FFmpeg binaries to be set
incorrectly (self.settings['ffprobe_cmd'] > self.settings['ffplay_cmd']) .

* Removed backwards compatibility with wxPython < 4.1.0 .
* Minimun requirements fixed to `wxPython >= 4.1.0`, `Python >= 3.7`,
`FFmpeg >= 5.1.4` .
* New versions of wxPython support svg images for icons well, so most png
icons are removed.
* Fixed FFmpeg warns: `-vsync arg is deprecated, use fps_mode`
* Fixed FFmpeg seeking (-ss) and duration (-t) parameters by repositioning the
duration code after file inputs (-i). This fixed many inaccuracies and was
also faster.
* Added a new item to the File menu with its accelerator to delete all
imported files/URLs. This feature was already present on the
toolbar buttons but without the possibility of a convenient accelerator.
* [A/V Conversions] Overall improved the stabilizer filter for both the
preview and the production of the final video. Fixed various bugs that
prevented correct video playback.

+------------------------------------+
Wed, 24 Jan 2024 V.5.0.4
Expand Down
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BASE DEPENDENCIES

Required:
- Python >=3.7.0
- wxPython-Phoenix >=4.0.7
- wxPython-Phoenix >=4.1.1
- PyPubSub
- requests
- FFmpeg (with ffplay and ffprobe) >=5.1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ each operating system.

### Requirements
- **[Python >= 3.7.0](https://www.python.org/)**
- **[wxPython-Phoenix >= 4.0.7](https://wxpython.org/)**
- **[wxPython-Phoenix >= 4.1.1](https://wxpython.org/)**
- **[PyPubSub >= 4.0.3](https://pypi.org/project/PyPubSub/)**
- **[requests >= 2.21.0](https://pypi.org/project/requests/)**
- **[ffmpeg >=5.1](https://ffmpeg.org/)**
Expand Down
17 changes: 0 additions & 17 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,14 @@ URGENCY: to do soon
URGENCY: high
--------------

- FFmpeg warns: for the new versions `-vsync` arg is deprecated, use `fps_mode`.
This is related to `video_to_sequences.py`, `concatenete.py`, but for
backwards compatibility reasons I will keep the '-vsync' argument for a
while longer because fps_mode does not work with old versions of FFmpeg.
So, vsync's warning is just a warning and still works with the new versions.

- A new implementation is needed for embedding subtitles. The infrastructure
could be organized on a new A/V Conversions tab or as an independent tool
that can be called up from the main menu (Home).

---------------
URGENCY: medium
----------------
- If you plan to refactor code and make it compatible only for wx.Python>=4.1.1:
- then erase `TestListCtrl` class on `formatcode.py` file.
- Also check all code that starts with `wx.version()` keywords.
- Erase these block codes along any py-files:

try:
from wx.svg import SVGimage
except ModuleNotFoundError:
pass

However, note that these operations leads to make Videomass code incompatible
for wxPython4.0.7

-------------
URGENCY: low (New implementations)
Expand Down
20 changes: 18 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,24 @@ videomass (5.0.5-1) UNRELEASED; urgency=medium
* [YouTube Downloader] Saves the width of the format code columns when you
close the app (see #260 and #113 issues).
* Fixed small bug in preferences dialog causing FFmpeg binaries to be set
incorrectly self.settings['ffprobe_cmd'] > self.settings['ffplay_cmd']) .
-- Gianluca Pernigotto <[email protected]> Thu, 08 Feb 2024 00:15:00 +0200
incorrectly (self.settings['ffprobe_cmd'] > self.settings['ffplay_cmd']) .
* Removed backwards compatibility with wxPython < 4.1.0 .
* Minimun requirements fixed to `wxPython >= 4.1.0`, `Python >= 3.7`,
`FFmpeg >= 5.1.4` .
* New versions of wxPython support svg images for icons well, so most png
icons are removed.
* Fixed FFmpeg warns: `-vsync arg is deprecated, use fps_mode`
* Fixed FFmpeg seeking (-ss) and duration (-t) parameters by repositioning the
duration code after file inputs (-i). This fixed many inaccuracies and was
also faster.
* Added a new item to the File menu with its accelerator to delete all
imported files/URLs. This feature was already present on the
toolbar buttons but without the possibility of a convenient accelerator.
* [A/V Conversions] Overall improved the stabilizer filter for both the
preview and the production of the final video. Fixed various bugs that
prevented correct video playback.

-- Gianluca Pernigotto <[email protected]> Sun, 18 Feb 2024 16:00:00 +0200

videomass (5.0.4-1) UNRELEASED; urgency=high

Expand Down
Binary file modified docs/man/man1/videomass.1.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def source_build():

if 'sdist' in sys.argv or 'bdist_wheel' in sys.argv:

inst_req = ["wxpython>=4.0.7; platform_system=='Windows' or "
inst_req = ["wxpython>=4.1.1; platform_system=='Windows' or "
"platform_system=='Darwin'",
"PyPubSub>=4.0.3",
"yt_dlp>=2021.9.2",
Expand All @@ -60,7 +60,7 @@ def source_build():
long_description_ct = 'text/markdown'

else: # e.g. to make a Debian source package, include wxpython.
inst_req = ["wxpython>=4.0.7",
inst_req = ["wxpython>=4.1.1",
"PyPubSub>=4.0.3",
"requests>=2.21.0",
]
Expand Down
Binary file removed videomass/art/icons/Sign_Icons/48x48/icon_concat.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed videomass/art/icons/Sign_Icons/48x48/youtube.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed videomass/art/icons/Sign_Icons/48x48_dark/youtube.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed videomass/art/icons/Videomass-Colours/16x16/coloreq.png
Binary file not shown.
Binary file not shown.
Binary file removed videomass/art/icons/Videomass-Colours/16x16/copyprf.png
Binary file not shown.
Binary file not shown.
Binary file removed videomass/art/icons/Videomass-Colours/16x16/delprf.png
Binary file not shown.
Binary file removed videomass/art/icons/Videomass-Colours/16x16/denoise.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Colours/16x16/editprf.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Colours/16x16/newprf.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Colours/16x16/preview.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Colours/16x16/timer.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Colours/24x24/convert.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Colours/24x24/go-next.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Colours/24x24/home.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Colours/24x24/play.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Colours/24x24/stop.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/addtoprst.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/audiotrack.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/coloreq.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/configure.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/copyprf.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/delprf.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/denoise.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/edit-clear.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/editprf.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/newprf.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/playback.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/playlist.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/preview.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/stabilizer.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/timer.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/16x16/volanalyze.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/24x24/cleanup.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/24x24/convert.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/24x24/download.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/24x24/go-next.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/24x24/home.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/24x24/play.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/24x24/properties.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/24x24/statistics.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Dark/24x24/stop.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/addtoprst.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/coloreq.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/configure.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/copyprf.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/delprf.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/denoise.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/editprf.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/newprf.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/playback.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/playlist.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/preview.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/16x16/timer.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/24x24/convert.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/24x24/download.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/24x24/go-next.png
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/24x24/home.png
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/24x24/play.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed videomass/art/icons/Videomass-Light/24x24/stop.png
Diff not rendered.
5 changes: 1 addition & 4 deletions videomass/gui_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@
from shutil import which, rmtree
import builtins
import wx
try:
from wx.svg import SVGimage
except ModuleNotFoundError:
pass
from wx.svg import SVGimage
from videomass.vdms_sys.argparser import arguments
from videomass.vdms_sys.configurator import DataSource
from videomass.vdms_sys import app_const as appC
Expand Down
19 changes: 11 additions & 8 deletions videomass/vdms_dialogs/filter_stab.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Author: Gianluca Pernigotto <[email protected]>
Copyleft - 2024 Gianluca Pernigotto <[email protected]>
license: GPL3
Rev: July.17.2023
Rev: Feb.18.2024
Code checker: flake8, pylint
This file is part of Videomass.
Expand Down Expand Up @@ -483,10 +483,9 @@ def on_load_at_time(self, event):
return

if self.ckbx_duo.IsChecked():
makeduo = f'-i "{self.framesrc}" -filter_complex hstack'
error = self.process(self.filename,
self.frameduo,
args=makeduo,
args='',
mode='makeduo',
)
if error:
Expand All @@ -505,7 +504,7 @@ def process(self, infile, outfile=None, args='', mode=None):
ffmpeg `eq` filter.
"""
if not self.mills:
sseg = ''
sseg, tseg = '', ''
else:
seek = self.sld_time.GetValue()
stime = self.spin_dur.GetValue() * 1000
Expand All @@ -515,16 +514,20 @@ def process(self, infile, outfile=None, args='', mode=None):
seek, stime = 0, self.mills
duration = integer_to_time(stime, False) # to 24-hour
self.clock = integer_to_time(seek, False) # to 24-hour
sseg = f'-ss {self.clock} -t {duration}'
sseg = f'-ss {self.clock}.000'
tseg = f'-t {duration}.000'

if mode == 'detect':
nul = ('NUL' if VidstabSet.appdata['ostype']
== 'Windows' else '/dev/null')
argstr = f'{sseg} -i "{infile}" {args} -f null -y {nul}'
argstr = f'{sseg} -i "{infile}" {tseg} {args} -f null -y {nul}'

elif mode == 'trasform':
argstr = f'{sseg} -i "{infile}" {args} -y "{outfile}"'
argstr = f'{sseg} -i "{infile}" {tseg} {args} -y "{outfile}"'

elif mode == 'makeduo':
argstr = f'{sseg} -i "{infile}" {args} -y "{outfile}"'
argstr = (f'{sseg} -i "{infile}" {tseg} -i "{self.framesrc}" '
f'{tseg} -filter_complex hstack -y "{outfile}"')
else:
return None

Expand Down
20 changes: 16 additions & 4 deletions videomass/vdms_io/io_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Author: Gianluca Pernigotto <[email protected]>
Copyleft - 2024 Gianluca Pernigotto <[email protected]>
license: GPL3
Rev: Feb.13.2023
Rev: Feb.17.2024
Code checker: flake8, pylint
This file is part of Videomass.
Expand Down Expand Up @@ -64,11 +64,17 @@ def youtubedl_getstatistics(url, ssl, parent=None):
# --------------------------------------------------------------------------#


def stream_play(filepath, tseq, param, autoexit):
def stream_play(filepath, timeseq, param, autoexit):
"""
Call Thread for playback with ffplay
"""
get = wx.GetApp() # get data from bootstrap

if timeseq:
splseq = timeseq.split()
tseq = f'{splseq[0]} {splseq[1]}', f'{splseq[2]} {splseq[3]}'
else:
tseq = '', ''
try:
with open(filepath, encoding='utf8'):
FilePlay(filepath,
Expand All @@ -89,13 +95,19 @@ def stream_play(filepath, tseq, param, autoexit):
# -----------------------------------------------------------------------#


def volume_detect_process(filelist, time_seq, audiomap, parent=None):
def volume_detect_process(filelist, timeseq, audiomap, parent=None):
"""
Run thread to get audio peak level data and show a
pop-up dialog with message.
"""
get = wx.GetApp()
thread = VolumeDetectThread(time_seq,

if timeseq:
splseq = timeseq.split()
tseq = f'{splseq[0]} {splseq[1]}', f'{splseq[2]} {splseq[3]}'
else:
tseq = '', ''
thread = VolumeDetectThread(tseq,
filelist,
audiomap,
get.appset['logdir'],
Expand Down
Loading

0 comments on commit d4834c5

Please sign in to comment.