Skip to content

Commit

Permalink
Adding "Animated Gif" and "MP3 audio only" presets, as well as removi…
Browse files Browse the repository at this point in the history
…ng AV1 presets (for now - since they are unusably slow). Also removing an old FLV preset which was broken.
  • Loading branch information
jonoomph committed Dec 3, 2022
1 parent a9b9c52 commit 8745abe
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 31 deletions.
15 changes: 8 additions & 7 deletions src/presets/format_mkv_libaom.xml → src/presets/format_gif.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
<!DOCTYPE openshot-export-option>
<export-option>
<type translatable="True">All Formats</type>
<title translatable="True">MKV (av1)</title>
<videoformat>mkv</videoformat>
<videocodec>libaom-av1</videocodec>
<audiocodec>libvorbis</audiocodec>
<title translatable="True">GIF (animated)</title>
<export-to>Video Only</export-to>
<videoformat>gif</videoformat>
<videocodec>gif</videocodec>
<audiocodec>aac</audiocodec>
<audiochannels>2</audiochannels>
<audiochannellayout>3</audiochannellayout>
<videobitrate
low="50 crf"
med="23 crf"
high="1 crf"></videobitrate>
low="384 kb/s"
med="5 Mb/s"
high="15.00 Mb/s"></videobitrate>
<audiobitrate
low="96 kb/s"
med="128 kb/s"
Expand Down
2 changes: 1 addition & 1 deletion src/presets/format_mkv_x264_hw.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE openshot-export-option>
<export-option>
<type translatable="True">All Formats</type>
<title translatable="True">MP4 (h.264 va)</title>
<title translatable="True">MKV (h.264 va)</title>
<videoformat>mkv</videoformat>
<videocodec>h264_vaapi</videocodec>
<audiocodec>aac</audiocodec>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<!DOCTYPE openshot-export-option>
<export-option>
<type translatable="True">All Formats</type>
<title translatable="True">FLV (h.264)</title>
<videoformat>flv</videoformat>
<videocodec>libx264</videocodec>
<title translatable="True">MP3 (audio only)</title>
<export-to>Audio Only</export-to>
<videoformat>mp3</videoformat>
<videocodec>mpeg2video</videocodec>
<audiocodec>libmp3lame</audiocodec>
<audiochannels>2</audiochannels>
<audiochannellayout>3</audiochannellayout>
Expand Down
20 changes: 0 additions & 20 deletions src/presets/format_webm_libav1.xml

This file was deleted.

11 changes: 11 additions & 0 deletions src/windows/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,17 @@ def cboSimpleTarget_index_changed(self, widget, index):
for profile_name in self.profile_names:
profiles_list.append(profile_name)

# Allow targets to override the following setting (export to)
# Export to: "Video & Audio", "Video Only", "Audio Only", "Image Sequence"
# Default to "Video & Audio" if XML export-to element missing
export_to_options = [_("Video & Audio"), _("Video Only"),
_("Audio Only"), _("Image Sequence")]
export_to = export_to_options[0]
if xmldoc.getElementsByTagName("export-to"):
export_to = _(xmldoc.getElementsByTagName("export-to")[0].childNodes[0].data)
if export_to in export_to_options:
self.cboExportTo.setCurrentIndex(export_to_options.index(export_to))

# get the video bit rate(s)
videobitrate = xmldoc.getElementsByTagName("videobitrate")
for rate in videobitrate:
Expand Down

0 comments on commit 8745abe

Please sign in to comment.