libavcodec is a free software/open source LGPL-licensed library of codecs for encoding and decoding video and audio data.
Questions tagged [libavcodec]
509 questions
7
votes
1 answer
Extremely high bit rate when encoding video with libavcodec
I am trying to capture the camera output and make a video using libavcodec. As an example on how to accomplish this i have used ffmpeg muxing example.
The problem is that a 4 seconds video has a size of ~15mb and a bitrate of ~30000 kb/s, although I…

niculare
- 3,629
- 1
- 25
- 39
7
votes
5 answers
How to encode resampled PCM-audio to AAC using ffmpeg-API when input pcm samples count not equal 1024
I am working on capturing and streaming audio to RTMP server at a moment. I work under MacOS (in Xcode), so for capturing audio sample-buffer I use AVFoundation-framework. But for encoding and streaming I need to use ffmpeg-API and libfaac encoder.…

Aleksei2414904
- 143
- 1
- 2
- 7
7
votes
1 answer
How to get number of I/P/B frames of a video file?
I want to extract information of a video file to get the count of its I/P/B frames. How to do it in ffmpeg? Or should I programming using libavformat and libavcodec to do it? Many thanks!

Treper
- 3,539
- 2
- 26
- 48
7
votes
1 answer
FPS too high when saving video in mp4 container
When I decode frames from avi file and then decode them in x264 and save to mp4 file, the fps of the output file is always 12,800. Therefore the file is played very fast. But, when I save the encoded in h264 frames in avi format and not mp4, so the…

theateist
- 13,879
- 17
- 69
- 109
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
Why does adding audio stream to ffmpeg's libavcodec output container cause a crash?
As it stands, my project correctly uses libavcodec to decode a video, where each frame is manipulated (it doesn't matter how) and output to a new video. I've cobbled this together from examples found online, and it works. The result is a perfect…

Sniggerfardimungus
- 11,583
- 10
- 52
- 97
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
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
1 answer
How to choose between openH264 and x264 decoder
I'm using the dev build from zeranoe.com which has OpenH264 and libx264 in it.
How can i choose between these two Decoders to compare the decoding speed ?
avcodec_find_decoder(AVCodecID.AV_CODEC_ID_H264);
only gives me the name "h264"
but which…

Darko
- 103
- 1
- 1
- 4
6
votes
1 answer
Using hardware acceleration with libavcodec
I have downloaded a software (info-beamer) and I would like to use the GPU acceleration to decode H.264 videos. I know my platform is able to decode H.264 videos by using the GPU. I performed some tests with gstreamer using the following command and…

morandg
- 1,066
- 3
- 14
- 30
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
1 answer
FFmpeg decode raw buffer with avcodec_decode_video2
I am receiving a h264 stream where I at least know the size of one frame. The stream is coming in right as I can store it in a file and playback with vlc. Playing back a file is no problem for me as I include the libavformat. But libavformat gives…

Martin Schlott
- 4,369
- 3
- 25
- 49
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
5
votes
1 answer
ffmpeg libx264 AVCodecContext settings
I am using a recent windows (Jan 2011) ffmpeg build and trying to record video in H264. It is recording fine in MPEG4 using the following settings:
c->codec_id = CODEC_ID_MPEG4;
c->codec_type = AVMEDIA_TYPE_VIDEO;
c->width = VIDEO_WIDTH;
c->height =…

integra753
- 271
- 1
- 5
- 19