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
7
votes
2 answers
Creating a video from images using ffmpeg libav and libx264?
I am trying to create a video from images using the ffmpeg library. The images have a size of 1920x1080 and are supposed to be encoded with H.264 using a .mkv container.
I have come across various problems, thinking I am getting closer to a…

marikaner
- 304
- 1
- 2
- 15
7
votes
1 answer
How do I encode KLV packets to an H.264 video using libav*
Currently I am using libav* to encode H.264 videos. I want to add KLVPackets to the bitstream but do not know where to implement it.
There is a struct within avcodec, but I am unsure of how to write it out to the frame metadata
typedef struct {
…

JonnyCplusplus
- 881
- 3
- 12
- 22
6
votes
1 answer
Correct RGB values for AVFrame
I have to fill the ffmpeg AVFrame->data from a cairo surface pixel data. I have this code:
/* Image info and pixel data */
width = cairo_image_surface_get_width( surface );
height = cairo_image_surface_get_height( surface );
stride =…

GiuTor
- 149
- 8
6
votes
1 answer
How to output raw frequency (fft) data using ffmpeg / libavfilter
I'm trying to write libavfilter bindings to convert an arbitrary audio file into a raw frequency (spectrum) data to do subsequent audio analysis. Is there anything built-in ffmpeg or libavfilter to output binary frequency data, rather than a proper…

Jeroen Ooms
- 31,998
- 35
- 134
- 207
6
votes
2 answers
What does it mean "invalid NAL unit size" for h.264 decoder?
I want to transmux a .mkv file to .mp4 using Libav but when I try to decode the video h.264 stream there is a malfunction in my code
Invalid NAL unit size 21274662>141
Error splitting the input into NAL units
The stream seems to contain AVCC…
user11903678
6
votes
0 answers
Create one mpeg-dash segment
I have video encoded in mpeg-dash(*.mpd, init segments, video segments)
Task is to replace one of video segments with segment generated by me. And so video is still can be played.
I read properties of one segment(combining init segment and video…

Yuriy Pryyma
- 574
- 6
- 18
6
votes
1 answer
Using FFmpeg within a python application: ffmpeg tool or libav* libraries?
I am working on a python project that uses ffmpeg as part of its core functionality. Essentially the functionality from ffmpeg that I use boils down to these two commands:
ffmpeg -i udp:// -qscale:v 2 -vf "fps=30" sttest%04d.jpg
ffmpeg…

Victor Odouard
- 1,345
- 3
- 15
- 28
6
votes
3 answers
Unable to install avconv/libav
I'm having no luck install libav on OS X Mavericks. Ive tried everything.
I'm following this guide: http://earthwithsun.com/questions/568464/install-latest-libav-avconv-on-osx
After doing the macport dependency check, which passes, I then…

FaNIX
- 1,888
- 6
- 33
- 60
6
votes
0 answers
Implementing '-async 1' in C code to correct out of sync audio
I have built a segmenter that takes as input a h264 / AAC video and segments according to the HLS specification. The source code for it can be seen here: https://gist.github.com/cpnielsen/f36729c371aac0fe535d
It is implemented as a python extension,…

Christian P.
- 4,784
- 7
- 53
- 70
6
votes
1 answer
Error scaling a video using libav filters
I need to batch-process a bunch of videos to scale their height to 240 keeping the aspect ratio same. The command that gets the job almost done is:
$ avconv -threads 4 -ss 0.0 -i input.avi \
-map 0:0,0:0 -map 0:1,0:1 -vf "scale=-1:240" -y -f mpegts…

S B
- 8,134
- 10
- 54
- 108
6
votes
3 answers
How to use libavformat to concat 2 video files with same codec (re-muxing)?
I have downloaded videos from CDN in flv format (video H264 and audio AAC) and remux to them to MP4 format. But videos are limited by length. So i've downloaded each video in several parts: started at start point, at point 1, at point 2 (by using…

Tarhan
- 536
- 1
- 7
- 15
6
votes
1 answer
keyframe is not a keyframe? AV_PKT_FLAG_KEY does not decode to AV_PICTURE_TYPE_I
After decoding a packet containing AV_PKT_FLAG_KEY in the flags,
I was expecting to get I-frames, but instead I got P-frames:
After a call to:
avcodec_decode_video2(codecCtx, frame, &frameFinished, &packet); // mpeg2 video
I print out the following…

Michael Galaxy
- 1,213
- 14
- 17
6
votes
2 answers
Thread Safety of LibAv/FFMpeg?
Is LibAV/FFMpeg thread safe? For example. Could I read from a file using AVFormatContext* in one thread and decode the read packet it in another with simple additions of mutexes or is the thread safetyness of the library a "don't know don't care"…

user71512
- 167
- 2
- 7
6
votes
4 answers
Unrecognized option 'filter_complex' using avconv
I would like to mix two audio files using avconv. In the documentation I found the following way of implementing this:
avconv -i INPUT1 -i INPUT2 -filter_complex amix=inputs=2:duration=first:dropout_transition=3 OUTPUT
However, when I'm trying to…

user1578793
- 81
- 1
- 3
5
votes
0 answers
Using libav (ffmpeg), how to decode a video file directly to a GPU texture?
I'm using ffmpeg's libav to decode video files on Mac. For supported codecs, it says it can use the Mac VideoToolbox framework to hardware-accelerate the decoding.
Can I get the result of that decode directly as a Metal or CoreVideo buffer or…

GaryO
- 5,873
- 1
- 36
- 61