diff --git a/.config/dwb/default/cookies.allow b/.config/dwb/default/cookies.allow index 60ade6d0..44e2de58 100644 --- a/.config/dwb/default/cookies.allow +++ b/.config/dwb/default/cookies.allow @@ -13,3 +13,4 @@ sourceforge.net particuliers.societegenerale.fr particuliers.secure.societegenerale.fr aur.archlinux.org +.imdb.com diff --git a/.scripts/.tc-video-custom.in b/.scripts/.tc-video-custom.in new file mode 100644 index 00000000..80c34af8 --- /dev/null +++ b/.scripts/.tc-video-custom.in @@ -0,0 +1,122 @@ +#!/bin/sh + +if [ -z "$(command -v ffmpeg)" ]; then + echo "ffmpeg required." + exit +fi + +_transcode () +{ + ## Zsh compatibility. We need it otherwise word splitting of parameter like + ## TC_SAMPLE will not work. + STATUS="$(set -o | grep 'shwordsplit' | awk '{print $2}')" + [ "$STATUS" = "off" ] && set -o shwordsplit + + ffmpeg -i "$@" \ + -c:v libx264 -preset slow -crf 20 \ + -c:a libvorbis -b:a 192k -ac 2 \ + -c:s copy \ + -map 0 \ + $TC_SAMPLE \ + "${1%.*}-$(date '+%F-%H%M%S').mkv" + + ## Restore Zsh previous options. This will not turn off shwordsplit if it + ## was on before calling the function. + [ "$STATUS" = "off" ] && set +o shwordsplit +} + + +_printhelp() +{ + cat <). +## Possible values: film, animation, grain, ... +## See x264 --fullhelp. +## No tuning by default. +## +## x264 options (-x264opts me=). +## Possible values: hex, umh... +## me=umh is default. +## +## WARNING: you should consider mixing down audio to 2 channels with '-ac +## 2'. This greatly reduce file size and avoid any confusion for playback, which +## is often the case when converting DTS to any other format because DTS has +## embedded channel description which is not available in other formats. +## +################################################################################ diff --git a/.scripts/ubuilder.in b/.scripts/.ubuilder.in similarity index 100% rename from .scripts/ubuilder.in rename to .scripts/.ubuilder.in diff --git a/.scripts/tc-video-audio2ogg b/.scripts/tc-video-audio2ogg deleted file mode 100755 index 74106db4..00000000 --- a/.scripts/tc-video-audio2ogg +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ -z "$(command -v ffmpeg)" ]; then - echo "ffmpeg required." - exit -fi - -if [ $# -ne 1 ]; then - echo "Usage: ${0##*/} VIDEO" -fi - -## TODO: getopt support for audio quality. -TC_VIDEO_AUDIO_QUAL=192k - -echo "================================================================================" -ffmpeg -i "$1" -vn -c:a libvorbis -b:a $TC_VIDEO_AUDIO_QUAL "${1%.*}-$(date '+%F-%H%M%S').ogg" diff --git a/.scripts/tc-video-custom b/.scripts/tc-video-custom new file mode 100755 index 00000000..14bfd9f8 --- /dev/null +++ b/.scripts/tc-video-custom @@ -0,0 +1,46 @@ +#!/bin/sh + +_printhelp() +{ + cat <> "$UBUILD" -cat "$(realpath "$0").in" >> "$UBUILD" +cat "${0%/*}/.${0##*/}.in" >> "$UBUILD" chmod +x "$UBUILD"