Sponsored Content
Top Forums Shell Programming and Scripting Script to reencode all files in a directory Post 303040333 by jim mcnamara on Saturday 26th of October 2019 06:53:38 PM
Old 10-26-2019
Try using shell continuation "markers " the backslash \ Also added { }
Code:
for f in $(find . -type f -name '*.mkv'); 
do 
   ffmpeg -n -y -i "${f}" -vf scale=720:-2 -c:v mpeg4 -vtag xvid -b:v 969k \
           -r 25 -pass 1 -an -f avi /dev/null && \
   ffmpeg -n -i "${f}" -c:a libmp3lame -b:a 48k \
           -ac 1 -vf scale=720:-2,subtitles="${f}.srt":force_style='Fontsize=20' \
           -c:v mpeg4 -vtag xvid -b:v 969k -r 25 -pass 2 ".${f}.avi" ; 
done

I cannot vouch for the correctness your ffmpeg commands at all. Try it.

Last edited by jim mcnamara; 10-26-2019 at 09:17 PM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Go Thru Files in a directory:Script

Hi, I am new to unix scripting and I need to write a script that accepts a directory name as an argument, and inside the script to go through all the ".dat" files in that directory. For each ".dat" file in the directory, create a control file(.ctl) file containing the associated ".dat" file name... (0 Replies)
Discussion started by: Axis99
0 Replies

2. Shell Programming and Scripting

script to count files in a directory

Hello, I was wondering if anyone had an answer for this? thanks, KW (3 Replies)
Discussion started by: kwa71
3 Replies

3. Shell Programming and Scripting

How to execute script on files in another directory?

Hi Guys, Is there any way I can execute my bash script on files in a different folder than what the script is in? Here is an excerpt of my script: #!/usr/bin/bash input_path="/cygdrive/c/files" output_path="/cygdrive/c/files/data" #script uses files from /cygdrive/c/files directory,... (1 Reply)
Discussion started by: npatwardhan
1 Replies

4. UNIX for Dummies Questions & Answers

Reading files in script from another directory

Hi I'm trying to call my files from different directories in my script. Can you please help me. Here is my script: #!/bin/bash #---------------------------------------------------------------------------------------------------------------------- #This script allows the user... (1 Reply)
Discussion started by: ladyAnne
1 Replies

5. Shell Programming and Scripting

Script which removes files from the first directory if there is a file in the second directory

Script must removes files from the first directory if there is a file with same name in the second directory Script passed to the two directories, it lies with them in one directory: sh script_name dir1 dir2 This is my version, but it does not work :wall: set - $2/* for i do set -... (6 Replies)
Discussion started by: SLAMUL
6 Replies

6. Shell Programming and Scripting

How to check whether directory has files in it or not in shell script?

hi, I am having script in which i want to check if directory has any file in it or not. If directory contains a single or more files then and only then it should proceed to further operations... P.S.: Directory might have thousand number of files. so there might be chance of getting error... (4 Replies)
Discussion started by: VSom007
4 Replies

7. UNIX for Dummies Questions & Answers

Script to remove zip files from a directory

Hi Folks, There is a job which generates a .zip files every day at /usr/app/generated directory , now please advise for the script that will delete this zip files permanently.but while deleting it should make sure that it will not delete the last two days recently generated zip files and this... (1 Reply)
Discussion started by: punpun66
1 Replies

8. Shell Programming and Scripting

Moving Files one directory to another directory shell script

Hi, Could you please assist how to move the gz files which are older than the 90 days from one folder to another folder ,before that it need to check the file system named "nfs" if size is less than 90 or not. If size is above 90 then it shouldn't perform file move and exit the script throwing... (4 Replies)
Discussion started by: venkat918
4 Replies

9. Shell Programming and Scripting

Script to keep checking the directory for files.

Hello Folks, Looking for a script which can keep doing ls to the directories and once file landed to the directory then ,read the files do further calculation and exit. Kindly guide. Regards, Sadique (3 Replies)
Discussion started by: sadique.manzar
3 Replies
WINFF(1)																  WINFF(1)

NAME
winff - video and audio batch converter using ffmpeg SYNOPSIS
winff DESCRIPTION
This manual page documents briefly the winff command. This manual page was written for the Debian(TM) distribution because the original program does not have a manual page. Instead, it has documentation pdf format; see below. WinFF is a graphical user interface for the command line video converter ffmpeg. It runs ffmpeg from the command line. So, you just pick your files and it does the rest. WinFF doesn't actually convert any video files. It just runs ffmpeg. Therefore, It will convert any video file that ffmpeg will convert. Conversely, if ffmpeg will not convert the file, then WinFF will not either. SEE ALSO
For more details, you should have a look at the pdf manual, available at /usr/share/doc/winff/winff.pdf AUTHOR
This manual page was written by Paul Gevers <paul@climbing.nl> for the Debian(TM) system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. COPYRIGHT
Copyright (C) 2008 Paul Gevers june 14, 2008 WINFF(1)
All times are GMT -4. The time now is 11:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy