Thanks, Andrew, although I borrowed the date structure from your guide and the idea came from Ng some posts ago.
Thanks, Andrew, although I borrowed the date structure from your guide and the idea came from Ng some posts ago.
Code:dpkg -S $(readlink -f /usr/local/lib/libavcodec.so.52) dpkg: /usr/local/lib/libavcodec.so.52.3.0 not found.ThanksCode:ffmpeg -y -i input.mkv -pass 1 -b 512k -bt 512k -vcodec libx264 -an -threads 0 -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method dia -subq 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 1 -directpred 1 -bidir_refine 0 -trellis 0 -flags2 -bpyramid-wpred-mixed_refs-dct8x8+fastpskip -f mp4 /dev/null ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init
Call me stupid, but why are you recoding the h264 video again? mp4 containers should be able to take that video as is. I tried your command line and it seemed to work fine on my build:
FFmpeg version SVN-r15970, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-swscale --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libxvid --enable-zlib --enable-libx264 --enable-libvorbis --enable-libtheora --enable-pthreads
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 5. 0 / 52. 5. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Dec 1 2008 10:08:55, gcc: 4.3.2
looking back, if you are running it with this command :
ffmpeg -i $1 -threads 1 -vcodec libx264 -sameq -b 5000k -acodec copy -r 24 output.avi
you might be crashing out for a few reasons.
What is the audio and video in the MKV? .avi might not support the audio you are trying to put in there. Especially since this command shows an .avi file output, and a format of mp4 in the last you posted.
The 2 most common audio formats in MKV are DTS and AC3 .. ac3 is not supported in an MP4 container (but it is in avi) .. FFMpeg is currently unable to transcode ac3 (or dts) to the proper AAC needed for mp4. Also the presence of b frames *really* screw up ffmpeg encoding. This, plus the fact that the channel mapping is usually wrong, caused me to 100% give up on FFMPEG for any mkv transcoding whatsoever.
Last edited by ercdvs; December 3rd, 2008 at 08:07 PM.
Hello,
Thanks for the great tutorial.
I have a very trivial question.
I hope that somebody can help me.
I want to compile, output_example.c in ffmpeg folder to test it and create a .mpg file.
How can I do it?
I've tried using "make" or "gcc", here is my results:
Code:alireza@ubuntu:~/ffmpeg$ make output_example.c make: Nothing to be done for `output_example.c'.Can anybody help me compile this in linux?Code:alireza@ubuntu:~/ffmpeg$ gcc -o output output_example.c /tmp/ccqaXNi3.o: In function `add_audio_stream': output_example.c:(.text+0x15): undefined reference to `av_new_stream' /tmp/ccqaXNi3.o: In function `open_audio': output_example.c:(.text+0xb4): undefined reference to `avcodec_find_encoder' output_example.c:(.text+0x100): undefined reference to `avcodec_open' output_example.c:(.text+0x1aa): undefined reference to `av_malloc' output_example.c:(.text+0x221): undefined reference to `av_malloc' /tmp/ccqaXNi3.o: In function `get_audio_frame': output_example.c:(.text+0x24b): undefined reference to `sin' /tmp/ccqaXNi3.o: In function `write_audio_frame': output_example.c:(.text+0x2d9): undefined reference to `av_init_packet' output_example.c:(.text+0x32c): undefined reference to `avcodec_encode_audio' output_example.c:(.text+0x389): undefined reference to `av_rescale_q' output_example.c:(.text+0x3ba): undefined reference to `av_write_frame' /tmp/ccqaXNi3.o: In function `close_audio': output_example.c:(.text+0x409): undefined reference to `avcodec_close' output_example.c:(.text+0x416): undefined reference to `av_free' output_example.c:(.text+0x423): undefined reference to `av_free' /tmp/ccqaXNi3.o: In function `add_video_stream': output_example.c:(.text+0x43e): undefined reference to `av_new_stream' /tmp/ccqaXNi3.o: In function `alloc_picture': output_example.c:(.text+0x58b): undefined reference to `avcodec_alloc_frame' output_example.c:(.text+0x5b6): undefined reference to `avpicture_get_size' output_example.c:(.text+0x5c4): undefined reference to `av_malloc' output_example.c:(.text+0x5d8): undefined reference to `av_free' output_example.c:(.text+0x608): undefined reference to `avpicture_fill' /tmp/ccqaXNi3.o: In function `open_video': output_example.c:(.text+0x633): undefined reference to `avcodec_find_encoder' output_example.c:(.text+0x67f): undefined reference to `avcodec_open' output_example.c:(.text+0x6e5): undefined reference to `av_malloc' /tmp/ccqaXNi3.o: In function `write_video_frame': output_example.c:(.text+0x95b): undefined reference to `sws_getContext' output_example.c:(.text+0xa12): undefined reference to `sws_scale' output_example.c:(.text+0xa5b): undefined reference to `av_init_packet' output_example.c:(.text+0xa8d): undefined reference to `av_write_frame' output_example.c:(.text+0xabd): undefined reference to `avcodec_encode_video' output_example.c:(.text+0xad5): undefined reference to `av_init_packet' output_example.c:(.text+0xb2f): undefined reference to `av_rescale_q' output_example.c:(.text+0xb76): undefined reference to `av_write_frame' /tmp/ccqaXNi3.o: In function `close_video': output_example.c:(.text+0xbe2): undefined reference to `avcodec_close' output_example.c:(.text+0xbf1): undefined reference to `av_free' output_example.c:(.text+0xbfe): undefined reference to `av_free' output_example.c:(.text+0xc16): undefined reference to `av_free' output_example.c:(.text+0xc23): undefined reference to `av_free' output_example.c:(.text+0xc30): undefined reference to `av_free' /tmp/ccqaXNi3.o: In function `main': output_example.c:(.text+0xc4b): undefined reference to `av_register_all' output_example.c:(.text+0xca0): undefined reference to `guess_format' output_example.c:(.text+0xcd1): undefined reference to `guess_format' output_example.c:(.text+0xd10): undefined reference to `av_alloc_format_context' output_example.c:(.text+0xddd): undefined reference to `av_set_parameters' output_example.c:(.text+0xe34): undefined reference to `dump_format' output_example.c:(.text+0xe8e): undefined reference to `url_fopen' output_example.c:(.text+0xec6): undefined reference to `av_write_header' output_example.c:(.text+0x1002): undefined reference to `av_write_trailer' output_example.c:(.text+0x1023): undefined reference to `av_freep' output_example.c:(.text+0x103a): undefined reference to `av_freep' output_example.c:(.text+0x1066): undefined reference to `url_fclose' output_example.c:(.text+0x1071): undefined reference to `av_free' collect2: ld returned 1 exit status
(I am using Ubuntu 8.1)
Thanks.
PS: I have installed all of the ffmpeg material according to the instructions in page 1 successfully
Last edited by akm3; December 7th, 2008 at 01:07 AM. Reason: I edited the post, since last problem was solved, this is a new question
Last edited by FakeOutdoorsman; December 7th, 2008 at 02:28 AM. Reason: added 'cd ~/ffmpeg'
Thank you for your guide! Very nice!
Last edited by psychok9; December 11th, 2008 at 06:18 AM.
Hi all,
Please help me..i have an error after installing ffmpeg.
When i run ffmpeg i got ehis error :
"ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init"
and with : readlink -f /usr/local/lib/libavcodec.so.52
i got : /usr/local/lib/libavcodec.so.52.6.1
i checked and the "libavcodec.so.52.6.1" and "libavcodec.so.52" are there.
Thanks,
ymark
I found the problem. Before compiling ffmpeg i installed mencoder.
i've compiled the latest mencoder.
I've installed a new virtual machine with ubuntu and installed first ffmpeg and after mencoder and both work! with h264 and win32dll enabled.
step 0: change repositoris to main server
step 1: sudo apt-get install subversion
---------------------instaling x264 for ffmpeg
step 2: sudo apt-get install git
step 3: sudo apt-get install git-core
step 4: git clone git://git.videolan.org/x264.git
step 5: sudo sh configure --enable-shared --disable-asm
step 6: sudo make install
---------------------installing FFMPEG from subversion
step 7: svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
step 8: sudo sh configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-shared --enable-libfaac --enable-libfaad --enable-gpl --enable-libtheora --enable-libx264
step 9: cd /etc/ld.so.conf.d
step 10: sudo pico custom-libs.conf
step 11: write "/usr/local/lib" in the file
step 12: sudo ldconfig
---------------------Instaling MENCODER from subversion
step 13: svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
step 14: sudo apt-get install libpng12-dev libjpeg62-dev
step 15: sudo sh configure --enable-win32dll
step 16: sudo make install
step 17: wget http://www.mplayerhq.hu/MPlayer/rele...061022.tar.bz2
step 18: tar xjvf all-20061022.tar.bz2
step 19: sudo mkdir /usr/local/lib/codecs/
step 20: sudo cp /home/linux/mplayer/all-20061022/*.* /usr/local/lib/codecs/
and it works
Bookmarks