[FFmpeg-user] ffmpeg script

Steve Boyer steveboyer85 at gmail.com
Fri Feb 9 19:21:53 EET 2018


On Thu, Feb 8, 2018 at 9:27 PM, Shaun Nixon <nixon.shaun73 at gmail.com> wrote:

> Hi Steve,
> so i created 2 scripts:
>
> find.sh
> #! /bin/bash
> find ~/Plex-Drives/TV/TV/ -iname '*.ts' -type f -execdir
> ~/Plex-Drives/TV/TV/script.sh "{}" \;
>
> script.sh
> #!/bin/bash
> if [ ! -e lock ];
> then touch lock;
> if ffmpeg -y -i "$1" -vf scale=-1:720 -c:v libx264 -crf 23 -preset ultrafast
> -c:a copy $(basename "$1" .ts) "$1.mp4";
>

Found problem: you basically call
if ffmpeg -i ... Output_file_name "Output_file_name.ts.mp4"
line should read:
if ffmpeg -y -i "$1" -vf scale=-1:720 -c:v libx264 -crf 23 -preset
ultrafast -c:a copy "$(basename "$1" .ts).mp4";

So FFmpeg is like "I dunno what kinda output you want me to use!"

then
> ccextractor "$1" -o "$(basename "$1" .ts).srt"
> #rm "$1";
> fi
> fi
>
>
>
Steve


More information about the ffmpeg-user mailing list