Hi!
I already was searching for a solution to this problem. There are many posts all over the internet with the same problem but no solution.
So maybe you could help me.
Whenever I try to use x264 to encode a video with ffmpeg an my Snow Leopard MacBook 1,1 ffmpeg stops and tells me:
The parameters don't seem to affect this. No matter what I do, the error remains. For exampleCode:Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or heightresults in the above error. EvenCode:-vcodec libx264 -b 1024kleads to the error (if the source is H.264/AVC of course).Code:-vcodec copy
I compiled ffmpeg and x264 by my own.
For x264 I used the snapshot of "x264-snapshot-20090926-2245" but even with the latest one (x264-snapshot-20091015-2245) I had the same problems. I had to use theconfigure option.Code:--disable-asm
The version and configure options amoung other information regarding ffmpeg you may see here:
I don't know why it worked on Leopard. I don't know what I did differently back then :/Code:$ ffmpeg -version FFmpeg version SVN-r20028, Copyright (c) 2000-2009 Fabrice Bellard, et al. built on Oct 16 2009 03:31:04 with gcc 4.2.1 (Apple Inc. build 5646) configuration: --enable-pthreads --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-gpl --enable-libxvid --enable-libx264 --enable-nonfree --enable-libfaac --enable-libfaad libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.36. 0 / 52.36. 0 libavformat 52.39. 0 / 52.39. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1 FFmpeg SVN-r20028 libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.36. 0 / 52.36. 0 libavformat 52.39. 0 / 52.39. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1
+ Reply to Thread
Results 1 to 10 of 10
Thread: x264 doesn't encode h.264
Thread
-
I don't suppose you'd want to use the H264 encoding already built in to your Mac? Try MPEG Streamclip, VideoMonkey or even QuickTime Player Pro (7).
Yeah, you're right. Thank you, but I'd like to use ffmpeg (I wrote some scripts that rely on ffmpeg). And what bothers me...it worked before (on Leopard). Did I miss some dependencies (I did a clean install of Snow Leopard)? But I don't remember installing anything else than x264 and ffmpeg to encode H.264 video with ffmpeg on Leopard :/
I think your problem might be with the interaction of SL and ffmpeg. Who knows what Apple may have changed between L & SL? I think you're correct in your installation assumption (nothing extra should be needed).
However, I just noticed that you compiled ffmpeg & x264 yourself. Have you tried using the pre-compiled versions instead? If they work, maybe it's something that went awry in the compiling.
Now I tried the ffmpeg binary from the lates ffmpegX release. That one seems to work though of course linking to its own libs inside the ffmpegX bundle. Not really what I want :/
I discovered, that there is no "libx264.dylib" in /usr/local/lib/ (only the "libx264.a"). Therefore otool returned no dynamic lib for x264.
So! Hoping that was the reason for my problem I recompiled x264 with --enable-shared. Like I expected, it built the .dylib (what seems to be Mac OS X's equivalent to Linux's .so?).
After recompiling ffmpeg as well, otool gives me:
Cool, but doesn't help at all. Same problem :/Code:$ otool -L /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg: /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0) /usr/local/lib/libfaac.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/local/lib/libfaad.2.dylib (compatibility version 3.0.0, current version 3.0.0) /usr/local/lib/libmp3lame.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/local/lib/libtheora.0.dylib (compatibility version 4.0.0, current version 4.10.0) /usr/local/lib/libogg.0.dylib (compatibility version 7.0.0, current version 7.0.0) /usr/local/lib/libvorbisenc.2.dylib (compatibility version 3.0.0, current version 3.6.0) /usr/local/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.3.0) /usr/local/lib/libx264.76.dylib (compatibility version 0.0.0, current version 0.0.0)
But! The compatibility version as well as the current version looks interesting for libx264 o_O
You're now going down such a technical route that the adhesive tape holding my glasses together has fallen off.
*grin*

I'll have to defer to others who may understand this techno-babble better than I.
Add --arch=x86_64 in ./configure
houdini
@rumplestiltskin: *lol* ...but thank you anyway!

@houdini2: I tried this. Same error message :/ ...but as far as I know the CPU in the first generation MacBooks (like mine) is 32bit, so I think the correct configure option is --arch=i386, which is the default :\
my configure command, used for SnowLeopard:
"./configure --enable-postproc --enable-gpl --enable-pthreads --enable-static --disable-shared --enable-gray --enable-avfilter --enable-avfilter-lavf --enable-libx264 --extra-cflags=-m64 --extra-ldflags=-m64 --arch=x86_64"
bye
Edit: oops I didn't see that your processor wasn't 64bit, so -normally- you don't need to specify anything special (32bit is the default behavior)…Some drawings ? http://www.whynotflores.com/. A software for DV, DVD-Video, HD files (AVCHD/…): http://www.movieconverter-studio.com/ 1.6 (2010/08)
Thank you all. I'm a bit confused about all the error messages I get. At least I could find the reason for the error I described above:
Obviously I have to use a preset for encoding with x264 (in Leopard I was able to encode without this). For example:
So, with the preset setting I can encode with x264. But that actually isn't (all) what I want to do, because my source file already is encoded in H.264. Even the audio stream already is encoded in the codec of my choice: AC3. I just want to change the container from MKV to MP4:Code:-vpre hq
but, what I get is a similar error message to the above one:Code:$ ffmpeg -i video.mkv -vcodec copy -acodec copy video.mp4
Does ffmpeg fail in putting AC3 into the MP4 container? I know, initially MP4 did not support AC3 streams, but over a year ago they officially allowed AC3 to be enclosed in an MP4 (see http://en.wikipedia.org/wiki/Compari...tainer_formats). So I expect ffmpeg to be aware of that and fulfill my wish!Code:Could not write header for output file #0 (incorrect codec parameters ?)

Do I have to to specify any parameters to pack AC3 into MP4?
Because this is off topic, I opened another thread: http://forum.videohelp.com/topic374557.html
Similar Threads
-
X264 or H.264
By user123456 in forum Newbie / General discussionsReplies: 9Last Post: 25th May 2009, 17:21 -
HDTV(H.264) to x264
By kornhulio in forum DVB / HDTVReplies: 30Last Post: 4th Jan 2008, 17:37 -
h.264/x264
By CybermatriX in forum Video ConversionReplies: 4Last Post: 21st Dec 2006, 00:29 -
H.264 - Where does one get the listing of all x264.exe 'params' ?
By vhelp in forum Newbie / General discussionsReplies: 8Last Post: 6th Dec 2006, 22:04 -
H.264: mencoder vs. x264
By kaz219 in forum ffmpegX general discussionReplies: 4Last Post: 8th Sep 2006, 07:42
StatisticsNewest guidesLatest tool updatesNew media comments



Quote