avcodec is a free software/open source LGPL-licensed library of codecs for encoding and decoding video and audio data.
Questions tagged [avcodec]
54 questions
1
vote
1 answer
av_write_frame fails when encoding a larger audio file to .mpg
I am encoding live rendered video data and an existing .wav file into an mpg-file.
To do that I first write all audio frames, and then the video frames as they come in from the render engine. For smaller .wav files (< 25 seconds), everything works…

TheSHEEEP
- 2,961
- 2
- 31
- 57
1
vote
0 answers
libavcodec decode AVFrames to FIFO buffer
My aim is to decode multiple frames of a video file, accumulate the decoded frames into a FIFO buffer and read them later on. I decode the packet to my AVFRame mFrame:
avcodec_decode_video2(mCodecContext,mFrame,&frameFinished,&mPacket);
Normally I…

user1175197
- 379
- 4
- 7
0
votes
2 answers
FFMPEG build error
I've been trying to build a LGPL copy of ffmpeg and I have tried various different configure methods. I downloaded the latest source from the ffmpeg site and used the following simple configure
./configure --enable-memalign-hack --enable-pthreads…

user1149520
- 13
- 4
0
votes
0 answers
AVCodec h264_v4l2m2m hardware decoding unable to find device
Using a custom compiled FFmpeg:
$ ./ffmpeg -codecs | grep h264
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --arch=aarch64 --enable-cross-compile…

nathansizemore
- 3,028
- 7
- 39
- 63
0
votes
0 answers
h.264(ffmpeg) enoding one still image at 25 fps produces DIFFERENT images?
I've tried to enode one still image at 25 fps with h.264(ffmpeg). WHy the codec produces DIFFERENT images?
This is my syntetic still image example:
ffmpeg -framerate 1 -r 25 -i ttest%.jpg -vcodec libx264 -crf 25 -pix_fmt yuv420p still_image.mp4
I've…

Aleksei Komarov
- 1
- 1
0
votes
0 answers
Leak memory with ffmpeg in c++
Im using ffmpeg libs to decode sa video, and i noticed that there os a leak memory, avcodec_send_packet allocate some time more memory without free it with av_packet_unref()
do u have any explication ?

simo
- 41
- 1
- 6
0
votes
1 answer
Video frame extraction using ffmpeg
I am stuck at a problem of frame extraction using ffmpeg. I am pointing out a given frame duration in video editors like filmora and shotkut (both coherent upto 2 places of milliseconds) and then I am using that duration in ffmpeg to extract all the…
0
votes
1 answer
avcodec quality settings
Is there any explanation of the settings in the avcodec lib AVCodec and AVCodecContext structs?
The bit rate and gop are fairly obvious but I'm having problems mapping the rest onto the ffmpeg and x264 presets.
For example the high bit rate…

Martin Beckett
- 94,801
- 28
- 188
- 263
0
votes
1 answer
ffmpeg avcodec_find_encoder null - register all depreciated
avcodec_find_encoder(AV_CODEC_ID_H264) is returning null;
other answers say to use av_register_all or avcodec_register_all which are both now deprecated.
i am using ffmpeg:x64-windows 4.2-8 installed via vcpkg

Aaron Trotter
- 5
- 3
0
votes
0 answers
Decode a A/V stream in c#
I'm working on a C# program, which can read an Audio/Video stream and should separate it to a Video file and Audio file.
Input stream is a Byte-Raw array
My question is How I can separate Video frame and Audio frame from a Byte Array?
(suppose that…

Silverman
- 1
- 1
0
votes
1 answer
FFmpeg audio encoder new encode function
I would like to update an AV Audio encoder using function avcodec_encode_audio (deprecated) to avcodec_encode_audio2, without modifying the structure of existing encoder:
outBytes = avcodec_encode_audio(m_handle, dst, sizeBytes, (const short…

mattobob
- 833
- 4
- 15
- 37
0
votes
1 answer
Decoded H.264 gives different frame and context size
We're using avcodec to decode H.264, and in some circumstances, after changing the resolution, avcodec gets confused, and gives two different sizes for the decoded frame:
if (av_init_packet_dll)
av_init_packet_dll(&avpkt);
avpkt.data =…

Deanna
- 23,876
- 7
- 71
- 156
0
votes
1 answer
avcodec_open only works with uncompressed format
Context: I have a file called libffmpeg.so, that I took from the APK of an Android application that is using FFMPEG to encode and decode files between several Codecs. Thus, I take for grant that this is compiled with encoding options enable and that…

Léon Pelletier
- 2,701
- 2
- 40
- 67
0
votes
1 answer
How to seek to particular frame in elementary video stream?
We are trying a develop a media player and have gone through tutorials from dranger mentioned [Dranger tutorial for ffmpeg1. The api mentioned here talks about seeking and playing container formats.What we want is player for raw/elementary video…

StraightCirle
- 182
- 2
- 12
0
votes
1 answer
where is the source code for av_codec_set_pkt_timebase in ffmpeg repo
I am using libavformat to mux AVI files.
When I look into the ffmpeg source code, I cannot find the function definition for av_codec_set_pkt_timebase while I can only find the function declaration in avcodec.h
I am using git revision:…

Lewis Z
- 498
- 7
- 16