[Libav-user] Issue detecting video stream and using methods to encode and decode any video file.

Ing. Arlhey Herrera Mendoza arlhey.herrera at art.jovenclub.cu
Fri May 11 20:46:08 CEST 2012

   Hi, I'm new using libavformat, libavcodec and libavutil and I got 
this thesis project where I need to select any video file from 
filesystem and encode to any video format whatever I want. I've tried 
many things, even the examples on several forums but I got no luck. I'm 
working with Qt and C++ in Ubuntu 11.10, I don't know if this could be 
an issue.
  My principal problem is how to detect which is the video stream in the 
array of streams (using libavformar for that), the thing is that I need 
a codec id which can be compared with any file I choose from the 
filesystem, or  need to know if there is a way to find out which is the 
right codec id to compare. The other problem I got is when try to 
decode/encode the selected file the function avcodec_encode_video fails.
Also fails when I try to get file info using libavformat and is a HD 
video file (doesn't matter the extension, mkv, avi, mpg, mpg4; always 

  Does anyone know anything about it? Thanks in advance for any help.
Sorry by my english...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120511/0a3e38c3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 20501 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120511/0a3e38c3/attachment.png>

More information about the Libav-user mailing list