Questions tagged [libavcodec]

libavcodec is a free software/open source LGPL-licensed library of codecs for encoding and decoding video and audio data.

509 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
54
votes
3 answers

Can FFmpeg be used as a library, instead of a standalone program?

I'd like to add video conversion capabilities to a program I'm writing. FFmpeg's command line interface for doing this is simply ffmpeg -i InputFile OutputFile, but is there a way to make use of it as a library, so I can do something like…
user123003
36
votes
2 answers

Raw H264 frames in mpegts container using libavcodec

I would really appreciate some help with the following issue: I have a gadget with a camera, producing H264 compressed video frames, these frames are being sent to my application. These frames are not in a container, just raw data. I want to use…
Ferenc Deak
  • 34,348
  • 17
  • 99
  • 167
34
votes
3 answers

Reading a file located in memory with libavformat

I'm currently trying to read small video files sent from a server In order to read a file using libavformat, you are supposed to call av_open_input_file(&avFormatContext, "C:\\path\\to\\video.avi", 0, 0, 0); The problem is that in this case the…
Tomaka17
  • 4,832
  • 5
  • 29
  • 38
29
votes
2 answers

Can anyone help in understanding AVFrame.linesize[]?

I tried to find what each cell of AVFrame.linesize[] means, but I didn't found. As I understood linesize[0] is the width, linesize[1] is the height. If I'm right what does other cells mean? why after avcodec_decode_video2(codecCtxDecode,…
theateist
  • 13,879
  • 17
  • 69
  • 109
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
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
1 answer

What does "copy" do in a ffmpeg command line?

I know that it copies something but other than that what does it do (to what extend it affects the output file)? Is it a switch or option? Why does it not have a hyphen before the word itself? I see from other questions that it can copy streams…
ccsalison
  • 331
  • 1
  • 2
  • 10
15
votes
1 answer

How to set decode pixel format in libavcodec?

I decode video via libavcodec, using the following code: //Open input file if(avformat_open_input(&ctx, filename, NULL, NULL)!=0) return FALSE; // Couldn't open file if(avformat_find_stream_info(ctx, NULL)<0) return FALSE; // Couldn't find…
kochedykov
  • 153
  • 1
  • 1
  • 7
15
votes
1 answer

How can I create a FULL copy of a decoder?

I'm writing a video decoder (using FFMPEG/AVCodec) for a custom implementation of an mpeg4 video stream. The peculiarity of this video stream is that it could split into many "son" streams creating many P frames based on the same parent. The video…
damicolo
  • 161
  • 1
  • 7
15
votes
5 answers

C++ FFmpeg create mp4 file

I'm trying to create mp4 video file with FFmpeg and C++, but in result I receive broken file (windows player shows "Can't play ... 0xc00d36c4"). If I create .h264 file, it can be played with 'ffplay' and successfully converted to mp4 via CL. My…
DDovzhenko
  • 1,295
  • 1
  • 15
  • 34
15
votes
2 answers

problem: FFMPEG seeking with av_seek_frame using byte positions

I am trying to get the av_seek_frame() function to go to a byte position I specify. I am implementing a frame accurate seeking mechanism for my application, and the way I see it, I will scan the entire video file, and store byte positions for each…
Nick Verlinden
  • 151
  • 1
  • 1
  • 3
13
votes
5 answers

ffmpeg not finding vcodec libx264

I've installed the latest ffmpeg but it seems unable to locate the video codecs. Do I need to completeley remove ffmpeg and re run the ./configure differently in order for ffmpeg to find the video codecs? Here's my current configuration: FFmpeg…
Ofeargall
  • 5,340
  • 5
  • 28
  • 33
13
votes
2 answers

Encode audio to aac with libavcodec

I'm using libavcodec (latest git as of 3/3/10) to encode raw pcm to aac (libfaac support enabled). I do this by calling avcodec_encode_audio repeatedly with codec_context->frame_size samples each time. The first four calls return successfully, but…
ryan
  • 884
  • 1
  • 9
  • 14
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
1
2 3
33 34