Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

need help with a script written for avidemux

Featured Replies

hi i know the avidemux isnt the forum to ask for a script and i not sure if this is the right subfolder for script

 

but i looking for help  how to read all videos    it be like avi moi flv mp4 even mkv  i have more then 200k of videos 

id like a batch program to read all of them and remux them into mkv  and delete all metatags

then if there is any errors  the script file would log it if any videos are out of sync  

id also want it to recreate it in a different folder with the same subdiectories...    i have tried  mkvtoolnix  but thats going to take me forever... but 500 at a time

 

anyone have a script or point me to the right directions  as i dont know how to write any of it

Edited by comet424

  • Author

hi i didnt notice the one reply   and i been a way and really havent done much  but i was fiddling with your code but i cant get it to work right.. i modified it as my home videos and such have spaces   i googled   as i get -iname error so i changed it to -name   but here is my current code  

as i trying to search for everything   and then after remux  everything and log any errors  

i getting multiple errors my first error is   

 

"aa: line 7: cd: too many arguments
/mnt/user/Home Videos/test/"

 

and it doesnt like the find search pattern  about using the -iname  and the directory needs to be prior to the filename...  so what si wrong in this code i modified from ya.. 

#!/bin/bash

startpath="/mnt/user/Home Videos/test/" ### main place where to look for
searchpattern="*.*"                     ### what type of files to look for
extradelpattern=".idx2"                 ### extra delete type - sample, avidemux file

cd $startpath

echo $startpath
#find . -mindepth 2 -name $searchpattern|sed "s|^\./||"|while read fname; do
find . -name $searchpattern|sed "s"|while read fname; do
        echo "$fname"
        sourcefile=$(basename '$fname')
        extrafile='$sourcefile$extradelpattern'
        filepath=$(dirname '$fname')
echo "hello"
        cd '$startpath/$filepath'
echo $startpath
echo $filepath

        if ! [ -n "$(lsof "$sourcefile")" ]; then
                if ! [ -f "$extrafile" ]; then
                        docker exec Avidemux /usr/bin/avidemux3_cli --load '$fname' --save '/output/'$fname'.mkv'--q>
                        echo "$sourcefile Converting To MKV..."
                else
                        echo "$extrafile already there..."
                fi
        else
                echo "$sourcefile in use ..."
        fi
echo"done"
done

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.