Discussion:
[Ffmpeg-user] Could not find codec parameters (Audio mp1) errors
Brad Allison
2008-05-05 14:01:42 UTC
Permalink
I have a .mkv file. I used mkvextract to extract the video and audio streams.
When I try to use ffmpeg to convert them to a avi container, ffmpeg
bombs with a
"Could not find codec parameters" error:


$ file temp_video.m4v
temp_video.m4v: JVT NAL sequence, H.264 video @ L 51

$ file temp_audio.mp3
temp_audio.mp3: MPEG ADTS, layer III, v1, 112 kBits, 44.1 kHz, JntStereo

$ ffmpeg -i temp_audio.mp3 -i temp_video.m4v -vcodec copy foobar.avi
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-libvorbis --enable-libtheora
--enable-libogg --enable-libgsm --enable-dc1394 --disable-debug
--enable-libmp3lame --enable-libfaadbin --enable-libfaad
--enable-libfaac --enable-xvid --enable-x264 --enable-liba52
--enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Dec 20 2007 21:25:50, gcc: 4.1.3 20070929 (prerelease)
(Ubuntu 4.1.2-16ubuntu2)
Input #0, mp3, from 'temp_audio.mp3':
Duration: 00:42:32.3, start: 0.000000, bitrate: 112 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, stereo, 112 kb/s
[mp3 @ 0xb7edb610]Could not find codec parameters (Audio: mp1, 144 kb/s)
temp_video.m4v: could not find codec parameters
Yohann Martineau
2008-05-05 14:34:58 UTC
Permalink
Post by Brad Allison
I have a .mkv file. I used mkvextract to extract the video and audio streams.
When I try to use ffmpeg to convert them to a avi container, ffmpeg
bombs with a
$ file temp_video.m4v
$ file temp_audio.mp3
temp_audio.mp3: MPEG ADTS, layer III, v1, 112 kBits, 44.1 kHz, JntStereo
$ ffmpeg -i temp_audio.mp3 -i temp_video.m4v -vcodec copy foobar.avi
Maybe you should specify a map here ? because if you don't, how can ffmpeg
know where to find audio and video. I know, it should understand directly
that mp3 is just audio and m4v only video, but maybe it could help to add an
explicit map with parameter -map.

This is just a suggestion.
Brad Allison
2008-05-05 14:50:57 UTC
Permalink
Example please?

-map 0:0 -map 1:1 ?? Not sure how that helps.
Brad Allison
2008-05-05 14:58:30 UTC
Permalink
The problem at it's most basic is that ffmpeg does not know how to recognize
a avc/h.264 format file.

When I extract the streams from my .mkv using mkvextract I get these two
streams:

Extracting track 1 with the CodecID 'V_MPEG4/ISO/AVC' to the file
'temp_video.m4v'. Container format: AVC/h.264 elementary stream
Extracting track 2 with the CodecID 'A_MPEG/L3' to the file
'temp_audio.mp3'. Container format: MPEG-1 Audio Layer 2/3
progress: 100%


Then when I get ffmpeg to read them it recognizes the .mp3 no problem. But
for the .m4v file it errors:

$ ffmpeg -i temp_video.m4v
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg
--enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame
--enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid
--enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb
--enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Dec 20 2007 21:25:50, gcc: 4.1.3 20070929 (prerelease) (Ubuntu
4.1.2-16ubuntu2)
[mp3 @ 0xb7f11610]Could not find codec parameters (Audio: mp2, 48 kb/s)
temp_video.m4v: could not find codec parameters
Yohann Martineau
2008-05-05 15:57:09 UTC
Permalink
Post by Brad Allison
The problem at it's most basic is that ffmpeg does not know how to recognize
a avc/h.264 format file
ok, but please avoid top posting.

$ ffmpeg.exe -formats | grep Matr
[...]
DE matroska Matroska File Format

Why don't you use ffmpeg directly to open your mkv file ? It seems that
ffmpeg supports matroska format.
If a ffmpeg -i myoriginalfile.mkv gives an error, please give the output
message.
Post by Brad Allison
When I extract the streams from my .mkv using mkvextract I get these two
Extracting track 1 with the CodecID 'V_MPEG4/ISO/AVC' to the file
'temp_video.m4v'. Container format: AVC/h.264 elementary stream
Extracting track 2 with the CodecID 'A_MPEG/L3' to the file
'temp_audio.mp3'. Container format: MPEG-1 Audio Layer 2/3
progress: 100%
Then when I get ffmpeg to read them it recognizes the .mp3 no problem.
But
$ ffmpeg -i temp_video.m4v
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg
--enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame
--enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid
--enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb
--enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Dec 20 2007 21:25:50, gcc: 4.1.3 20070929 (prerelease) (Ubuntu
4.1.2-16ubuntu2)
temp_video.m4v: could not find codec parameters
there are probably parameters in the original file giving codec parameters.
And if you drop them using mkvextract, you may have to specify them manually
at ffmpeg input.

Continue reading on narkive:
Loading...