Dear Domingos,<div><br><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Thank you for your instruction. With your suggestion, my problem was solved. I think the key point is the compiling should be conducted in the root account.<div>
<br></div><div>Jun-Horng Chen</div></span>
<br><br><div class="gmail_quote">2011/6/15 Diego Carvalho Domingos <span dir="ltr"><<a href="mailto:diego.cdomingos2010@gmail.com">diego.cdomingos2010@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I had a lot of problems to compile codes that uses ffmpeg...After a<br>
lot of attempts and search on the internet I created a script to do<br>
the job, installing from the source (git repository). I don't know if<br>
it is the best way (there are a lot of options to configure ffmpeg, I<br>
just enabled the building of both static and dinamic libraries and<br>
support for libx264). The script installs libx264, if you don't want<br>
it just remove the lines of its installation.<br>
<br>
#!/bin/bash<br>
#script to install/update x264 and ffmpeg<br>
#must run as root<br>
<br>
#installing dependencies<br>
apt-get install git-core yasm<br>
<br>
cd /usr/local/src<br>
<br>
#uninstalling previous installation<br>
installed=0<br>
if [ -d "x264" ]; then<br>
        echo "uninstalling x264"<br>
        cd x264<br>
        make uninstall<br>
        make distclean<br>
        cd ..<br>
        rm -R x264<br>
        installed=1<br>
fi<br>
<br>
if [ -d "ffmpeg" ]; then<br>
        echo "uninstalling ffmpeg"<br>
        cd ffmpeg<br>
        make uninstall<br>
        make distclean<br>
        cd ..<br>
        rm -R ffmpeg<br>
        installed=1<br>
fi<br>
<br>
if [ $installed -eq 1 ]; then<br>
        echo "x264 and ffmpeg uninstalled"<br>
else<br>
        echo "x264 and ffmpeg were not installed"<br>
fi<br>
<br>
#installing x264<br>
git clone git://<a href="http://git.videolan.org/x264.git" target="_blank">git.videolan.org/x264.git</a><br>
cd x264<br>
./configure --enable-static --enable-shared<br>
make<br>
make install<br>
cd ..<br>
<br>
#installing ffmpeg<br>
git clone git://<a href="http://git.videolan.org/ffmpeg" target="_blank">git.videolan.org/ffmpeg</a><br>
cd ffmpeg<br>
./configure --enable-shared --enable-gpl --enable-version3<br>
--enable-nonfree --enable-libx264<br>
make<br>
make install<br>
cd ..<br>
<br>
ldconfig<br>
echo "Installation Completed"<br>
<br>
I hope it helps you.<br>
<br>
2011/6/14 JunHorng <<a href="mailto:junhorng@gmail.com">junhorng@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Thank you for your reply. I have done what you said, but the error message:<br>
> undefined reference to `avcodec_decode_video2'<br>
> is still shown. Besides, a warning message:<br>
> ‘dump_format’ is deprecated<br>
><br>
> is also shown. Would you please advice me how you compile FFmpeg in    the<br>
> Ubuntu system?<br>
> Best regards,<br>
> Jun-Horng Chen<br>
><br>
><br>
> 2011/6/13 Gustav González <<a href="mailto:xtingray@gmail.com">xtingray@gmail.com</a>><br>
>><br>
>> Did you try?:<br>
>><br>
>> % sudo apt-get install libavcodec-dev libavcodec52<br>
>> % sudo apt-get install libavformat-dev libavformat52<br>
>> % sudo apt-get install libavutil-dev libavutil50<br>
>><br>
>> 2011/6/12 JunHorng <<a href="mailto:junhorng@gmail.com">junhorng@gmail.com</a>>:<br>
>> > Hello,<br>
>> > Following the<br>
>> ><br>
>> > instruction: <a href="http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289" target="_blank">http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289</a> ,<br>
>> > I have installed the   FFmpeg libraries in my Ubuntu system. At the<br>
>> > beginning, it seems to be fine. When I tested the libraries with the<br>
>> > example<br>
>> > program : "libavcodec/api-example.c", an error message :<br>
>> > undefined reference to `avcodec_decode_video2'<br>
>> > will be shown in the project building process.<br>
>> > Does that mean what I installed is an old version of FFmpeg?<br>
>> > I am appreciated for any help.<br>
>> > JunHorng<br>
>> > _______________________________________________<br>
>> > Libav-user mailing list<br>
>> > <a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
>> > <a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> ============================<br>
>>   Gustav Gonzalez<br>
>>   <a href="mailto:xtingray@gmail.com">xtingray@gmail.com</a><br>
>> ============================<br>
>> _______________________________________________<br>
>> Libav-user mailing list<br>
>> <a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
>> <a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
><br>
><br>
> _______________________________________________<br>
> Libav-user mailing list<br>
> <a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
> <a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
><br>
><br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</div></div></blockquote></div><br></div>