Comments (6)
Instructions for Ubuntu 20.04, using ffmpeg from master branch on git repo (as of 2021-02-28).
Asuming a "ffmpeg" directory created inside home.
- ffmpeg repo:
cd ~/ffmpeg
git clone https://git.ffmpeg.org/ffmpeg.git repo
cd repo
./configure --enable-gpl --disable-programs
(this may vary, but the point of "disable programs" is to not replace the ffmpeg executable from ubuntu repos: we just need the libs for this tutorial).make
sudo make install
- ffmpeg-libav-tutorial "hello world" compilation:
cd ~/ffmpeg
git clone https://github.com/leandromoreira/ffmpeg-libav-tutorial
cd ffmpeg-libav-tutorial
gcc -g -Wall 0_hello_world.c $(pkg-config --libs libavformat libavcodec libavdevice libavfilter libavutil libswscale libswresample) -lz -o build/hello
from ffmpeg-libav-tutorial.
Hi,
I'm compiling with a different setup (on Ubuntu16 and not from ffmpeg sources) but I had a similar error, so my solution might work for you as well.
I moved all the library parameters after the source file name, like this:
gcc -g -Wall -o build/hello_world 0_hello_world.c -lavformat -lavcodec -lswscale -lavutil -lz
and I could compile successfully.
from ffmpeg-libav-tutorial.
Hi
I use Ubuntu18.04, and ffmpeg-4.0.1 source code, and use
./configure --disable-x86asm --disable-doc --prefix=output
to make, make install
I use
gcc -o build/hello_world -g -Wall 0_hello_world.c -I./include -L./lib -lavformat -lavcodec -lswscale -lavutil -lswresample -lz -lm -lpthread
It could compile well
from ffmpeg-libav-tutorial.
For me, the following worked:
gcc -g -Wall -L/home/vandana/ffmpeg/ /home/vandana/ipdecoder/ffmpeg_custom/transcoding.c /home/vandana/ipdecoder/ffmpeg_custom/video_debugging.c -lavformat -lavcodec -lx264 -lavdevice -lavfilter -lavutil -lswscale -lswresample -lm -lz -lpthread -o /home/vandana/ipdecoder/ffmpeg_custom/build/transcoding
from ffmpeg-libav-tutorial.
I have same errors. How to build with CMakeLists.txt in Clion IDE of intellij?
I add -lavformat -lavcodec -lswscale -lavutil -lz
to target_link_libraries
but the output like /usr/bin/ld: cannot find -lavformat_alloc_context
.
from ffmpeg-libav-tutorial.
I have same errors. How to build with CMakeLists.txt in Clion IDE of intellij?
I add-lavformat -lavcodec -lswscale -lavutil -lz
totarget_link_libraries
but the output like/usr/bin/ld: cannot find -lavformat_alloc_context
.
I solved:
target_link_libraries(avformat avutil)
. Adding other if necessary. I think with lavformat
, I can drop l
characer.
from ffmpeg-libav-tutorial.
Related Issues (20)
- Cannot build Docker image HOT 2
- How to work with rgb values instead of grayscale
- Fix no PTS and delay for realtime streaming
- Misleading tutorial example HOT 3
- Read mp4 DASH from server, decode 16 channel AAC and send to buffer
- A simple question unrelated to this nice tutorial HOT 2
- Unknown decoder 'libx264' HOT 2
- deleted
- 1Gbps means 1 billion bits HOT 1
- fatal error: libavcodec/avcodec.h: No such file or directory HOT 1
- "COM must not be in STA mode\n" HOT 3
- "Broken pipe" on av_interleaved_write_frame when used to stream HOT 2
- ffmpeg
- error in transcoding audio from mp3 to aac HOT 2
- some warnings in 0_hello_world.c
- There is not function named "av_mallocz_array" in the recent ffmpeg library
- avformat_close_input() vs avformat_free_context()
- Compiling on Windows with GCC HOT 1
- define pCodec
- Getting error when running. (Close to the end of the 0-hello-world) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffmpeg-libav-tutorial.