ffmpegX Tip – Codec type mismatch
ffmpegX is one of the most useful tools in a content producer’s arsenal. It’s fast, easy, and powerful beyond belief. Unfortunately, it has the occasional error that may make you scream! When a client needs a video in a certain format and you are getting error messages, it isn’t fun.
One such error that I frequently encounter (especially when converting files to Flash Video) is this one:
Codec type mismatch for mapping #0.0 -> #0.0
See, normally video comes before audio in the layout and organization of a multimedia file. Sometimes though (and it’s happening more frequently), codec creators are switching things up for a bit of fun. They’re putting the audio first. I can only assume it’s somehow related to compression – but this switch causes ffmpegX to freak out and cease encoding.
Luckily, this is a one check-box fix. Simply open your file and navigate to the audio tab. Then check the box titled “Invert Mapping”. This will let ffmpegX know about the alternate structure of your file, and make the appropriate changes.
Below is a screenshot that highlights the audio tab with Invert Mapping selected.
Traditional FFmpeg, for *NIX platforms, offers this feature as well, albeit in a more complex manner. From the official documentation:
You can encode to several formats at the same time and define a mapping from input stream to output streams:
ffmpeg -i /tmp/a.wav -ab 64k /tmp/a.mp2 -ab 128k /tmp/b.mp2 -map 0:0 -map 0:0Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. ‘-map file:index’ specifies which input stream is used for each output stream, in the order of the definition of output streams.
Do you have a fix, tip, or trick that you want to share with our readers? Email us, our email address is editor (at( youmakemedia )dot) com.
This tip was crucial in helping me encode flash. thanks a tonne
Hey thanks, this little tip saved me from going crazy! cheers
Tip of the hat. People like you keep the modern world spinning.
Thanks that little piece info made ffmpegx a great tool for grabbing live music from you tube.. converting flv->mp3. Thnaks
Thanks man. Would never have guessed that. Trying to encode Matroska to DVD, this fixed it. Cheers
Thanks for the invert mapping tip. You make my day brighter!
Hey,
I’m trying to convert a wmv format to mp4 format using ffmpegX. I’m using mac os x version 10.4. When I encoded it, it came up with this: Codec type mismatch for mapping #0.0 -> #0.0, so I took your advice above and checked the box but now it says this: Unsupported codec (id=74) for input stream #0.1.
What do I have to do to change it into an mp4?
Thanks
having the same problem as tarini! please help!
tarini and alice:
From what I’ve been able to find out wmv is only partially supported by ffmpegx and that’s why it’s saying the codec isn’t supported. It looks like we’ll have to wait for the developers to include better support.
That’s my understanding, at least. Maybe Chris will chime in later and clarify.
WMV is a wonky codec. VLC only JUST started supporting it, if that says anything. My suggestion? Spend $20 and buy VisualHub. I’ll be writing a review soon.
Aaargh! Why didn’t I search for this last night, instead of staying up until 6am banging my head against the desk…
Thank you!
Hey thanks. This is a great tip. Saved me a lot of time. Audio before video? Since when? Grrr.
Thank you so much! So simple!!!
Thank you so much! I really was starting to go crazy!
You’re a life saver!
Thanks! You save me lots of time.
this problem was doing my head in…. thanks for the tip… worked a treat!!
OMG!!! THANKS for this TIPS!!!! it had saved my LIFE!!!! thank you so much
(also..just something totally irrelevant, you posted this entry on my birthday!!! woohoo! more happy!! :D)
thanks! cripes!
Another thumbs up! Much appreciated… Thanks.
hi it works for me too, at least now i’ve got a readeble .mov file… but…. video is scattering…
any hint? I’m trying to convert .VOB –> .MOV
tx!!
jo
you rock. seriously
All I can say is thank you very, very much! I’ve been running into this problem every now and then and could never figure it out. This did the trick.
Let me echo the thanks here. Heavens bless the internets.
thanks a lot
Great fix. THANK YOU THANK YOU!!!
so helpful dude!!
thanks a million!
Thanks! Saved my ass as well. This article is indespensible!
Hi, thanks a million!!!!! I got that error like million times.
Only one problem though, now that it does convert .mov to .flv the video in the resulting file is stumbling. Why could this be? What could I do to fix it, HELP PLEASE?
Thanks so much! Trying to encode to FLV was driving me crazy!
Very useful tip, I already thought, there was nothing I could do, thx!
the sample image is not visible anymore, above:
Below is a screenshot that highlights the audio tab with Invert Mapping selected.
**************** missing image *********************
Traditional FFmpeg….
i find it “conspirational” that flash video conversion produces this error, i am using 0.0.9y
This tip saved me a ton of time, Thank you very very much!
ray, thanks for alerting me. It took me a few months (ack!) but I finally got a replacement image uploaded.
Glad this tip continues to be useful!
Thanks for the tip man I was freaking out before this.
Thanks a lot !
A “thank you very much” for the first time in 2011!
Thank you!!
Thanks Chris! Saved me a ton of time!!
thanks fantastic!! going crazy for a while and solved in one second!
Thank you. Very clear and helpful.