Welcome to our community

Be a part of something great, join today!

  • Hey all, just changed over the backend after 15 years I figured time to give it a bit of an update, its probably gonna be a bit weird for most of you and i am sure there is a few bugs to work out but it should kinda work the same as before... hopefully :)

RED Line Batch

Colin Hubick

Well-known member
Joined
Mar 23, 2007
Messages
629
Reaction score
0
Points
16
Location
Canada
Hello all, I'm experimenting with Red Line today, and have REDLINE successfully running a batch of .R3D files. Everything works great, but is there a parameter that will pass audio through to the final .mov file created? And my next question is running this from multiple machines. I don't know if this is supported yet, so again any help or suggestions would be great.

below is the script I'm running, any help would be appreciated.

for FILE in /Volumes/X-serve/SaskTourism/RED/*.RDM/*.RDC/*.R3D ; do redline -i `echo $FILE` -w 11 -R 2 --filter 5 --fit 1 --QTcodec 0 -I 320 -B 0.000000 -C 0.000000 -x 0.000000 -k 5600 -T 1.000000 -t 0.000000 -r 1.000000 -g 1.000000 -b 1.000000 -X 0.000000 --blackX 0.000000 --blackY 0.000000 --toeX 25.000000 --toeY 25.000000 --midX 50.000000 --midY 50.000000 --kneeX 75.000000 --kneeY 75.000000 --whiteX 100.000000 --whiteY 100.000000 --black 0.000000 --white 100.000000 -G 14 -d 8 -D 50 --NR 50 -c 11 -V 0 ; echo "for $FILE" ; done

Colin

edit - btw using this method, even on one machine is quite quick, and seems much less taxing on the system...
 
Not sure if you understand the command line you are execuiting, but the "for FILE in" statement is execuiting "redline ..." numerous times for each file that matches the spec in the "for" statement.

To do this on multiple computers simply move half the .R3D files to the other computer and run the same command line.

If the content is on a network share then you could mount it with the second computer and move half the files to another directory and tweek the command line. For example, move half the files from *.RDC to *.RDC2 and alter the command line on the second machine to do that group.
 
hubickc,

There is a shareware app called QTcoffee, you can download that will allow you to take audio from one Quicktime and copy it to another. You can download QTcoffee here:
http://www.3am.pair.com/QTCoffee.html

Here is a link to a thread I started about using QTcoffee:
http://www.reduser.net/forum/showthread.php?t=14226&highlight=qtcoffee

You should modify your script to not run Redline for long .red files (i.e. _002.R3D, _003.R3D, etc) This is easily fixed by changing *.R3D to *001.R3D.

You could modify your script like this to get audio and not run Redline multiple times for long takes:

for FILE in $(find /Volumes/X-serve/SaskTourism/RED/*.RDM/*.RDC/ -name *_001.R3D 2>&1 | awk -F "_001.R3D" '{print $1}'); do redline -i `echo $FILE"_001.R3D"` -w 11 -R 2 --filter 5 --fit 1 --QTcodec 0 -I 320 -B 0.000000 -C 0.000000 -x 0.000000 -k 5600 -T 1.000000 -t 0.000000 -r 1.000000 -g 1.000000 -b 1.000000 -X 0.000000 --blackX 0.000000 --blackY 0.000000 --toeX 25.000000 --toeY 25.000000 --midX 50.000000 --midY 50.000000 --kneeX 75.000000 --kneeY 75.000000 --whiteX 100.000000 --whiteY 100.000000 --black 0.000000 --white 100.000000 -G 14 -d 8 -D 50 --NR 50 -c 11 -V 0 -o $FILE"_VIDEO_ONLY.mov" ; echo "combining audio and video for $FILE" ; /usr/local/bin/muxmovie $FILE"_VIDEO_ONLY.mov" -track "Video Track" $FILE"_P.mov" -track "Sound Track" -track "Timecode Track 1" -track "Timecode Track 2" -self-contained -o $FILE"_AV.mov" ; echo "Done with $FILE" ; done


If you want the script to automatically remove the _VIDEO_ONLY.mov files it created, you can add it like this:

for FILE in $(find /Volumes/X-serve/SaskTourism/RED/*.RDM/*.RDC/ -name *_001.R3D 2>&1 | awk -F "_001.R3D" '{print $1}'); do redline -i `echo $FILE"_001.R3D"` -w 11 -R 2 --filter 5 --fit 1 --QTcodec 0 -I 320 -B 0.000000 -C 0.000000 -x 0.000000 -k 5600 -T 1.000000 -t 0.000000 -r 1.000000 -g 1.000000 -b 1.000000 -X 0.000000 --blackX 0.000000 --blackY 0.000000 --toeX 25.000000 --toeY 25.000000 --midX 50.000000 --midY 50.000000 --kneeX 75.000000 --kneeY 75.000000 --whiteX 100.000000 --whiteY 100.000000 --black 0.000000 --white 100.000000 -G 14 -d 8 -D 50 --NR 50 -c 11 -V 0 -o $FILE"_VIDEO_ONLY.mov" ; echo "combining audio and video for $FILE" ; /usr/local/bin/muxmovie $FILE"_VIDEO_ONLY.mov" -track "Video Track" $FILE"_P.mov" -track "Sound Track" -track "Timecode Track 1" -track "Timecode Track 2" -self-contained -o $FILE"_AV.mov" ; echo "Cleaning up $NAME" ; rm -f $NAME"_VIDEO_ONLY.mov" ; echo "Done with $FILE" ; done

Before you run this with teh clean-up stuff, have it echo what it is going to erase as a test, just to make sure I didn't typo something. Simply change:

rm -f $NAME"_VIDEO_ONLY.mov" to echo "rm -f $NAME"_VIDEO_ONLY.mov""

This will tell you the command it is going to run instead of running it.

Hope that helps.


Mahalo,
Dusty
 
I do not understand it entirely, so any assistance with this script is appreciated. what would be the fix?

Colin


THANKS Dustin!
 
If you want the script to automatically remove the _VIDEO_ONLY.mov files it created, you can add it like this:

for FILE in $(find /Volumes/X-serve/SaskTourism/RED/*.RDM/*.RDC/ -name *_001.R3D 2>&1 | awk -F "_001.R3D" '{print $1}'); do redline -i `echo $FILE"_001.R3D"` -w 11 -R 2 --filter 5 --fit 1 --QTcodec 0 -I 320 -B 0.000000 -C 0.000000 -x 0.000000 -k 5600 -T 1.000000 -t 0.000000 -r 1.000000 -g 1.000000 -b 1.000000 -X 0.000000 --blackX 0.000000 --blackY 0.000000 --toeX 25.000000 --toeY 25.000000 --midX 50.000000 --midY 50.000000 --kneeX 75.000000 --kneeY 75.000000 --whiteX 100.000000 --whiteY 100.000000 --black 0.000000 --white 100.000000 -G 14 -d 8 -D 50 --NR 50 -c 11 -V 0 -o $FILE"_VIDEO_ONLY.mov" ; echo "combining audio and video for $FILE" ; /usr/local/bin/muxmovie $FILE"_VIDEO_ONLY.mov" -track "Video Track" $FILE"_P.mov" -track "Sound Track" -track "Timecode Track 1" -track "Timecode Track 2" -self-contained -o $FILE"_AV.mov" ; echo "Cleaning up $NAME" ; rm -rf $NAME"_VIDEO_ONLY.mov" ; echo "Done with $FILE" ; done

Before you run this with teh clean-up stuff, have it echo what it is going to erase as a test, just to make sure I didn't typo something. Simply change:

rm -rf $NAME"_VIDEO_ONLY.mov" to echo "rm -rf $NAME"_VIDEO_ONLY.mov""

This will tell you the command it is going to run instead of running it.

Hope that helps.


Mahalo,
Dusty

Hey Dusty, thanks for the help, works like a charm combining the audio into the final file. But I tried the above script and the _VIDEO_ONLY.mov does not get erased and remains in the folder...I apologize for my pea brain, but I just can't get it to trash that _VIDEO_ONLY.mov file.

cheers
Colin
 
hubickc,

Okay, lets break the script down into its basic parts.

#In the begining of the script we define a variable $FILE
#I use the "find" command to look for files in your directory that end in *001.R3d
#"2>&1" hides any error messages from teh screen. These are usually things like I don't have permission to see this file, etc.
#next we pipe "|" the output, or send the output to another command
#we then use the "awk" command to strip off the end of the file name "_001.R3D
#now we have a varible of the filename minus the end of the name and the path to the file and can add things to the end as needed
#the ; at the end tells the script we are finished with this part and to now move on to the next part

for FILE in $(find /Volumes/X-serve/SaskTourism/RED/ -name *001.R3D 2>&1 | awk -F "_001.R3D" '{print $1}') ;

#in this part we run Redline
#We tell it the name of the file is $FILE"_001.R3D" since we striped off the end of the file above.
#then you put in all your other Redline parameters as needed
#for output I am telling the file to use $FILE + "_VIDEO_ONLY.mov"
#I added the "_VIDEO_ONLY.mov" part so I can use this file later in the script.
#you could add any extension you want.
#this file will be in the directory with the .R3D file

do redline -i $FILE"_001.R3D" -w 11 -o $FILE"_VIDEO_ONLY.mov" ;

#in this next part we are just telling the script to print these words on the screen, just so we know where we are.
#echo repeats anything after it like an echo

echo "combining audio and video for $FILE" ;

#this next part is to get audio in the rendered file.
#after you download QTcoffee and install it, there will be several new commands in /usr/local/bin
#this a a standard location for installing command line applications
#We tell the script to run this command and exactly where this file is located
#/usr/local/bin/muxmovie
#if you $PATH is up to date you shouldn't need to type out the entire path to the file, so this is just for saftey
#we tell "muxmovie" to copy the video from $FILE"_VIDEO_ONLY.mov" and the sound and timecode from the $FILE"_P.mov" proxy file
#It will use these to make a completely new file called $FILE with _AV.mov at the end
#this file will be in the directory with the .R3D file

/usr/local/bin/muxmovie $FILE"_VIDEO_ONLY.mov" -track "Video Track" $FILE"_P.mov" -track "Sound Track" -track "Timecode Track 1" -track "Timecode Track 2" -self-contained -o $FILE"_AV.mov" ;

#again, we are just having the script tell us what it is doing

echo "Cleaning up $FILE" ;

#this part tells the script to delete the "_VIDEO_ONLY.mov" file to save space.
#since we have a new file with this video and other audio, we don't need this file anymore
#the danger with this command is the -f
#this tells the script to delete the file without asking if it is deleting the correct file.
#rm -f will delete files in a way that they CAN NOT be recovered.
#if you aren't completely comfortable with scripting, leave this part out
#then come back at the end and use finder to search for _VIDEO_ONLY.mov and delete the files

rm -f $FILE"_VIDEO_ONLY.mov" ;


#again, we are just having the script tell us what it is doing

echo "Done with $FILE" ;

At the very end we tell the script we are finished and to exit back to the command prompt with done

done



So here is the script we just broke down and explained:

for FILE in $(find /Volumes/X-serve/SaskTourism/RED/ -name *_001.R3D 2>&1 | awk -F "_001.R3D" '{print $1}'); do redline -i `echo $FILE"_001.R3D"` -w 11 -R 2 --filter 5 --fit 1 --QTcodec 0 -I 320 -B 0.000000 -C 0.000000 -x 0.000000 -k 5600 -T 1.000000 -t 0.000000 -r 1.000000 -g 1.000000 -b 1.000000 -X 0.000000 --blackX 0.000000 --blackY 0.000000 --toeX 25.000000 --toeY 25.000000 --midX 50.000000 --midY 50.000000 --kneeX 75.000000 --kneeY 75.000000 --whiteX 100.000000 --whiteY 100.000000 --black 0.000000 --white 100.000000 -G 14 -d 8 -D 50 --NR 50 -c 11 -V 0 -o $FILE"_VIDEO_ONLY.mov" ; echo "combining audio and video for $FILE" ; /usr/local/bin/muxmovie $FILE"_VIDEO_ONLY.mov" -track "Video Track" $FILE"_P.mov" -track "Sound Track" -track "Timecode Track 1" -track "Timecode Track 2" -self-contained -o $FILE"_AV.mov" ; echo "Cleaning up $FILE" ; rm -f $FILE"_VIDEO_ONLY.mov" ; echo "Done with $FILE" ; done



Does that help?


Mahalo,
Dusty
 
Does that help?


Mahalo,
Dusty

It helps a ton, thanks for taking the time to write all that. I'm taking it home with me to study over the weekend. I'm really loving REDLINE!

Thanks muchly!

Colin
 
I'd like to thank you as well, well documented!

Regards,

Uli
 
I forgot to mention the FOR and DO. This means FOR every instance of what follows, DO whatever you tell it. So we are telling it FOR every instance of $FILE, DO redline + everything else. FOR must be follow by DO.


Mahalo,
Dusty
 
Hi Dustin

Thanks a lot for the script and the explanation. This was really helpful.
Is it possible to filter out files that have already been processed during the search? So you could run it on a folder several times and it only processes newer files?

Regards
Simon
 
Hey Dusty, thanks for the help, works like a charm combining the audio into the final file. But I tried the above script and the _VIDEO_ONLY.mov does not get erased and remains in the folder...I apologize for my pea brain, but I just can't get it to trash that _VIDEO_ONLY.mov file.

cheers
Colin

$NAME in the part that removes the _VIDEO_ONLY.mov files should be $FILE. I haven't tested this, use at your own risk :wink:.
 
sbaechler,

Yes, you could make the script ignore files that have already been rendered. I am busy with a shoot, so I don't have time to write that.

Can someone else modify the script to ignore .R3D files if an _AV.mov exist in the folder?


Mahalo,
Dusty
 
Back
Top