Home Your Ad Here

Go Back   IndieTalk - Indie Film Forum > Making The Film > DIY

Reply
 
Thread Tools Display Modes
Old 07-13-2014, 01:22 AM   #1
Will Vincent
Basic - Premiere Expired
 
Join Date: Oct 2004
Location: Twin Cities, MN
Posts: 4,758
File transcoding.. getting nerdy with it!

There are a plethora of tools out there for converting video files between various formats. Nine times out of ten, or maybe more like 9.777425215878 times out of 10 the underlying piece that makes this work is ffmpeg.

The sad thing is, a lot of these tools have a crippled free version that will give you a conversion of, say, five minutes max, unless you line their pockets. For what? For the gui.

Well.. GUI-Smoooey! FFmpeg is free, and it is able to transcode between a metric shit-ton of codecs, you don't need a gui for that, what you really need is a shell script, because often times you have a big old bunch of stuff to transcode as a batch job.

I've just written such a script, which is running presently, happily humming away in the background transcoding 106 MXF files to Prores 422 LT. All free. No fuss, no muss.. well ok, I had to tinker with the script a bit, but I'm sharing so YOU don't have to.

This will work on a mac or linux, for sure.. would likely work on Windows as well with cygwin or the like.

Here's the script:

Code:
#!/bin/bash
 
# These paths should either be relative to the current directory
# or full system paths.
 
SOURCE_PATH="Camera_Original"
DEST_PATH="Prores"
 
# wildcard for files to process
FILES="*.MXF"
 
# FFmpeg arguments/options
FFMPEG_OPT="-vcodec prores -profile:v 1 -acodec pcm_s16le"
 
# Container wrapper format (file extension, mov, avi, etc)
WRAPPER="mov"
 
# Verbosity level: quiet, panic, fatal, error, warning, info, verbose
VERBOSITY="warning"
 
 
######################################################
## DO NOT CHANGE BELOW THIS LINE  
######################################################
 
clear
for FILE in $SOURCE_PATH/$FILES
do
  FILENAME=$(basename "$FILE")
  CURRENT="${FILENAME%%.*}"
  echo "Processing $CURRENT..."
  ffmpeg -i $FILE $FFMPEG_OPT -v $VERBOSITY $DEST_PATH/$CURRENT.$WRAPPER
done
Suppose you wanted to transcode to prores proxies.. no problem, see where it says -profile:v 1 in the ffmpeg options line? change that to -profile:v 0. Want prores HQ? Change it to -profile:v 3

The rest of the info for various codecs and whatnot can be found in the ffmpeg documentation.

Last edited by Will Vincent; 07-13-2014 at 01:28 AM.
Will Vincent is offline   Reply With Quote
Old Today   #1A
film guy
Basic Member
 
Posts: 17

 
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:45 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.


©IndieTalk