PDA

View Full Version : ffmpeg command line for libx264


wiseant
1st October 2007, 06:11
Hi all,

Does anyone know the correct syntax for using ffmpeg versions that use libx264?

I can't seem to get it to work for me.

For ffmpeg versions that use x264, this syntax works:
-vcodec h264 . . .

but with the libx264
-vcodec libx264 . . .
-vcodec h264 . . .
-vcodec x264 . . .

do not work

Incidentally, for mencoder I use:
-ovc lavc -lavcopts vcodec=libx264 . . .

I've looked all over I can't find the answer

TIA

bond
6th October 2007, 13:16
are you sure you compiled ffmpeg with x264?

moved

halsboss
6th October 2007, 16:06
try here http://forum.doom9.org/showthread.php?p=1052608#post1052608

Sorry, I'm "back from a party" so it might or might not be your solution. Sorry it it isn't. Where's that bucket ? And why did the wife lock that bedroom door ? She's a good wife, usually.

J_Darnley
7th October 2007, 13:01
With the build of ffmpeg I have, ffmpeg -formats stated that it should be libx264. As bond suggested, was ffmpeg compiles with x264, to tell this you can just look at the outout of ffmpeg -version and look for the --enable-libx264 switch.

morph166955
9th October 2007, 01:48
if you want to verify this you can do "ldd /path/to/ffmpeg". mine looks like this:

ldd /usr/bin/ffmpeg
libm.so.6 => /lib64/libm.so.6 (0x00002adde8df8000)
libz.so.1 => /lib64/libz.so.1 (0x00002adde8f78000)
liba52.so.0 => /usr/lib64/liba52.so.0 (0x00002adde908e000)
libfaac.so.0 => /usr/lib64/libfaac.so.0 (0x00002adde919a000)
libfaad.so.0 => /usr/lib64/libfaad.so.0 (0x00002adde92ab000)
libmp3lame.so.0 => /usr/lib64/libmp3lame.so.0 (0x00002adde93eb000)
libx264.so.56 => /usr/lib64/libx264.so.56 (0x00002adde956b000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002adde970b000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002adde980f000)
libc.so.6 => /lib64/libc.so.6 (0x00002adde992a000)
/lib64/ld-linux-x86-64.so.2 (0x00002adde8cdd000)


also note, mine isnt compiled with many options since I rarely ever use it.

wiseant
9th October 2007, 04:24
Thanks for all of the replies!

I found out that it is a problem with certain compiles of ffmpeg that do not support SSE2/SSE3 instructions re libxvid and libx264

I have a duo-core Pentium 4 (Prescott)

I found two ways to resolve this:

1. use FFmpeg version SVN-r9017 or SVN-r9079 (xvid, x264/h264)

2. use ffmpeg_bin_pentium4-10629.zip (libxvid, libx264)

"The problem seems to be that when both xvidcore and x264 are linked in the same binary (ffmpeg or mencoder), memory alignment issues start to occur on when using win32 + minGW + SSE2 Optimizations.

We found out why you are having trouble seeing the crashes on your amd. pengvado of x264 says "Certain SSE2 functions are disabled on AMD cpus because they're slower than MMX." which explains why you will see it for sure on Intel machines.

I do have another question:
When if I use mpeg4 codec I use -lavcopts and can use -ilme -ildct -top 1 to get nice interlaced content - I understand that these options do not apply to -libxvid/xvid

Can I use something like -xvidencopts so as to use "xvid" options with ffmpeg to encode with xvid and get interlaced content - I know it works with mencoder

TIA