Skip to content

Commit

Permalink
Create convert.sh
Browse files Browse the repository at this point in the history
Script to convert all files in a directory automatically to h.265 (HEVC).
  • Loading branch information
Kazz3r24 authored Dec 20, 2019
1 parent 09d9f92 commit c11e52a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions convert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# this script is to convert automatically a folder of video files to a specified extension
# You need to change SRC -- Sourse folder and DEST -- Destination folder

SRC=/enter/full/source/path
DEST=/enter/full/destination/path
DEST_EXT=YOUREXTENSION
FFMPEG=/location/of/ffmpeg

for FILE in `ls $SRC/*/*`
do
filename=$(basename $FILE)
extension=${filename##*.}
filename=${filename%.*}

$FFMPEG -i $SRC/$FILE -c:a copy -c:v libx265 $DEST/$filename.$DEST_EXT
done

0 comments on commit c11e52a

Please sign in to comment.