PDA

View Full Version : [ubuntu] installing ffmpeg and make it work with x264



kakarala
April 8th, 2009, 06:38 PM
hi
I am trying to install ffmpeg and encode using x264.I installed x264 first and i downloaded ffmpeg and configured and when make command is given it gives following error

libavcodec/x86/dsputil_mmx.c: In function ‘transpose4x4’:
libavcodec/x86/dsputil_mmx.c:699: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
libavcodec/x86/dsputil_mmx.c:699: error: ‘asm’ operand has impossible constraints
make: *** [libavcodec/x86/dsputil_mmx.o] Error 1

FakeOutdoorsman
April 8th, 2009, 07:02 PM
These tutorials may be of use. The first one explains how to compile FFmpeg and x264, and the second explains how to enable restricted encoders in FFmpeg from the repository.

HOWTO: Install and use the latest FFmpeg and x264 (http://ubuntuforums.org/showthread.php?t=786095)

HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)

kakarala
April 9th, 2009, 08:43 PM
i installed using the tutorial and it gives same error after configuring

after downloading i configured using the command

./configure --enable-gpl --enable-libx264 --enable-swscale --enable-debug --disable-optimizations --disable-stripping

after when i am installing it gives same error

FakeOutdoorsman
April 10th, 2009, 12:54 AM
i installed using the tutorial and it gives same error after configuring

after downloading i configured using the command


./configure --enable-gpl --enable-libx264 --enable-swscale --enable-debug --disable-optimizations --disable-stripping

after when i am installing it gives same error

The option --enable-swscale is depreciated with the recent SVN, so it is no longer a valid option. The --disable-optimizations option is your troublemaker I think, but I have no experience with it. Ask on the #ffmpeg IRC channel or on the ffmpeg-user mailing list (http://ffmpeg.org/contact.html). You could also just not use that option. Why do you want to disable optimizations?

kakarala
April 10th, 2009, 08:25 PM
thanx for help i removed both the commands and it worked properly

but i captured the video from webcam and saved as local file.when i am trying to play using ffplay it gives error saying

The program 'ffplay' is currently not installed. You can install it by typing:
sudo apt-get install ffmpeg
bash: ffplay: command not found

FakeOutdoorsman
April 10th, 2009, 08:33 PM
You missed the "Optional Dependencies" section in the guide:

libsdl1.2-dev: Required for FFplay, a simple media player using the FFmpeg libraries and the SDL library.
You will need to install this package and then uninstall FFmpeg, make distclean, reconfigure FFmpeg, and then finally reinstall FFmpeg. Refer to the "Updating Your Installation" section of the guide. I also suggest using the provided FFmpeg configuration options shown in the guide for better usability.

kakarala
April 10th, 2009, 09:47 PM
thanx for help i am able to encode and decode the video but can we encode and play the video at same time for the webcam

FakeOutdoorsman
April 10th, 2009, 10:05 PM
Yes, if you use a suitable output such as mpg. I think you would have to wait for everything to encode first if you're using libx264. I was able to simultaneously encode to mpg and play that output with FFplay.