Extract files from avchd archive and run script to convert them to .mov

Joined
May 4, 2020
Messages
1
Reaction score
0
Hello everybody, I couldn't find any help so far so I wanted to ask the community. Thanks in advance for any suggestions to solve my problem!

I want to create YouTube content and am using my Sony Alpha camera, my MBP and the video editing software lightworks. Lightworks is not working fluently with .mts files.

the Sony Alpha puts all the footage it shoots in a folder named "private". In this folder it creates an archive "AVCHD". inside this archive you'll find another archive named "BDMV" inside of which you finally have the footage, all films together. Nobody really knows the why of the naming nor why Sony uses such a confusing and annoying way of packing the footage created with their cameras. Mystery!

Anyways, I want to create an automator workflow that helps dealing with this:

I want automator to start when I add a new AVCHD archive to the PRIVATE folder
I want it to extract the archive BDMV from the AVCHD Archive
I then want it to open the BDMV archive
I want it to navigate to the .mts files inside that archive
I then want it to run the following script in order to convert the .mts files into .mov :

#! /usr/bin/env bash

## echo $@ > /Users/macbook/Downloads/test.txt

for i in `ls -1 ./*.MTS` ; do /Users/macbook/Downloads/ffmpeg -i $i -c copy -copyts ${i%.*}.mov; done


The idea is having automatically generated .mov files thank to ffmpg

Can anybody help?? THANKS AGAIN!!!
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,102
Reaction score
492
Hello and welcome.

I don't have much experience in Automator/AppleScript. In addition, I know those many Sony cameras have a proprietary file structure, and don't play nice with Macs.

Maybe the folks over at MacScripter would have some thoughts?

C
 
Joined
Nov 1, 2017
Messages
424
Reaction score
33
I know that you are using Lightworks, but iMovie will import AVCHD direct from the camera, or the SD card, without you having to drill down through the card's file structure. The imported video will be converted to .mov.

If you want to use Lightworks, you could then transfer the video file from the iMovie Library file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top