recursively convert subfolder sequences to .mov?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

recursively convert subfolder sequences to .mov?

Todd Sines
I am working on my film and I just got my set of negative scans back -- 260GB of DPX files.

I would like to take a master directory [reel 1, reel 2, etc] of a series of sub-folders [shot01, shot02] of image sequences [DPX] and convert them all to H264 .movs that live in their subfolder [for previewing purposes]

As many of the frame numbers have non-standard starting frames, is there a way to recursively convert the sequence without having to rename every sub-folder sequence to start with 00000001.dpx ?

In a perfect world I'd make H264 .mp4s and ProRes .movs at the same time.

Any ideas?

Thanks,


Todd
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: recursively convert subfolder sequences to .mov?

Paul B Mahol
On 3/19/13, Todd Sines <[hidden email]> wrote:

> I am working on my film and I just got my set of negative scans back --
> 260GB of DPX files.
>
> I would like to take a master directory [reel 1, reel 2, etc] of a series of
> sub-folders [shot01, shot02] of image sequences [DPX] and convert them all
> to H264 .movs that live in their subfolder [for previewing purposes]
>
> As many of the frame numbers have non-standard starting frames, is there a
> way to recursively convert the sequence without having to rename every
> sub-folder sequence to start with 00000001.dpx ?
>
> In a perfect world I'd make H264 .mp4s and ProRes .movs at the same time.
>
> Any ideas?

Recent enough FFmpeg version have option 'start_number' for image2
demuxer just for the reason
that should not be need to rename millions of files.

>
> Thanks,
>
>
> Todd
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: recursively convert subfolder sequences to .mov?

Todd Sines
Hi Paul,

Thanks for the reply.
The closest I got to something that works is this:

/Applications/ffmpeg -f image2 -pattern_type glob -i '/Volumes/reel1/shot1/*.dpx' -r 24 -vcodec prores /Volumes/reel1/shot1/shot1.mov

What I'd rather be doing is processing all of /reel1/*/*.dpx

to find any #########.dpx sequence in each directory, to then create

/Volumes/reel1/shot1/shot1.mov
/Volumes/reel1/shot2/shot2.mov
/Volumes/reel1/shot3/shot3.mov
/Volumes/reel1/shot4/shot4.mov

this helped:
http://throb.net/how-to-create-quicktimes-from-image-sequences-with-ffmpeg/

but I still have to change the name of the input path, output path and filename on a per folder basis.
I did 15 last night, 1 at a time, but it's gonna be a drag processing 130gb per reel like this.

I wish my perl scripting was up to bar [or existed in the first place] because this is probably cake.

My friend Matt said the following:
-generate list of directory names
-foreach directory in your list
   - count how many things there are that you want to do something with
   - for each thing
        -fill in the blanks in your command line template
        -call the command on the command line to Make it Happen
http://accad.osu.edu/~mlewis/Class/Perl/perl.html

Todd
--
On Mar 19, 2013, at 5:00 AM, Paul B Mahol <[hidden email]> wrote:

> On 3/19/13, Todd Sines <[hidden email]> wrote:
>> I am working on my film and I just got my set of negative scans back --
>> 260GB of DPX files.
>>
>> I would like to take a master directory [reel 1, reel 2, etc] of a series of
>> sub-folders [shot01, shot02] of image sequences [DPX] and convert them all
>> to H264 .movs that live in their subfolder [for previewing purposes]
>>
>> As many of the frame numbers have non-standard starting frames, is there a
>> way to recursively convert the sequence without having to rename every
>> sub-folder sequence to start with 00000001.dpx ?
>>
>> In a perfect world I'd make H264 .mp4s and ProRes .movs at the same time.
>>
>> Any ideas?
>
> Recent enough FFmpeg version have option 'start_number' for image2
> demuxer just for the reason
> that should not be need to rename millions of files.
>
>>
>> Thanks,
>>
>>
>> Todd
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: recursively convert subfolder sequences to .mov?

Liam Condron-Farnos
>but I still have to change the name of the input path, output path and filename on a per folder basis.
>I did 15 last night, 1 at a time, but it's gonna be a drag processing 130gb per reel like this.

You're on OSX (I assume, from the /Volumes), which I think means you
have access to find and bash. The following with work with GNU find:

find /Volumes/reel1 -type d -exec bash -c 'ffmpeg -f image2
-pattern_type glob -r 24 -i "$0/*.dpx" -vcodec prores
"$0/${0##*/}.mov"' '{}' \;

^That will find all directories within /Volumes/reel1, and feed them
into ffmpeg. Also, you probably want to use -r 24 as an input option
(by default, ffmpeg uses a frame rate of 25 fps, and if you set an
output rate of 24 fps, it'll drop frames).

For other versions of find, you may need to use xargs

find /Volumes/reel1 -type d -print0 | xargs -0 -I {} bash -c 'ffmpeg
-f image2 -pattern_type glob -r 24 -i "$0/*.dpx" -vcodec prores
"$0/${0##*/}.mov"' '{}'

Note that I haven't tested either of these (though I have used similar
lines for different purposes), so check the man page or online guides
yourself.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user