Use ffmpeg to convert XVID avi to AIC for import into iMovie?

1

I have some old video files with AVI extension that I would like to import into iMovie but iMovie doesn't recognize them. So I want to convert them using ffmpeg. I figured AIC was probably the best output format but don't really care so long as the quality is roughly preserved. What is the best way to do this with ffmpeg? The current info is as follows:

Input #0, avi, from 'VID00025.AVI':
  Duration: 00:01:45.00, start: 0.000000, bitrate: 4798 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 4611 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: adpcm_ms ([2][0][0][0] / 0x0002), 44100 Hz, 1 channels, s16, 176 kb/s

I also have some MPEG-1 files that I need to do something similar with:

Input #0, mpeg, from 'MOV00034.MPG':
  Duration: 00:00:25.16, start: 0.110000, bitrate: 2914 kb/s
    Stream #0:0[0x1c0]: Audio: mp2, 32000 Hz, mono, s16p, 64 kb/s
    Stream #0:1[0x1e0]: Video: mpeg1video, yuv420p(tv), 640x480 [SAR 1:1 DAR 4:3], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc

Thanks

Dave Griffiths

Posted 2016-11-09T14:10:47.107

Reputation: 111

Answers

2

ffmpeg can only decode AIC, but a recent iMovie version will accept ProRes*:

ffmpeg -i input -c:v prores -c:a pcm_s16le output.mov

You could also try re-muxing the original input into MOV container:

ffmpeg -i input -c copy output.mov

This will be faster than re-encoding to ProRes, but it won't work in iMovie for all inputs (doubtful mpeg1video will), and iMovie may re-encode it anyway.

* I'm unsure if iMovie will automatically re-encode it to some other format.

llogan

Posted 2016-11-09T14:10:47.107

Reputation: 31 929

Ok thanks. I ended up doing this: ffmpeg -hide_banner -i in.AVI -c:v libx264 -c:a aac -b:a 128k -preset slow -crf 18 out.mp4 – Dave Griffiths – 2016-12-04T16:27:47.050

Second option, ffmpeg -i input -c copy output.mov, worked perfectly to get a video to work with iMovie 10. – Jason Clark – 2019-04-27T01:02:39.220