Forum Archive Home -> Mac -> x264 doesn't encode h.264
x264 doesn't encode h.264 | ||||||||||
| thuriel posted 2009 Oct 16 06:46 | ||||||||||
| 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 example
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 the
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 :/ | ||||||||||
| rumplestiltskin posted 2009 Oct 16 10:00 | ||||||||||
| 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). | ||||||||||
| thuriel posted 2009 Oct 16 10:39 | ||||||||||
| 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 :/ | ||||||||||
| rumplestiltskin posted 2009 Oct 16 10:52 | ||||||||||
| 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. | ||||||||||
| thuriel posted 2009 Oct 16 12:43 | ||||||||||
| 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 :/ But! The compatibility version as well as the current version looks interesting for libx264 o_O | ||||||||||
| rumplestiltskin posted 2009 Oct 16 13:22 | ||||||||||
| You're now going down such a technical route that the adhesive tape holding my glasses together has fallen off.
*grin* :D I'll have to defer to others who may understand this techno-babble better than I. | ||||||||||
| houdini2 posted 2009 Oct 16 13:53 | ||||||||||
| Add --arch=x86_64 in ./configure
houdini :wink: | ||||||||||
| thuriel posted 2009 Oct 16 18:07 | ||||||||||
| @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 :\ | ||||||||||
| Herve posted 2009 Oct 19 04:31 | ||||||||||
| 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)… | ||||||||||
| thuriel posted 2009 Oct 20 14:09 | ||||||||||
| 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:
but, what I get is a similar error message to the above one:
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/Comparison_of_container_formats). So I expect ffmpeg to be aware of that and fulfill my wish! :D 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 |
Login/Register to our forum to be able to post here.
