mirror of
https://github.com/tanrax/bash-folders.git
synced 2024-11-10 04:55:42 +01:00
Update bash-folders-video-optimizer.sh
This commit is contained in:
parent
446dd84137
commit
812b3f2e87
@ -67,9 +67,9 @@ start() {
|
|||||||
# Displays a flat file of information
|
# Displays a flat file of information
|
||||||
touch "$FOLDER_ORIGIN/$MESSAGE_WAITING"
|
touch "$FOLDER_ORIGIN/$MESSAGE_WAITING"
|
||||||
# Convert the file to MP4 format using ffmpeg in /tmp/
|
# Convert the file to MP4 format using ffmpeg in /tmp/
|
||||||
ffmpeg -i "/tmp/$filename" -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -nostdin -shortest "$FOLDER_ORIGIN/optimized_${filename%.*}.mp4"
|
ffmpeg -i "$FOLDER_ORIGIN/$filename" -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -nostdin -shortest "$FOLDER_ORIGIN/.optimized_${filename%.*}.mp4"
|
||||||
# When finished move the optimized file
|
# When finished move the optimized file
|
||||||
mv "/tmp/$filename" "$FOLDER_ORIGIN/$filename"
|
mv "$FOLDER_ORIGIN/.optimized_${filename%.*}.mp4" "$FOLDER_ORIGIN/optimized_${filename%.*}.mp4"
|
||||||
# Notifies that it has been terminated
|
# Notifies that it has been terminated
|
||||||
send-notification "Completed! Output: optimized_${filename%.*}.mp4"
|
send-notification "Completed! Output: optimized_${filename%.*}.mp4"
|
||||||
# Remove a flat file of information
|
# Remove a flat file of information
|
||||||
|
Loading…
Reference in New Issue
Block a user