[FFmpeg-user] [AVCHD] Join + resize?

David Favor david at davidfavor.com
Fri Nov 2 13:46:15 CET 2012


Gilles wrote:
> Hello
> 
> I'm a video newbie and need to perform on Windows the following tasks
> on two AVCHD files taken with a Sony camcorder:
> 
> 1. Join two files (40mn + 10mn; video = MPEG-4 AVC 1440x1080, 50fps;
> audio = A52 AC3 48KHz 3F2R/LFE)
> 2. Shrink the output for viewing on the web
> 
> I checked the FFmpeg site and googled before asking, but the examples
> are often for Linux and not necessarily for AVCHD.
> 
> I tried the following, but ffmpeg.exe isn't happy:
> 
> ===========================
> C:\>ffmpeg -i myfile.mts -vcodec mpeg4 myfile.mp4
> 
> ffmpeg version N-46146-g11d695d Copyright (c) 2000-2012 the FFmpeg
> developers
> [...]
> [libvo_aacenc @ 03420260] Unable to set encoding parameters
> Output #0, mp4, to 'myfile.mp4':
>     Stream #0:0: Video: mpeg4, yuv420p, 1440x1080 [SAR 4:3 DAR 16:9],
> q=2-31, 20
> 0 kb/s, 90k tbn, 25 tbc
>     Stream #0:1: Audio: aac, 48000 Hz, 5.1(side), s16, 128 kb/s
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 -> mpeg4)
>   Stream #0:1 -> #0:1 (ac3 -> libvo_aacenc)
> Error while opening encoder for output stream #0:1 - maybe incorrect
> parameters
> such as bit_rate, rate, width or height
> ===========================
> 
> If someone's used to working with Sony AVCHD files (on Windows), I'd
> appreciate any help.
> 
> Thank you.

Best to do two separate operations with AVCHD.

1) concatenate the files together.

2) perform other operations (like resize) on the file.

On Win-doze (shudder...) there is no cat command. Instead use
open a shell, cd to where your files are, then do this...

     clip1.mts clip2.mts > final.mts

Trying to do any conversions prior to concatenation usually
create odd video artifacts + desyncing of audio and video
as footage progresses.

As a first transcode experiment for your resize, try this...

     ffmpeg -i final.mts -s 640x480 -codec:v h264 -sameq -codec:a copy final-small.mts

Then switch over to -crf, which usually works as good as multipass
transcoding and is far faster.

-- 
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!


More information about the ffmpeg-user mailing list