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
4
votes
1 answer
How to overlay sequence of frames on video using ffmpeg-python?
I tried below but it is only showing the background video.
background_video = ffmpeg.input( "input.mp4")
overlay_video = ffmpeg.input(f'{frames_folder}*.png', pattern_type='glob', framerate=25)
subprocess = ffmpeg.overlay(
…

Yogesh Yadav
- 723
- 6
- 21
4
votes
1 answer
Why is ffmpeg faster than this minimal example?
I'm wanting to read the audio out of a video file as fast as possible, using the libav libraries. It's all working fine, but it seems like it could be faster.
To get a performance baseline, I ran this ffmpeg command and timed it:
time ffmpeg…

Dave Ceddia
- 1,480
- 2
- 17
- 24
4
votes
0 answers
Avoid copying decoded frames when seeking in ffmpeg
I'm working on implementing accurate seeking using ffmpeg and libav (using the C libraries, not the command line ffmpeg tool).
From what I understand, the only way to get accurate seeking is to seek to the nearest (earlier) keyframe, and then decode…

Dave Ceddia
- 1,480
- 2
- 17
- 24
4
votes
2 answers
sws_scale, YUV to RGB conversion
I need convert YUV to RGB. I also need the RGB values to be in the limited range (16-235).
I try to use sws_scale function for this task.
My code you can see below. But after conversion I got the black pixel is (0, 0, 0) instead of (16, 16,…

Валентин Никин
- 357
- 2
- 11
4
votes
1 answer
Libavformat/FFMPEG: Muxing into mp4 with AVFormatContext drops the final frame, depending on the number of frames
I am trying to use libavformat to create a .mp4 video
with a single h.264 video stream, but the final frame in the resulting file
often has a duration of zero and is effectively dropped from the video.
Strangely enough, whether the final frame is…

Galen Lynch
- 43
- 5
4
votes
0 answers
ffmpeg CMAF support for mpeg-dash
All,
I am trying remux an mp4 as a segmented mpeg-dash stream. I am using libavcodec and the code is exactly like leandromoreira's example, updated to C++14. By setting
av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov+default_base_moof",…

Hobo Joe
- 125
- 1
- 7
4
votes
1 answer
Encoding raw video to h264 is not playable
What I'm trying to achieve is, no matter of the camera or rtsp stream encoding to decode it and then encode it to H264 and save it in mp4 container. The problem is that the video is not playable while there is no errors thrown. I can see the file…

Expressingx
- 1,480
- 1
- 14
- 39
4
votes
2 answers
How to use FFmpeg API overlay filter in C / C++
I have a C++ project which creates 7/24 WebTV like RTMP stream and allows operations like changing current content on runtime, seeking content, looping through a playlist which is constructed by a json array, also supports changing whole playlist on…

yildizmehmet
- 53
- 1
- 8
4
votes
1 answer
Relation between lineSize, width, height in FFMPEG
I am confused between linesize, height, width in AVFrame.
As per my understanding, linesize is the strides, which ideally should be the width of the image, right ?
However, the value of width and linesize are not matching.
AVFrame pFrame;…

pseudo_teetotaler
- 1,485
- 1
- 15
- 35
4
votes
3 answers
How can I determine if a codec / container combination is compatible with FFmpeg?
I'm looking at re-muxing some containers holding audio and video such that I extract the best, first audio stream, and store it in a new container where e.g. only the audio stream is present.
The output context for FFmpeg is created like…

Dan
- 1,258
- 1
- 10
- 22
4
votes
1 answer
How to merge audio to video through FFMpeg C API
How to merge audio with video through FFMpeg C library.
I have tried muxing.c In this example, audio is created every video frame. But I wanna merge with one full mp3 or wav some other audio format.
And how to encode the audio file (.mp3) while…

Muthu GM
- 281
- 3
- 11
4
votes
1 answer
Error "sys/videoio.h - not found" OpenCV 3.1.0
I using Elementary OS and I'm trying to install OpenCV 3.1.0, I follow the instructions of http://docs.opencv.org/3.0-beta/doc/tutorials/introduction/linux_install/linux_install.html
Also, I have installed libav 11.7 and ffmpeg 3.1.3
but, after…

Jefferson Rodriguez
- 41
- 1
- 3
4
votes
1 answer
raw h.264 bitstream decoding
I can get raw h.264 frames from a camera. (it does NOT contain any network headers, for example rtsp, http).
They are h.264 raw data.
And I push these data to a queue frame by frame.
I googled many ffmpeg example which uses avformat_open_input()…

srjohnhuang
- 232
- 5
- 18
4
votes
1 answer
h264 annexb bitstream to flv mux ffmpeg library
I have an IP Camera which gives H264 annexb Bitstream through SDK calls.
I want to pack this video stream into FLV container. So far I've got to know the following :-
I have to convert H264 annexb to H264 AVCC :
For this I'll have to replace NAL…

Muhammad Ali
- 418
- 6
- 20
4
votes
1 answer
FFmpeg/Libav audio decode example
I am trying to get the same output as that of ffmpeg/avconv from converting an MP2 file to raw PCM using code. I used the audio_decode_example function from the tutorial included in the FFmpeg/Libav documentation but the outputs were different.
What…

rxjsisfine
- 445
- 1
- 10
- 22