libav (or libav*) is the collective name of the FFmpeg libraries: libavcodec, libavformat, libavfilter, libavutil, etc. The name has also been appropriated by the Libav project–a fork of FFmpeg.
Questions tagged [libav]
591 questions
260
votes
1 answer
What are the differences and similarities between ffmpeg, libav, and avconv?
When I run ffmpeg on Ubuntu, it shows:
$ ffmpeg
ffmpeg version v0.8, Copyright (c) 2000-2011 the Libav developers
built on Feb 28 2012 13:27:36 with gcc 4.6.1
This program is not developed anymore and is only provided for compatibility. Use…

why
- 23,923
- 29
- 97
- 142
22
votes
5 answers
How to encode h.264 with libavcodec/x264?
I am attempting to encode video using libavcodec/libavformat. Audio works great, but when I try to encode video I get the following errors:
[libx264 @ 0x10182a000]broken ffmpeg default settings detected
[libx264 @ 0x10182a000]use an encoding…

szatmary
- 29,969
- 8
- 44
- 57
22
votes
3 answers
Calculate PTS before frame encoding in FFmpeg
How to calculate correct PTS value for frame before encoding in FFmpeg C API?
For encoding I'm using function avcodec_encode_video2 and then writing it by av_interleaved_write_frame.
I found some formulas, but none of them work.
In doxygen example…

Ilya Zharkov
- 319
- 1
- 4
- 11
21
votes
2 answers
What is the difference between AV_SAMPLE_FMT_S16P and AV_SAMPLE_FMT_S16?
What happens when you do a conversion from AV_SAMPLE_FMT_S16P to AV_SAMPLE_FMT_S16?
How is the AVFrame structure going to contain the planar and non-planar data?

Harit Vishwakarma
- 2,338
- 4
- 21
- 36
18
votes
2 answers
Where can I find modern tutorials for libav, ffmpeg, etc?
I want to make a quick program in C that will open a video, save each frame as a ppm, and dump motion vectors. All the tutorials I can find are from almost ten years ago and call deprecated or non-existent functions.
Are there any good online…

Marty
- 2,104
- 2
- 23
- 42
17
votes
3 answers
Difference between Frames and Packets in FFmpeg
I am trying to decode an MPEG video file using LibAV. There are two terms which I am not able to grok properly, Frames and Packets.
As per my present understanding, Frames are uncompressed video frames and packets are the compressed…

pseudo_teetotaler
- 1,485
- 1
- 15
- 35
16
votes
0 answers
av_register_all generates an exception in Release mode on Windows
I have a program that uses libav. It works well when compiled in Debug mode (Windows, VisualStudio 2010). However, when the program is compiled in Release mode, it crashes in av_register_all. The exception I get is Privileged Instruction.
Anyone has…

ranyakir
- 161
- 1
- 3
15
votes
3 answers
How to convert sample rate from AV_SAMPLE_FMT_FLTP to AV_SAMPLE_FMT_S16?
I am decoding aac to pcm with ffmpeg with avcodec_decode_audio3. However it decodes into AV_SAMPLE_FMT_FLTP sample format (PCM 32bit Float Planar) and i need AV_SAMPLE_FMT_S16 (PCM 16 bit signed - S16LE).
I know that ffmpeg can do this easily with…

frankish
- 6,738
- 9
- 49
- 100
14
votes
5 answers
Pydub unable to locate ffprobe
Here is the link to a similar question to this: Pydub (WindowsError: [Error 2] The system can not find the file specified)
Although in this one the problem is with ffmpeg, which I solved by setting the absolute path.
After setting the absolute path…

Recessive
- 1,780
- 2
- 14
- 37
14
votes
1 answer
FFMPEG:av_rescale_q - time_base difference
I want to know once and for all, how time base calucaltion and rescaling works in FFMPEG.
Before getting to this question I did some research and found many controversial answers, which make it even more confusing.
So based on official FFMPEG…

Michael IV
- 11,016
- 12
- 92
- 223
14
votes
4 answers
How to detect audio sampling rate with avprobe / ffprobe?
I am using libav 9.6, installed via Homebrew.
$ avprobe -version
avprobe version 9.6, Copyright (c) 2007-2013 the Libav developers
built on Jun 8 2013 02:44:19 with Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
avprobe…

Devy
- 9,655
- 8
- 61
- 59
13
votes
2 answers
What's wrong with my use of timestamps/timebases for frame seeking/reading using libav (ffmpeg)?
So I want to grab a frame from a video at a specific time using libav for the use as a thumbnail.
What I'm using is the following code. It compiles and works fine (in regards to retrieving a picture at all), yet I'm having a hard time getting it to…

mtree
- 617
- 2
- 6
- 18
13
votes
3 answers
Libav linking error: undefined references
Here's my problem:
I built ffmpeg from source (version 1.2), the libav* libraries are in /usr/local/lib and they're static
I'm compiling a ns3 (www.nsnam.org) module, so my only control over the linker is through the env variable LINKFLAGS
In the…

Fedech
- 131
- 1
- 1
- 4
12
votes
4 answers
How can I turn libavformat error messages off
By default, libavformat writes error messages to stderr, Like:
Estimating duration from bitrate, this may be inaccurate
How can I turn it off? or better yet, pipe it to my own neat logging function?
Edit: Redirecting stderr to somewhere else is not…

amrhassan
- 2,285
- 3
- 16
- 12
12
votes
2 answers
Libav (ffmpeg) copying decoded video timestamps to encoder
I am writing an application that decodes a single video stream from an input file (any codec, any container), does a bunch of image processing, and encodes the results to an output file (single video stream, Quicktime RLE, MOV). I am using ffmpeg's…

Jason C
- 38,729
- 14
- 126
- 182