[Libav-user] How to compile dev from source

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Libav-user] How to compile dev from source

Peter Kroon
Hello,

I've managed to compile ffmpeg successfully with these instructions: https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
However, the dev packages are not present. How do I compile/add the dev packages?

Regards,
Peter

_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Lou
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to compile dev from source

Lou
On Thu, Jul 20, 2017, at 06:20 AM, Peter Kroon wrote:
> Hello,
>
> I've managed to compile ffmpeg successfully with these instructions:
> https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
> However, the dev packages are not present. How do I compile/add the dev
> packages?

What do you mean by, "the dev packages"?
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to compile dev from source

jing zhang
The header files and libraries will be installed.

2017-07-23 1:58 GMT+08:00 Lou <[hidden email]>:
On Thu, Jul 20, 2017, at 06:20 AM, Peter Kroon wrote:
> Hello,
>
> I've managed to compile ffmpeg successfully with these instructions:
> https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
> However, the dev packages are not present. How do I compile/add the dev
> packages?

What do you mean by, "the dev packages"?
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to compile dev from source

Peter Kroon
I mean by "the dev packages" the header files and libraries.
But they are not installed when compiled from source.
I've tried CentOS and FreeBSD. On both OS the header files and libraries are not found.

2017-07-24 4:14 GMT+02:00 jing zhang <[hidden email]>:
The header files and libraries will be installed.

2017-07-23 1:58 GMT+08:00 Lou <[hidden email]>:
On Thu, Jul 20, 2017, at 06:20 AM, Peter Kroon wrote:
> Hello,
>
> I've managed to compile ffmpeg successfully with these instructions:
> https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
> However, the dev packages are not present. How do I compile/add the dev
> packages?

What do you mean by, "the dev packages"?
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user



_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to compile dev from source

Peter Kroon
e.g. the program below will not compile

// gcc -g test.c -o test -W -Wall -Wextra -Werror -pedantic -lavcodec -lavformat -lavutil

#include <stdio.h>
#include <stdlib.h>
#include <libavutil/imgutils.h>
#include <libavutil/samplefmt.h>
#include <libavutil/timestamp.h>
#include <libavformat/avformat.h>

int main()
{
 av_register_all();
 printf("The echo..n\");
 return 0;
}


The program will copile when I install ffmpeg on FreeBSD with pkg install ffmpeg.

2017-07-24 9:16 GMT+02:00 Peter Kroon <[hidden email]>:
I mean by "the dev packages" the header files and libraries.
But they are not installed when compiled from source.
I've tried CentOS and FreeBSD. On both OS the header files and libraries are not found.

2017-07-24 4:14 GMT+02:00 jing zhang <[hidden email]>:
The header files and libraries will be installed.

2017-07-23 1:58 GMT+08:00 Lou <[hidden email]>:
On Thu, Jul 20, 2017, at 06:20 AM, Peter Kroon wrote:
> Hello,
>
> I've managed to compile ffmpeg successfully with these instructions:
> https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
> However, the dev packages are not present. How do I compile/add the dev
> packages?

What do you mean by, "the dev packages"?
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user




_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to compile dev from source

Nicolas George
Le sextidi 6 thermidor, an CCXXV, Peter Kroon a écrit :
> e.g. the program below will not compile
>
> // gcc -g test.c -o test -W -Wall -Wextra -Werror -pedantic -lavcodec
> -lavformat -lavutil

Without knowing how exactly you installed FFmpeg and the compiler's
output, I can only guess that the paths for includes and libraries (-I
and -L) are not correct.

Also, I hope you realize that this command-line tells gcc to adhere to a
language that was already obsolete in the last century.

> 2017-07-24 9:16 GMT+02:00 Peter Kroon <[hidden email]>:

Please do not top-post on these mailing-lists. If you do not know what
it means, look it up.

Regards,

--
  Nicolas George

_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user

signature.asc (849 bytes) Download Attachment
Lou
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to compile dev from source

Lou
In reply to this post by Peter Kroon
On Sun, Jul 23, 2017, at 11:16 PM, Peter Kroon wrote:
> I mean by "the dev packages" the header files and libraries.
> But they are not installed when compiled from source.
> I've tried CentOS and FreeBSD. On both OS the header files and libraries
> are not found.

Using that guide "installs" these files to ~/ffmpeg_build. It does it
this way to avoid installing anything to any system directories (and
most users just want the resulting ffmpeg binary anyway). Point your
compiler to that directory, or if desired you can install the files
wherever you want (such as /usr/local/ where I'm assuming you were
assuming they would be).

$ cd ~/ffmpeg_sources/ffmpeg
$ make distclean
$ ./configure
$ make
# make install
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to compile dev from source

Peter Kroon
In reply to this post by Nicolas George
Hello,

AS mentiond in the first post I used this install guide for CentOS: https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
I followed the path/steps written in the article.

First I've added --enable-shared to the configure command. This did not gave the result I was looking for.
--disable-static and  --enable-shared were needed.
This allowed me to compile the program below with gcc -g test.c -o test -W -Wall -Wextra -Werror -pedantic

=================================================================
#include <stdio.h>
#include <stdlib.h>
#include <libavutil/imgutils.h>
#include <libavutil/samplefmt.h>
#include <libavutil/timestamp.h>
#include <libavformat/avformat.h>
int main()
{
 printf("The echo..n\");
 return 0;
}
=================================================================

However, when I added av_register_all(); the program would not compile.
To solve this I ran the code below in console.

=================================================================
C_INCLUDE_PATH=/root/ffmpeg_build/include
export C_INCLUDE_PATH
#debug
echo $C_INCLUDE_PATH
LIBRARY_PATH=/root/ffmpeg_build/lib
export LIBRARY_PATH
#debug
echo $LIBRARY_PATH
LD_LIBRARY_PATH=/root/ffmpeg_build/lib
export LD_LIBRARY_PATH
#debug
echo $LD_LIBRARY_PATH
=================================================================

Now add av_register_all(); above the printf and I was able to compile the program with:
gcc -g test.c -o test -W -Wall -Wextra -Werror -pedantic -lavcodec -lavformat -lavutil

And the example programs compiled as well.

2017-07-24 10:10 GMT+02:00 Nicolas George <[hidden email]>:
Le sextidi 6 thermidor, an CCXXV, Peter Kroon a écrit :
> e.g. the program below will not compile
>
> // gcc -g test.c -o test -W -Wall -Wextra -Werror -pedantic -lavcodec
> -lavformat -lavutil

Without knowing how exactly you installed FFmpeg and the compiler's
output, I can only guess that the paths for includes and libraries (-I
and -L) are not correct.

Also, I hope you realize that this command-line tells gcc to adhere to a
language that was already obsolete in the last century.

> 2017-07-24 9:16 GMT+02:00 Peter Kroon <[hidden email]>:

Please do not top-post on these mailing-lists. If you do not know what
it means, look it up.

Regards,

--
  Nicolas George

_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user



_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Loading...