Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vp9 opus for mp4 container #137

Merged
merged 5 commits into from
Jun 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ License: GPL3
Change Log:

+------------------------------------+
June 16, 2022 V.4.0.2
June 25, 2022 V.4.0.2

* Added language selection on preferences dialog.
* Fixed check for new Videomass releases according to git API (on previous
versions this function may no longer work).
* changed permission to 0644 to io.github.jeanslack.videomass.desktop
* improved help layout for panels
* A/V Conversion: Added vp9/opus for mp4 container #133

+------------------------------------+
May 02, 2022 V.4.0.1
Expand Down
11 changes: 11 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
videomass (4.0.2-1) UNRELEASED; urgency=medium

* Added language selection on preferences dialog.
* Fixed check for new Videomass releases according to git API (on previous
versions this function may no longer work).
* changed permission to 0644 to io.github.jeanslack.videomass.desktop
* improved help layout for panels
* A/V Conversion: Added vp9/opus for mp4 container #133

-- Gianluca Pernigotto <jeanlucperni@gmail.com> Sat, 25 Jun 2022 10:13:00 +0200

videomass (4.0.1-1) UNRELEASED; urgency=medium

* [NEW] added "Still Image Maker" feature.
Expand Down
6 changes: 3 additions & 3 deletions videomass/vdms_panels/av_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Author: Gianluca Pernigotto <jeanlucperni@gmail.com>
Copyright: (c) 2018/2022 Gianluca Pernigotto <jeanlucperni@gmail.com>
license: GPL3
Rev: Mar.15.2022
Rev: June.24.2022
Code checker: flake8, pylint
########################################################

Expand Down Expand Up @@ -76,7 +76,7 @@ class AV_Conv(wx.Panel):
"Theora": {"-c:v libtheora": ["ogv"]},
# "AV1": {"-c:v libaom-av1 -strict -2",["mkv"]},
"Vp8": {"-c:v libvpx": ["webm"]},
"Vp9": {"-c:v libvpx-vp9": ["webm"]},
"Vp9": {"-c:v libvpx-vp9": ["webm", "mp4"]},
"Copy": {"-c:v copy": ["mkv", "mp4", "avi", "flv",
"m4v", "ogv", "webm", "Copy"]}
})
Expand All @@ -101,7 +101,7 @@ class AV_Conv(wx.Panel):
('flv'): ('default', None, None, 'aac', None, 'ac3', None,
'mp3', None, 'copy', 'mute'),
('mp4'): ('default', None, None, 'aac', None, 'ac3', None,
'mp3', None, 'copy', 'mute'),
'mp3', 'opus', 'copy', 'mute'),
('m4v'): ('default', None, None, 'aac', 'alac', None, None,
None, None, 'copy', 'mute'),
('mkv'): ('default', 'wav', 'flac', 'aac', None, 'ac3',
Expand Down
119 changes: 71 additions & 48 deletions videomass/vdms_panels/concatenate.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Author: Gianluca Pernigotto <jeanlucperni@gmail.com>
Copyright: (c) 2018/2022 Gianluca Pernigotto <jeanlucperni@gmail.com>
license: GPL3
Rev: Mar.24.2022
Rev: June.23.2022
Code checker:
flake8: --ignore F821, W504
pylint: --ignore E0602, E1101
Expand All @@ -30,6 +30,7 @@
import os
import wx
import wx.lib.agw.hyperlink as hpl
from videomass.vdms_dialogs.widget_utils import NormalTransientPopup
from videomass.vdms_io.checkup import check_files
from videomass.vdms_dialogs.epilogue import Formula

Expand Down Expand Up @@ -75,6 +76,8 @@ class Conc_Demuxer(wx.Panel):
see <https://ffmpeg.org/ffmpeg-formats.html#concat>

"""
LGREEN = '#52ee7d'
BLACK = '#1f1f1f'
MSG_1 = _("NOTE:\n\n- The concatenation function is performed only with "
"Audio files or only with Video files."
"\n\n- The order of concatenation depends on the order in "
Expand Down Expand Up @@ -103,54 +106,22 @@ def __init__(self, parent):
wx.Panel.__init__(self, parent=parent, style=wx.BORDER_THEME)

sizer = wx.BoxSizer(wx.VERTICAL)
self.lbl_msg1 = wx.StaticText(self, wx.ID_ANY,
label=Conc_Demuxer.MSG_1
)
sizer.Add(self.lbl_msg1, 0, wx.ALL | wx.EXPAND, 5)
sizer_link2 = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(sizer_link2)
self.lbl_msg3 = wx.StaticText(self, wx.ID_ANY,
label=_("For more details, see the "
"Videomass User Guide:")
)
if appdata['GETLANG'] in appdata['SUPP_LANGs']:
lang = appdata['GETLANG'].split('_')[0]
page = (f"https://jeanslack.github.io/Videomass/"
f"Pages/User-guide-languages/{lang}/1-User_"
f"Interface_Overview_{lang}.pdf")
else:
page = ("https://jeanslack.github.io/Videomass/"
"Pages/User-guide-languages/en/1-User_"
"Interface_Overview_en.pdf"
)
link2 = hpl.HyperLinkCtrl(self, -1, ("1.4 Concatenate media files "
"(demuxer)"), URL=page)
sizer_link2.Add(self.lbl_msg3, 0, wx.ALL | wx.EXPAND, 5)
sizer_link2.Add(link2)
sizer_link1 = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(sizer_link1)
self.lbl_msg2 = wx.StaticText(self, wx.ID_ANY,
label=_("For more information, "
"visit the official FFmpeg "
"documentation:")
)
link1 = hpl.HyperLinkCtrl(self, -1, "3.4 concat",
URL="https://ffmpeg.org/ffmpeg-formats."
"html#concat"
)
sizer_link1.Add(self.lbl_msg2, 0, wx.ALL | wx.EXPAND, 5)
sizer_link1.Add(link1)
line1 = wx.StaticLine(self, wx.ID_ANY, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.LI_HORIZONTAL,
name=wx.StaticLineNameStr
)
sizer.Add(line1, 0, wx.ALL | wx.EXPAND, 5)
# sizer.Add((20, 20))
sizer.Add((20, 20))
self.btn_help = wx.Button(self, wx.ID_ANY, ("?"), size=(30, -1))
self.btn_help.SetBackgroundColour(wx.Colour(Conc_Demuxer.LGREEN))
self.btn_help.SetForegroundColour(wx.Colour(Conc_Demuxer.BLACK))
sizer.Add(self.btn_help, 0, wx.ALL, 5)

#line1 = wx.StaticLine(self, wx.ID_ANY, pos=wx.DefaultPosition,
#size=wx.DefaultSize, style=wx.LI_HORIZONTAL,
#name=wx.StaticLineNameStr
#)
#sizer.Add(line1, 0, wx.ALL | wx.EXPAND, 5)
sizer.Add((20, 20))
boxctrl = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY), wx.VERTICAL)
sizer.Add(boxctrl, 0, wx.ALL | wx.EXPAND, 5)
sizFormat = wx.BoxSizer(wx.HORIZONTAL)
boxctrl.Add(sizFormat)

siz_pict = wx.BoxSizer(wx.HORIZONTAL)
boxctrl.Add(siz_pict)
self.ckbx_pict = wx.CheckBox(self, wx.ID_ANY,
Expand Down Expand Up @@ -181,25 +152,77 @@ def __init__(self, parent):
siz_pict.Add(self.cmb_pict, 0, wx.ALL, 5)
self.cmb_pict.SetSelection(0)
self.cmb_pict.Disable()

sizer.Add((20, 20))
sizer_link2 = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(sizer_link2)
self.lbl_msg3 = wx.StaticText(self, wx.ID_ANY,
label=_("For more details, see the "
"Videomass User Guide:")
)
if appdata['GETLANG'] in appdata['SUPP_LANGs']:
lang = appdata['GETLANG'].split('_')[0]
page = (f"https://jeanslack.github.io/Videomass/"
f"Pages/User-guide-languages/{lang}/1-User_"
f"Interface_Overview_{lang}.pdf")
else:
page = ("https://jeanslack.github.io/Videomass/"
"Pages/User-guide-languages/en/1-User_"
"Interface_Overview_en.pdf"
)
link2 = hpl.HyperLinkCtrl(self, -1, ("1.4 Concatenate media files "
"(demuxer)"), URL=page)
sizer_link2.Add(self.lbl_msg3, 0, wx.ALL | wx.EXPAND, 5)
sizer_link2.Add(link2)
sizer_link1 = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(sizer_link1)
self.lbl_msg2 = wx.StaticText(self, wx.ID_ANY,
label=_("For more information, "
"visit the official FFmpeg "
"documentation:")
)
link1 = hpl.HyperLinkCtrl(self, -1, "3.4 concat",
URL="https://ffmpeg.org/ffmpeg-formats."
"html#concat"
)
sizer_link1.Add(self.lbl_msg2, 0, wx.ALL | wx.EXPAND, 5)
sizer_link1.Add(link1)
self.SetSizer(sizer)

if appdata['ostype'] == 'Darwin':
self.lbl_msg1.SetFont(wx.Font(11, wx.SWISS, wx.NORMAL, wx.BOLD))
self.lbl_msg2.SetFont(wx.Font(11, wx.SWISS, wx.NORMAL, wx.NORMAL))
self.lbl_msg3.SetFont(wx.Font(11, wx.SWISS, wx.NORMAL, wx.NORMAL))
else:
self.lbl_msg1.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.BOLD))
self.lbl_msg2.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL))
self.lbl_msg3.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL))

tip = (_('Set the time interval between images in seconds '
'(from 1 to 100 sec.), default is 1 second'))
self.spin_pict.SetToolTip(tip)

self.Bind(wx.EVT_BUTTON, self.on_help, self.btn_help)
self.Bind(wx.EVT_CHECKBOX, self.on_pictures, self.ckbx_pict)
# ---------------------------------------------------------

def on_help(self, event):
"""
event on button help
"""
win = NormalTransientPopup(self,
wx.SIMPLE_BORDER,
Conc_Demuxer.MSG_1,
Conc_Demuxer.LGREEN,
Conc_Demuxer.BLACK)

# Show the popup right below or above the button
# depending on available screen space...
btn = event.GetEventObject()
pos = btn.ClientToScreen((0, 0))
sz = btn.GetSize()
win.Position(pos, (0, sz[1]))

win.Popup()
# ---------------------------------------------------------

def on_pictures(self, event):
"""
Enables controls to create a video file from a
Expand Down
84 changes: 48 additions & 36 deletions videomass/vdms_panels/sequence_to_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Author: Gianluca Pernigotto <jeanlucperni@gmail.com>
Copyright: (c) 2018/2022 Gianluca Pernigotto <jeanlucperni@gmail.com>
license: GPL3
Rev: Apr.28.2022
Rev: June.23.2022
Code checker:
flake8: --ignore F821, W504
pylint: --ignore E0602, E1101
Expand All @@ -31,7 +31,7 @@
import sys
import wx
import wx.lib.agw.hyperlink as hpl
import wx.lib.scrolledpanel as scrolled
from videomass.vdms_dialogs.widget_utils import NormalTransientPopup
from videomass.vdms_utils.get_bmpfromsvg import get_bmp
from videomass.vdms_dialogs.epilogue import Formula
from videomass.vdms_dialogs.filter_scale import Scale
Expand Down Expand Up @@ -72,6 +72,8 @@ class SequenceToVideo(wx.Panel):

"""
VIOLET = '#D64E93'
LGREEN = '#52ee7d'
BLACK = '#1f1f1f'
MSG_1 = _("\n1. Import one or more image files such as JPG, PNG and BMP "
"formats, then select one."
"\n\n2. Use the Resizing function to resize images which "
Expand All @@ -84,7 +86,7 @@ class SequenceToVideo(wx.Panel):
"file in the 'Queued File' list, which will be saved in a "
"folder named 'Still_Images'\nwith a progressive digit, "
"in the path you specify.")
# ----------------------------------------------------------------#
# ---------------------------------------------------------------------

def __init__(self, parent, icons):
"""
Expand All @@ -109,37 +111,14 @@ def __init__(self, parent, icons):
bmpresize = wx.Bitmap(icons['scale'], wx.BITMAP_TYPE_ANY)
bmpatrack = wx.Bitmap(icons['atrack'], wx.BITMAP_TYPE_ANY)

wx.Panel.__init__(self, parent=parent)
wx.Panel.__init__(self, parent=parent, style=wx.BORDER_THEME)
sizer = wx.BoxSizer(wx.VERTICAL)

panelscroll = scrolled.ScrolledPanel(self, -1, size=(-1, 160),
style=wx.TAB_TRAVERSAL
| wx.BORDER_THEME,
name="panelscr",
)
fgs1 = wx.BoxSizer(wx.VERTICAL)
lbl_help = wx.StaticText(panelscroll, wx.ID_ANY,
label=SequenceToVideo.MSG_1)
fgs1.Add(lbl_help, 0, wx.ALL | wx.EXPAND, 5)

sizer_link1 = wx.BoxSizer(wx.HORIZONTAL)
fgs1.Add(sizer_link1)
lbl_link = wx.StaticText(panelscroll, wx.ID_ANY,
label=_("For more information, "
"visit the official FFmpeg "
"documentation:")
)
link1 = hpl.HyperLinkCtrl(panelscroll, -1, ("FFmpeg Slideshow wiki"),
URL="https://trac.ffmpeg.org/wiki/Slideshow"
)
sizer_link1.Add(lbl_link, 0, wx.ALL | wx.EXPAND, 5)
sizer_link1.Add(link1)

sizer.Add(panelscroll, 0, wx.ALL | wx.EXPAND, 5)

panelscroll.SetSizer(fgs1)
panelscroll.SetAutoLayout(1)
panelscroll.SetupScrolling()
sizer.Add((20, 20))
self.btn_help = wx.Button(self, wx.ID_ANY, ("?"), size=(30, -1))
self.btn_help.SetBackgroundColour(wx.Colour(SequenceToVideo.LGREEN))
self.btn_help.SetForegroundColour(wx.Colour(SequenceToVideo.BLACK))
sizer.Add(self.btn_help, 0, wx.ALL, 5)
sizer.Add((20, 20))
# sizer.Add((5, 5))
boxctrl = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY), wx.VERTICAL)
sizer.Add(boxctrl, 0, wx.ALL | wx.EXPAND, 5)
Expand Down Expand Up @@ -221,16 +200,29 @@ def __init__(self, parent, icons):
size=(-1, -1),)
siz_addparams.Add(self.txt_addparams, 1, wx.ALL | wx.EXPAND, 5)
self.txt_addparams.Disable()

sizer.Add((20, 20))
fgs1 = wx.BoxSizer(wx.VERTICAL)
sizer_link1 = wx.BoxSizer(wx.HORIZONTAL)
fgs1.Add(sizer_link1)
lbl_link = wx.StaticText(self, wx.ID_ANY,
label=_("For more information, "
"visit the official FFmpeg "
"documentation:")
)
link1 = hpl.HyperLinkCtrl(self, -1, ("FFmpeg Slideshow wiki"),
URL="https://trac.ffmpeg.org/wiki/Slideshow"
)
sizer_link1.Add(lbl_link, 0, wx.ALL | wx.EXPAND, 5)
sizer_link1.Add(link1)
sizer.Add(fgs1, 0, wx.ALL | wx.EXPAND, 5)
self.SetSizer(sizer)

if appdata['ostype'] == 'Darwin':
lbl_help.SetFont(wx.Font(11, wx.SWISS, wx.NORMAL, wx.BOLD))
lbl_link.SetFont(wx.Font(11, wx.SWISS, wx.NORMAL, wx.NORMAL))
else:
lbl_help.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.BOLD))
lbl_link.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL))

self.Bind(wx.EVT_BUTTON, self.on_help, self.btn_help)
self.Bind(wx.EVT_CHECKBOX, self.on_enable_audio, self.ckbx_audio)
self.Bind(wx.EVT_BUTTON, self.on_addaudio_track, self.btn_openaudio)
self.Bind(wx.EVT_CHECKBOX, self.on_shortest, self.ckbx_shortest)
Expand All @@ -240,6 +232,26 @@ def __init__(self, parent, icons):
self.Bind(wx.EVT_BUTTON, self.on_resizing, self.btn_resize)
# ---------------------------------------------------------

def on_help(self, event):
"""
event on button help
"""
win = NormalTransientPopup(self,
wx.SIMPLE_BORDER,
SequenceToVideo.MSG_1,
SequenceToVideo.LGREEN,
SequenceToVideo.BLACK)

# Show the popup right below or above the button
# depending on available screen space...
btn = event.GetEventObject()
pos = btn.ClientToScreen((0, 0))
sz = btn.GetSize()
win.Position(pos, (0, sz[1]))

win.Popup()
# ------------------------------------------------------------------#

def reset_all_values(self):
"""
Reset all control and dictionary values
Expand Down