Page 1 of 1

MTS clips and no sound? I fixed it with ffmpeg

PostPosted: Tue Jul 18, 2017 6:59 am
by Pedro Dias
Long story short, my sony HDR-GW55 camera records sound in AC3 format, which Resolve doesen't take.

I wanted a batch way of converting all my videos, without sacrificing image quality and hopefully not audio quality either. I ended up installing FFMPEG in order to write the following windows batch script:

Code: Select all
@echo off
cls
set outputfolder="%CD%\MOV"
if not exist %outputfolder% (mkdir %outputfolder%) ELSE (echo Outputfolder found)

echo starting conversion..

setlocal enabledelayedexpansion
for %%a in ("*.MTS") do (   
    echo  Converting %%~na.MTS into "%CD%\MOV\%%~na.MOV"
    "F:\Program Files (x86)\FFmpeg for Audacity\ffmpeg.exe" -i %%~na.MTS -vcodec copy -ab 256000 -f mov "%CD%\MOV\%%~na.MOV" -y
)


I saved this code as MTS2MOV.BAT in my folder "C:\bat" and added it to the PATH in system environments.

The cool trick here is that the video is not converted in any form, only the audio. As I record with a separate audio source, I will only use the audio from the clips to sync up the audio tracks, but still, the conversion does a decent job. For more advanced fiddling with audio, I'll drag the video clips onto Audacity and do noise reduction, normalization, compression and so on when needed.

To run it, simply open a CMD window, change your CD to the folder containing your MTS files, and type the MTS2BAT command followed by ENTER.

It will create a subfolder named MOV where all the converted files are. Hope this helps someone, it sure did it for me.

Re: MTS clips and no sound? I fixed it with ffmpeg

PostPosted: Tue Jul 18, 2017 8:17 am
by Al Spaeth
Thanks Pedro - As sophisticated as Resolve is, I can't believe they haven't added support for more camera and output formats which has been the greatest limitation in product reviews since 12.0.

Re: MTS clips and no sound? I fixed it with ffmpeg

PostPosted: Tue Jul 18, 2017 9:41 am
by Uli Plank
They could add this in the studio version, but AC-3 in the free version would cost them licensing.

Re: MTS clips and no sound? I fixed it with ffmpeg

PostPosted: Sun Aug 27, 2017 9:41 pm
by Henry Scullion
I've been searching for a simple solution to this issue with my GH2 footage for a long time, and this works for me...

Elegant, simple, fast solution Pedro. Great work!

It clears the way for me to move from Premiere to Resolve for my grading and editing.

Re: MTS clips and no sound? I fixed it with ffmpeg

PostPosted: Sat Jul 14, 2018 8:22 am
by Thomas Douqué
So, this is like, absolutely fabulous!!!

Thanks a ton.

If you have a donation link of some sorts, I can give you a small contribution of some sorts?

Re: MTS clips and no sound? I fixed it with ffmpeg

PostPosted: Sat Jul 14, 2018 7:52 pm
by Andrew Kolakowski
This:
Code: Select all
... -ab 256000 -f mov "%CD%\MOV\%%~na.MOV" -y

is doing AAC audio, which is not really what you want.

Change it to:
Code: Select all
... -c:a pcm_s24le -f mov "%CD%\MOV\%%~na.MOV" -y

to have it converted to PCM 24bit, which is much better for NLEs.