[Libav-user] Unable to find codec

francesco at bltitalia.com francesco at bltitalia.com
Mon Jan 9 14:59:24 CET 2012


Hi to all
I compiled last release of ffmpeg with all codecs enabled. So I linked the
libraries to my project and opened a simple image composed with a single field.
The av_open_input_file, and av_find_stream_info(pFormatCtx) works correctly,
that is info contained into pFormatCtx are correct (video stream is a MPEG2
one).The problem arises when I attempt to detect codec.  Here is the code:

  videoStream=-1;
  for(i=0; i<pFormatCtx->nb_streams; i++)
    if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) {
      videoStream=i; break;
    }

  if(videoStream==-1) {Memo1->Lines->Add("Unable to detect stream type");
goto   end_conv;}
   // Get a pointer to the codec context for the video stream
  pCodecCtx=pFormatCtx->streams[videoStream]->codec;

  // Find the decoder for the video stream
  pCodec=avcodec_find_decoder(pCodecCtx->codec_id);

The pCodec is always null.  Did anyone have an idea ?  Attached you will
find the codec list included and the results of the -format option.
Best regards
-------------- next part --------------
C:\Info\Mpeg\ffmpeg>ffmpeg -formats
ffmpeg version 0.8.7.git, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 22 2011 18:10:04 with gcc 4.6.1
  configuration: --enable-shared --disable-yasm --prefix=/mingw
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 43. 0 / 53. 43. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0


File formats:
 D. = Demuxing supported
 .E = Muxing supported
 --
  E 3g2             3GP2 format
  E 3gp             3GP format
 D  4xm             4X Technologies format
 D  IFF             IFF format
 D  ISS             Funcom ISS format
 D  MTV             MTV format
 DE RoQ             raw id RoQ format
  E a64             a64 - video for Commodore 64
 D  aac             raw ADTS AAC
 DE ac3             raw AC-3
 D  act             ACT Voice file format
 D  adf             Artworx Data Format
  E adts            ADTS AAC
 D  adx             CRI ADX
 D  aea             MD STUDIO audio
 DE aiff            Audio IFF
 DE alaw            PCM A-law format
 DE amr             3GPP AMR file format
 D  anm             Deluxe Paint Animation
 D  apc             CRYO APC format
 D  ape             Monkey's Audio
 D  applehttp       Apple HTTP Live Streaming format
 DE asf             ASF format
  E asf_stream      ASF format
 DE ass             Advanced SubStation Alpha subtitle format
 DE au              SUN AU format
 DE avi             AVI format
  E avm2            Flash 9 (AVM2) format
 D  avs             AVS format
 D  bethsoftvid     Bethesda Softworks VID format
 D  bfi             Brute Force & Ignorance
 D  bin             Binary text
 D  bink            Bink
 DE bit             G.729 BIT file format
 D  bmv             Discworld II BMV
 D  c93             Interplay C93
 DE caf             Apple Core Audio Format
 DE cavsvideo       raw Chinese AVS video
 D  cdg             CD Graphics Format
  E crc             CRC testing format
 DE daud            D-Cinema audio format
 D  dfa             Chronomaster DFA
 DE dirac           raw Dirac
 DE dnxhd           raw DNxHD (SMPTE VC-3)
 D  dsicin          Delphine Software International CIN format
 DE dts             raw DTS
 DE dv              DV video format
  E dvd             MPEG-2 PS format (DVD VOB)
 D  dxa             DXA
 D  ea              Electronic Arts Multimedia Format
 D  ea_cdata        Electronic Arts cdata
 DE eac3            raw E-AC-3
 DE f32be           PCM 32 bit floating-point big-endian format
 DE f32le           PCM 32 bit floating-point little-endian format
 DE f64be           PCM 64 bit floating-point big-endian format
 DE f64le           PCM 64 bit floating-point little-endian format
 DE ffm             FFM (FFserver live feed) format
 DE ffmetadata      FFmpeg metadata in text format
 D  film_cpk        Sega FILM/CPK format
 DE filmstrip       Adobe Filmstrip
 DE flac            raw FLAC
 D  flic            FLI/FLC/FLX animation format
 DE flv             FLV format
  E framecrc        framecrc testing format
  E framemd5        Per-frame MD5 testing format
 DE g722            raw G.722
 DE g723_1          raw G.723.1
 D  g729            G.729 raw format demuxer
  E gif             GIF Animation
 D  gsm             raw GSM
 DE gxf             GXF format
 DE h261            raw H.261
 DE h263            raw H.263
 DE h264            raw H.264 video format
 D  ico             Microsoft Windows ICO
 D  idcin           id Cinematic format
 D  idf             iCE Draw File
 DE image2          image2 sequence
 DE image2pipe      piped image2 sequence
 D  ingenient       raw Ingenient MJPEG
 D  ipmovie         Interplay MVE format
  E ipod            iPod H.264 MP4 format
 D  iv8             A format generated by IndigoVision 8000 video server
 DE ivf             On2 IVF
 D  jv              Bitmap Brothers JV
 DE latm            LOAS/LATM
 D  lavfi           Libavfilter virtual input device
 D  lmlm4           lmlm4 raw format
 D  loas            LOAS AudioSyncStream
 D  lxf             VR native stream format (LXF)
 DE m4v             raw MPEG-4 video format
  E matroska        Matroska file format
 D  matroska,webm   Matroska/WebM file format
  E md5             MD5 testing format
 DE microdvd        MicroDVD subtitle format
 DE mjpeg           raw MJPEG video
  E mkvtimestamp_v2 extract pts as timecode v2 format, as defined by mkvtoolnix
 DE mlp             raw MLP
 D  mm              American Laser Games MM format
 DE mmf             Yamaha SMAF
  E mov             MOV format
 D  mov,mp4,m4a,3gp,3g2,mj2 QuickTime/MPEG-4/Motion JPEG 2000 format
  E mp2             MPEG audio layer 2
 DE mp3             MPEG audio layer 3
  E mp4             MP4 format
 D  mpc             Musepack
 D  mpc8            Musepack SV8
 DE mpeg            MPEG-1 System format
  E mpeg1video      raw MPEG-1 video
  E mpeg2video      raw MPEG-2 video
 DE mpegts          MPEG-2 transport stream format
 D  mpegtsraw       MPEG-2 raw transport stream format
 D  mpegvideo       raw MPEG video
  E mpjpeg          MIME multipart JPEG format
 D  msnwctcp        MSN TCP Webcam stream
 DE mulaw           PCM mu-law format
 D  mvi             Motion Pixels MVI format
 DE mxf             Material eXchange Format
  E mxf_d10         Material eXchange Format, D-10 Mapping
 D  mxg             MxPEG clip file format
 D  nc              NC camera feed format
 D  nsv             Nullsoft Streaming Video
  E null            raw null video format
 DE nut             NUT format
 D  nuv             NuppelVideo format
 DE ogg             Ogg
 D  oma             Sony OpenMG audio
 D  pmp             Playstation Portable PMP format
  E psp             PSP MP4 format
 D  psxstr          Sony Playstation STR format
 D  pva             TechnoTrend PVA file and stream format
 D  qcp             QCP format
 D  r3d             REDCODE R3D format
 DE rawvideo        raw video format
  E rcv             VC-1 test bitstream
 D  rl2             RL2 format
 DE rm              RealMedia format
 D  rpl             RPL/ARMovie format
 DE rso             Lego Mindstorms RSO format
 DE rtp             RTP output format
 DE rtsp            RTSP output format
 DE s16be           PCM signed 16 bit big-endian format
 DE s16le           PCM signed 16 bit little-endian format
 DE s24be           PCM signed 24 bit big-endian format
 DE s24le           PCM signed 24 bit little-endian format
 DE s32be           PCM signed 32 bit big-endian format
 DE s32le           PCM signed 32 bit little-endian format
 DE s8              PCM signed 8 bit format
 DE sap             SAP output format
 D  sdp             SDP
  E segment         segment muxer
 D  shn             raw Shorten
 D  siff            Beam Software SIFF
 D  smk             Smacker video
 D  sol             Sierra SOL format
 DE sox             SoX native format
 DE spdif           IEC 61937 (used on S/PDIF - IEC958)
 DE srt             SubRip subtitle format
  E svcd            MPEG-2 PS format (VOB)
 DE swf             Flash format
 D  thp             THP
 D  tiertexseq      Tiertex Limited SEQ format
 D  tmv             8088flex TMV
 DE truehd          raw TrueHD
 D  tta             True Audio
 D  tty             Tele-typewriter
 D  txd             Renderware TeXture Dictionary
 DE u16be           PCM unsigned 16 bit big-endian format
 DE u16le           PCM unsigned 16 bit little-endian format
 DE u24be           PCM unsigned 24 bit big-endian format
 DE u24le           PCM unsigned 24 bit little-endian format
 DE u32be           PCM unsigned 32 bit big-endian format
 DE u32le           PCM unsigned 32 bit little-endian format
 DE u8              PCM unsigned 8 bit format
 D  vc1             raw VC-1
 D  vc1test         VC-1 test bitstream format
  E vcd             MPEG-1 System format (VCD)
 D  vfwcap          VfW video capture
 D  vmd             Sierra VMD format
  E vob             MPEG-2 PS format (VOB)
 DE voc             Creative Voice file format
 D  vqf             Nippon Telegraph and Telephone Corporation (NTT) TwinVQ
 D  w64             Sony Wave64 format
 DE wav             WAV format
 D  wc3movie        Wing Commander III movie format
  E webm            WebM file format
 D  wsaud           Westwood Studios audio format
 D  wsvqa           Westwood Studios VQA format
 DE wtv             Windows Television (WTV)
 D  wv              WavPack
 D  xa              Maxis XA File Format
 D  xbin            eXtended BINary text (XBIN)
 D  xmv             Microsoft XMV
 D  xwma            Microsoft xWMA
 D  yop             Psygnosis YOP Format
 DE yuv4mpegpipe    YUV4MPEG pipe format
-------------- next part --------------
/*******************************************************************\
*    ing. Francesco  Cuzzocrea
*    company:    BLT Italia srl        web:  http://www.blt.it
*    address:    via Rosselli, 91     city:  Lido di CAMAIORE
*    country:    ITALY                 zip:  55043-i
*      Tel. :    +39 0584 904788       Fax:  +39 0584 904789  
*     e-mail:   francesco at bltitalia.com
\*******************************************************************/



More information about the Libav-user mailing list