3
3
I had a ffmpeg command that would successfully remux an mkv to a iTunes compatible mp4. However it only took the first audio stream regardless of language. I want to remux all audio streams, or at the very least the english stream. I also need to retain 5.1.
Here's what I have so far:
ffmpeg -i "input.mkv" -y -f mp4 -vcodec copy -acodec libvo_aacenc -ac 6 "output.mp4"
Which throws the following error:
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
Here's the complete output:
C:\Program Files\ffmpeg\bin>"C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i "E:\movies\A film.mkv" -y -f mp4 -vcodec copy -acodec libvo_aacenc -ac 6 "E:\iTunes\Automatically Add to iTunes\A film.mp4"
ffmpeg version N-47062-g26c531c Copyright (c) 2000-2012 the FFmpeg developers
built on Nov 25 2012 12:21:26 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runtime-cpudetect --enab
le-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libop
encore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libop
enjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheo
ra --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-lib
vpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 9.100 / 52. 9.100
libavcodec 54. 77.100 / 54. 77.100
libavformat 54. 37.100 / 54. 37.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 23.102 / 3. 23.102
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 17.101 / 0. 17.101
libpostproc 52. 2.100 / 52. 2.100
Input #0, matroska,webm, from 'E:\movies\Pitch Perfect.mkv':
Duration: 01:52:07.11, start: 0.000000, bitrate: 9765 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1040, SAR 1:1 DAR 24:13, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
Stream #0:2(eng): Subtitle: subrip
[libvo_aacenc @ 037dfb00] Unable to set encoding parameters
Output #0, mp4, to 'E:\iTunes\Automatically Add to iTunes\Pitch Perfect.mp4':
Stream #0:0(eng): Video: h264, yuv420p, 1920x1040 [SAR 1:1 DAR 24:13], q=2-31, 23.98fps, 90k tbn, 1k tbc (default)
Stream #0:1(eng): Audio: aac, 48000 Hz, 5.1, s16, 128 kb/s (default)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (dca -> libvo_aacenc)
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
Yeah, try
libfaac
instead oflibvo_aacenc
and see if that works. If not, please [edit] your question and add that code as well. Please include the code here on-site if possible. Don't worry if it's a little long. – slhck – 2013-01-01T14:27:23.503Hi there, thanks for the tips. You can find the full uncut command here http://pastebin.com/RAraHr7h. I don't actually have an example file with multiple streams, I was just hoping to get this working until I happen upon one to test with.
– Simon Stevens – 2013-01-01T14:28:14.523Did you try
libfaac
instead? As for mapping multiple streams to one output, FFmpeg should do that automatically, if not try adding-map 0
to the options. – slhck – 2013-01-01T19:57:50.980