Gå til hovedinnhold

A simple script to convert all subfolders containing avi-files to mp4 using ffmpeg

This simple bash loop will go into each subfolders in the directory where you run the script and convert each avi-file to the mp4-container with the libx264 video codec and aac audio codec using ffmpeg:

  1. Create a new file, e.g. ffmpeg-subfolder-convert.sh and edit this file so it looks like this:
  2. #!/bin/bash
    for i in */*.avi;
    do
    ffmpeg -i "$i" -c:v libx264 -preset slow -crf 22 -c:a libfdk_aac -b:a 128k "$i".mp4 ;
    done

  3. Run the skript in the directory with all the subfolders using:
  4. sh ffmpeg-subfolder-convert.sh

Kommentarer

Populære innlegg fra denne bloggen

Autodownloader for put.io

Downloading files from your put.io archive can be done with wget, it can be done unattended and you won't even have to initiate the job: Place all the files you would like to download in a folder on put.io (i.e /download). Create the script download.sh on your system. Run the script as a cron-job (crontab -e) download.sh #!/bin/sh wget --limit-rate=20k --no-check-certificat -c -nH -P /FOLDER/ -r --ftp-user=USERNAME --ftp-password=PASSWORD ftp://ftp.put.io/download/* --limit-rate=20k will limit bandwith to 20k --no-check-certificat will skip certificate check -c will make wget continue the download if  interrupted   -nH will stop creating the ftp-path in your download-folder -P /FOLDER/ tell wget where to put the downloaded files -r recursive, so that even folders in download will be downloaded --ftp-user=USERNAME Your username to put.io --ftp-password=PASSWORD Your password to put.io (special characters need a backslash i.e PASS\!WORD if your p...

Locales i Ubuntu og andre Debian-spinoffs

"dpkg-reconfigure locales" genererer locales som er listet opp i filen "/var/lib/locales/supported.d/local". Ønsker man å generere flere enn de som allerede er oppført må man derfor legge de til der (en på hver linje) før man kjører "dpkg-reconfigure locales". Godtatt syntaks finnes i filen "/usr/share/i18n/SUPPORTED". Typisk: no_NO.UTF-8 UTF-8 no_NO ISO-8859-1

Helle synger Flashlight (Jessie J) og vinner Talentiaden 2016 på Gudeber...