Subtitles in ffmpeg/libavfilter - c

I have a C program to read video/audio with libav/ffmpeg libraries and decode it.
I am playing with some filters and most work just fine. I can draw text, overlay logos, flip and invert video colours. However, I am having big issues overlaying subtitles.
My filter is very simple.
const char *vfilter_descr = "[in]subtitles=subs.srt[out]";
On the console I get this:
[Parsed_subtitles_0 # 0x7fe76c703240] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 2.4.0 (COMPLEX)
[Parsed_subtitles_0 # 0x7fe76c703240] Using font provider coretext
[Parsed_subtitles_0 # 0x7fe76c703240] fontselect: (Arial, 400, 0) -> /Library/Fonts/Microsoft/Arial.ttf, -1, ArialMT
[Parsed_subtitles_0 # 0x7fe76c703240] fontselect: (Arial, 400, 100) -> /Library/Fonts/Microsoft/Arial Italic.ttf, -1, Arial-ItalicMT
...which somewhat confirms that subtitles are loading, though I am not sure why there are two fonts being loaded?
However, they are not showing at all - almost as if they never loaded. I tried several different files, including ASS ones but no luck.
ffmpeg version is the latest one.
$ ffmpeg -v
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Any ideas?

I never did manage to get it working. In the end, I used a separate function to read the subtitles from stream and overlay them over the video outside of ffmpeg filter.

Related

OpenCV 3.4.3 - GStream not called when VideoWriting

I'd like to succeed writing a file with OpenCV encoding with GStreamer.
Thus I'm using the code :
VideoWriter.open("appsrc ! autovideoconvert ! omxh264enc ! matroskamux ! filesink location=test2.mkv sync=false",
//cv::CAP_GSTREAMER, //set or not, I get the same problem
0, (double)25, //fourcc, fps
cv::Size(1024, 1024),
true);
And my problem :
A video file called appsrc ! autovideoconvert ! omxh264enc ! matroskamux ! filesink location=test2.mkv sync=false is created (rather than test2.mkv), and it is empty. The same problem is corrected and seems to work in the following thread, without any effect for me : Opening a GStreamer pipeline from OpenCV with VideoWriter
I tried, without success :
Add quotes to the file name test2 :
"appsrc ! autovideoconvert ! omxh264enc ! matroskamux ! filesink location=\"test2.mkv\" sync=false" neither
Encode with different format : .flv rather than .mkv
Encode with different codec : omxh265enc rather than omxh264en
I checked :
That GStreamer is well compiled with OpenCV ; the CMake of the OpenCV project outputs :
Video I/O:Video for Windows: YES
DC1394: NO
FFMPEG: YES (prebuilt binaries)
avcodec: YES (ver 57.107.100)
avformat: YES (ver 57.83.100)
avutil: YES (ver 55.78.100)
swscale: YES (ver 4.8.100)
avresample: YES (ver 3.7.0)
GStreamer:
base: YES (ver 1.0)
video: YES (ver 1.0)
app: YES (ver 1.0)
riff: YES (ver 1.0)
pbutils: YES (ver 1.0)
DirectShow: YES
Media Foundation: YES
That FFMpeg is installed on my computer ; for this I used VLC :
File -> Stream -> Add a file then stream
New destination : RTP/MPEG Transport Stream
Profile : Video - H.264 + MP3 (MP4)
Then no error happens ; Note : an error occured with Video - H.265 + MP3
(MP4), but I'm using omxh264enc in my code, not 265
I'm struggled :/ Do you have any idea ?
Thanks a lot :)
Have a good day,
Thibaut
PS - Complete OpenCV CMake output :
Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.17763.
AVX_512F is not supported by C++ compiler
AVX512_SKX is not supported by C++ compiler
Dispatch optimization AVX512_SKX is not available, skipped
libjpeg-turbo: VERSION = 1.5.3, BUILD = opencv-3.4.3-libjpeg-turbo
Looking for Mfapi.h
Looking for Mfapi.h - found
found Intel IPP (ICV version): 2017.0.3 [2017.0.3]
at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippicv_win
found Intel IPP IW sources: 2017.0.3
at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippiw_win
CUDA detected: 9.2
CUDA NVCC target flags: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-D_FORCE_INLINES
Found apache ant: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat (1.8.2)
Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
Caffe: NO
Protobuf: NO
Glog: YES
freetype2: NO
harfbuzz: NO
Module opencv_ovis disabled because OGRE3D was not found
No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
Found installed version of gflags: E:/Git/gflags/BUILD-VS2015
Detected gflags version: 2.2.1
Checking SFM deps... FALSE
Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
Tesseract: NO
General configuration for OpenCV 3.4.3 =====================================
Version control: unknown
Extra modules:
Location (extra): E:/OpenCV/3.4.3/opencv_contrib-3.4.3/modules
Version control (extra): unknown
Platform:
Timestamp: 2018-11-07T16:57:18Z
Host: Windows 10.0.17763 AMD64
CMake: 3.12.0-rc2
CMake generator: Visual Studio 14 2015 Win64
CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
MSVC: 1900
CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
SSE4_1 (5 files): + SSSE3 SSE4_1
SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (6 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (11 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
C/C++:
Built as dynamic libs?: YES
C++11: YES
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.24215.1)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP16 /MD /O2 /Ob2 /DNDEBUG
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP16 /MDd /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP16 /MD /O2 /Ob2 /DNDEBUG
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP16 /MDd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:x64 /INCREMENTAL:NO
Linker flags (Debug): /machine:x64 /debug /INCREMENTAL
ccache: NO
Precompiled headers: YES
Extra dependencies: cudart.lib nppc.lib nppial.lib nppicc.lib nppicom.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cufft.lib -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2/lib/x64
3rdparty dependencies:
OpenCV modules:
To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dpm face features2d flann fuzzy hfs highgui img_hash imgcodecs imgproc java java_bindings_generator line_descriptor ml objdetect optflow phase_unwrapping photo plot python_bindings_generator reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
Disabled: js world
Disabled by dependency: -
Unavailable: cnn_3dobj cvv freetype hdf matlab ovis python2 python3 sfm viz
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO
Windows RT support: NO
GUI:
Win32 UI: YES
VTK support: NO
Media I/O:
ZLib: build (ver 1.2.11)
JPEG: build-libjpeg-turbo (ver 1.5.3-62)
WEBP: build (ver encoder: 0x020e)
PNG: build (ver 1.6.34)
TIFF: build (ver 42 - 4.0.9)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
HDR: YES
SUNRASTER: YES
PXM: YES
Video I/O:
Video for Windows: YES
DC1394: NO
FFMPEG: YES (prebuilt binaries)
avcodec: YES (ver 57.107.100)
avformat: YES (ver 57.83.100)
avutil: YES (ver 55.78.100)
swscale: YES (ver 4.8.100)
avresample: YES (ver 3.7.0)
GStreamer:
base: YES (ver 1.0)
video: YES (ver 1.0)
app: YES (ver 1.0)
riff: YES (ver 1.0)
pbutils: YES (ver 1.0)
DirectShow: YES
Media Foundation: YES
Parallel framework: Concurrency
Trace: YES (with Intel ITT)
Other third-party libraries:
Intel IPP: 2017.0.3 [2017.0.3]
at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippicv_win
Intel IPP IW: sources (2017.0.3)
at: E:/OpenCV/3.4.3/build-cuda92-gstreamer/3rdparty/ippicv/ippiw_win
Custom HAL: NO
Protobuf: build (3.5.1)
NVIDIA CUDA: YES (ver 9.2, CUFFT CUBLAS NVCUVID)
NVIDIA GPU arch: 30 35 37 50 52 60 61 70
NVIDIA PTX archs:
OpenCL: YES (no extra features)
Include path: E:/OpenCV/3.4.3/opencv-3.4.3/3rdparty/include/opencl/1.2
Link libraries: Dynamic load
Python (for build): C:/ProgramData/Miniconda3/python.exe
Java:
ant: C:/NVPACK/apache-ant-1.8.2/bin/ant.bat (ver 1.8.2)
JNI: C:/NVPACK/jdk1.8.0_77/include C:/NVPACK/jdk1.8.0_77/include/win32 C:/NVPACK/jdk1.8.0_77/include
Java wrappers: YES
Java tests: YES
Matlab: NO
Install to: E:/OpenCV/3.4.3/build/install
-----------------------------------------------------------------
Configuring done
Ok, I've eventually found the problem's origin.
By stepping into VideoWriter::open(...) I finally noticed that std::vector backends did not contain any element with "id=CAP_GSTREAMER" -> it did not correctly compile with OpenCV. By investigating more, I discovered it was because I compiled with the x86 version of Gstreamer by mistake (whereas I was building OpenCV for x64).
Have a good day,
Thibaut

Ceedling CMock settings for ARM STM32

I've been setting up Ceedling for STM32. The howto is very scarce, so far I've managed to google next to nothing. Fortunately, the framework is relatively transparent for its size. This is a PIC configuration. I set up something similar (project.yml):
...
:defines:
# in order to add common defines:
# 1) remove the trailing [] from the :common: section
# 2) add entries to the :common: section (e.g. :test: has TEST defined)
:commmon: &common_defines #[]
- STM32F103xB
- UNITY_INT_WIDTH=32
- CMOCK_MEM_INDEX_TYPE=uint32_t
- UNITY_LINE_TYPE=uint16_t
:test:
- *common_defines
- TEST
:test_preprocess:
- *common_defines
- TEST
So far so good (no real work is yet attempted). Having added this definition
- CMOCK_MEM_PTR_AS_INT=uint32_t
I'm having a warning:
/vendor/ceedling/vendor/cmock/src/cmock.c:105:40: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
index = *(CMOCK_MEM_INDEX_TYPE*)((CMOCK_MEM_PTR_AS_INT)next - CMOCK_MEM_INDEX_SIZE);
No wonder, as next is a PC platform 64-bit pointer. Still I am not at all sure whether I have to control CMOCK_MEM_PTR_AS_INT or not. It depends on whether CMOCK_MEM_PTR_AS_INT is a critical target (ARM) platform definition.
So far I haven't found an STM32 example.
Here is the hard won sequence, complete with the Eclipse integration:
Install Ceedling:
$ gem install ceedling
Create Ceedling project (troubleshooting #215):
myproject $ cd ..
$ ceedling new myproject
$ cd myproject/vendor/
$ rm -rf ceedling/
$ git clone --recursive https://github.com/throwtheswitch/ceedling.git
Modify vendor/ceedling/plugins/module_generator/config/module_generator.yml:
:module_generator:
:project_root: ./
:source_root: Src/
:inc_root: Inc/
:test_root: test/
Modify project.yml:
...
:paths:
:test:
- +:test/**
- -:test/support
:source:
- Src/**
:include:
- Drivers/**
- Inc/**
:support:
- test/support
...
:defines:
:commmon: &common_defines # A nice typo, next to invisible :)
- STM32F103xB
...
:cmock:
:strippables:
- volatile
...
:plugins:
:load_paths:
- vendor/ceedling/plugins
:enabled:
# - stdout_pretty_tests_report
- stdout_gtestlike_tests_report
- module_generator
Eclipse C/C++ Unit plugin configuration:
Main/Project: myproject
Main/Application: /home/user/.gem/ruby/2.5.0/bin/ceedling
Main/Disable auto build
Arguments/Program arguments: clobber\ntest:all
Testing/Test Runner: Google Test Runner
Environment: Variable TERM Value xterm

FFMPEG Library MP3 Encoder

Does the ffmpeg library come with an MP3 encoder?
This:
AVCodec *pCodec = avcodec_find_encoder(AV_CODEC_ID_MP3);
always returns null. I also tried AV_CODEC_ID_MP3ADU and AV_CODEC_ID_MP3ON4, they too return null. The only encoding codec I've found is AV_CODEC_ID_MP2.
Any help appreciated
libmp3lame is the mp3 encoder for ffmpeg. It needs to be enabled during configure stage of the build. --enable-libmp3lame should enable it. Also you should libmp3lame-dev installed. I follow this guide to install ffmpeg: https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
To quickly check if you already have it:
$ ffmpeg -codecs | grep mp3
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 25 2013 15:16:27 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
configuration: --prefix=/usr/local/Cellar/ffmpeg/0.11.1 --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --cc=/usr/bin/llvm-gcc --host-cflags='-Os -w -pipe -march=core2 -msse4 -mmacosx-version-min=10.7' --host-ldflags=-L/usr/local/lib --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
EA libmp3lame libmp3lame MP3 (MPEG audio layer 3)
D A D mp3 MP3 (MPEG audio layer 3)
D A D mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3)
D A D mp3adufloat ADU (Application Data Unit) MP3 (MPEG audio layer 3)
D A D mp3float MP3 (MPEG audio layer 3)
D A D mp3on4 MP3onMP4
D A D mp3on4float MP3onMP4
You can see that E (encoder) is available with libmp3lame.

ffmpeg - operation not permitted error while conversion

I am developing an android app. My requirement is that to implement an rtsp streaming server on android. It has to live stream video and audio captured using MediaRecorder. Another requirement is that I have to use live555 as the streaming server. What I get from MediaRecorder is in MP4 or 3GP format. live555 cannot able to stream both. But it can stream audio if I recorded it only in 'RAW_AMR' format. Since live555 support 'mpg' format for streaming, I decided to put someone in middle who can convert 'mp4' or '3gp' to 'mpg', and I chose ffmpeg.
I have ported live555 and ffmpeg to android. ffmpeg is able to convert the file recorded by MediaRecorder once it is finished. But the problem is that ffmpeg cannot be able to do it concurrently. That is, ffmpeg is not able to convert the file while recording. It shows an Operation not permitted error. I tried the same on my linux machine, using VLC to record instead of MediaRecorder on android. The result is same. ffmpeg is able to convert once the recording is finished, and not able to do the same while recording.
Here is the ffmpeg command I issued on my linux box:
ffmpeg -v 9 -loglevel 99 -i test.mp4 test.mpg
Where test.mp4 is the file to which VLC is recording in mp4 format. and test.mpg is my destination file. The following is the output by ffmpeg on terminal.
ffmpeg version 0.8.9, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 1 2012 18:29:27 with gcc 4.6.2 20111027 (Red Hat 4.6.2-1)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-bzlib --enable-libcelt --enable-libdc1394 --enable-libdirac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 51. 9. 1 / 51. 9. 1
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 5. 0 / 53. 5. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 23. 0 / 2. 23. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mov,mp4,m4a,3gp,3g2,mj2 # 0x1672600] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 # 0x1672600] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 # 0x1672600] moov atom not found
test.mp4: Operation not permitted
Would anyone please tell me what is causing the problem? Or is the scenario above is possible by ffmpeg. That is, is ffmpeg is able to do the conversion at the same time as that of recording? If it is not possible by ffmpeg, would you please suggest any alternative solutions?
NOTE: I am putting a C tag because if it possible by some tweaking in C on ffmpeg, I am ready to do that(I want the solution that badly). But please provide some pointers to the right direction.
Both 3gp and mp4 formats include moov atom (chunk of data) that is written when the file is finalized. Until then the file is incomplete.
You can use FLV as the "middle" format. Other formats that support live streaming can be used too. Option -re may be helpful to tell encoder to run at the stream rate, if needed.
See also Is it possible to play an output video file from an encoder as it's being encoded?.

Using FFmpeg's (libavformat) RTP data structures via dynamic linking

I want to use the RTP data structures (e.g. RTPMuxContext in libavformat/rtpenc.h) provided by FFmpeg's libavformat however they don't seem to be available with the following install:
ffmpeg version 0.8.2.git, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 14 2011 16:04:33 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
configuration: --enable-shared --disable-mmx --arch=x86_64
libavutil 51. 16. 0 / 51. 16. 0
libavcodec 53. 14. 0 / 53. 14. 0
libavformat 53. 12. 0 / 53. 12. 0
libavdevice 53. 3. 0 / 53. 3. 0
libavfilter 2. 40. 0 / 2. 40. 0
libswscale 2. 1. 0 / 2. 1. 0
When I look in /usr/local/include, I see the libavformat directory however only a few files are there: avformat.h, avio.h, and version.h. Of course, when I try to include libavformat/rtpenc.h I get "error: libavformat/rtpenc.h: No such file or directory"
I'd like to achieve this by dynamic linking to the FFmpeg libraries (for LGPL compliance, among other reasons), but it doesn't seem to be possible.
Is there a parameter for the configure script that I'm missing, or a post-installation step that I've neglected?
You can just include the rtpenc.h header from its existing location in the ffmpeg source directory. Since that header doesn't produce any object code your resulting binary won't be a derivative work of the ffmpeg library, but if you want you could just write a compatible structure definition in your own code and access the ffmpeg structure with a pointer/variable defined using your own definition.
Be careful because that structure is not a publicly-facing component of ffmpeg and is likely to change without warning in different versions.

Resources