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
-
-
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:
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. -
@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)…For DVD, iPad, HD, connected TV, … iMovie & FCPX? MovieConverter-Studio 3 (01/24/2015) - Handle your camcorder's videos? even in 60p or 60i? do a slow-motion? MovieCam. -
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:
Code:-vpre hq
Code:$ ffmpeg -i video.mkv -vcodec copy -acodec copy video.mp4
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: https://forum.videohelp.com/topic374557.html
Similar Threads
-
mencoder x264 vs libavcodec for h.264 encoding
By chconnor in forum Video ConversionReplies: 0Last Post: 2nd Mar 2011, 15:31 -
Empty audio files when converting MPEG2 with h.264 mencoder or h.264 x264
By doctormelodious in forum ffmpegX general discussionReplies: 3Last Post: 4th Jul 2010, 08:12 -
I can't figure out how to use the h.264 (x264) codec!
By Tahlos in forum Newbie / General discussionsReplies: 9Last Post: 15th Jun 2010, 18:34 -
X264 or H.264
By user123456 in forum Newbie / General discussionsReplies: 9Last Post: 25th May 2009, 16:21 -
HDTV(H.264) to x264
By kornhulio in forum DVB / IPTVReplies: 30Last Post: 4th Jan 2008, 16:37