1. 程式人生 > >最簡單的基於FFMPEG的Helloworld程式

最簡單的基於FFMPEG的Helloworld程式

=====================================================

最簡單的基於FFmpeg的視訊播放器系列文章列表:

=====================================================


本文記錄一個基於FFmpeg的HelloWorld程式。該程式可以打印出FFmpeg類庫的基本資訊。使用該程式通常可以驗證FFmpeg是否正確的安裝配置。


原始碼

/**
 * 最簡單的FFmpeg Helloworld程式
 * Simplest FFmpeg HelloWorld
 *
 * 雷霄驊 Lei Xiaohua
 * [email protected]
* 中國傳媒大學/數字電視技術 * Communication University of China / Digital TV Technology * http://blog.csdn.net/leixiaohua1020 * * * 本程式是基於FFmpeg函式的最簡單的程式。它可以打印出FFmpeg類庫的下列資訊: * Protocol: FFmpeg類庫支援的協議 * AVFormat: FFmpeg類庫支援的封裝格式 * AVCodec: FFmpeg類庫支援的編解碼器 * AVFilter: FFmpeg類庫支援的濾鏡 * Configure: FFmpeg類庫的配置資訊 * * This is the simplest program based on FFmpeg API. It can show following * informations about FFmpeg library: * Protocol: Protocols supported by FFmpeg. * AVFormat: Container format supported by FFmpeg. * AVCodec: Encoder/Decoder supported by FFmpeg. * AVFilter: Filters supported by FFmpeg. * Configure: configure information of FFmpeg. * */ #include <stdio.h> #define __STDC_CONSTANT_MACROS #ifdef _WIN32 //Windows extern "C" { #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" #include "libavfilter/avfilter.h" }; #else //Linux... #ifdef __cplusplus extern "C" { #endif #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #include <libavfilter/avfilter.h> #ifdef __cplusplus }; #endif #endif //FIX struct URLProtocol; /** * Protocol Support Information */ char * urlprotocolinfo(){ char *info=(char *)malloc(40000); memset(info,0,40000); av_register_all(); struct URLProtocol *pup = NULL; //Input struct URLProtocol **p_temp = &pup; avio_enum_protocols((void **)p_temp, 0); while ((*p_temp) != NULL){ sprintf(info, "%s[In ][%10s]\n", info, avio_enum_protocols((void **)p_temp, 0)); } pup = NULL; //Output avio_enum_protocols((void **)p_temp, 1); while ((*p_temp) != NULL){ sprintf(info, "%s[Out][%10s]\n", info, avio_enum_protocols((void **)p_temp, 1)); } return info; } /** * AVFormat Support Information */ char * avformatinfo(){ char *info=(char *)malloc(40000); memset(info,0,40000); av_register_all(); AVInputFormat *if_temp = av_iformat_next(NULL); AVOutputFormat *of_temp = av_oformat_next(NULL); //Input while(if_temp!=NULL){ sprintf(info, "%s[In ] %10s\n", info, if_temp->name); if_temp=if_temp->next; } //Output while (of_temp != NULL){ sprintf(info, "%s[Out] %10s\n", info, of_temp->name); of_temp = of_temp->next; } return info; } /** * AVCodec Support Information */ char * avcodecinfo() { char *info=(char *)malloc(40000); memset(info,0,40000); av_register_all(); AVCodec *c_temp = av_codec_next(NULL); while(c_temp!=NULL){ if (c_temp->decode!=NULL){ sprintf(info, "%s[Dec]", info); } else{ sprintf(info, "%s[Enc]", info); } switch (c_temp->type){ case AVMEDIA_TYPE_VIDEO: sprintf(info, "%s[Video]", info); break; case AVMEDIA_TYPE_AUDIO: sprintf(info, "%s[Audio]", info); break; default: sprintf(info, "%s[Other]", info); break; } sprintf(info, "%s %10s\n", info, c_temp->name); c_temp=c_temp->next; } return info; } /** * AVFilter Support Information */ char * avfilterinfo() { char *info=(char *)malloc(40000); memset(info,0,40000); avfilter_register_all(); AVFilter *f_temp = (AVFilter *)avfilter_next(NULL); while (f_temp != NULL){ sprintf(info, "%s[%15s]\n", info, f_temp->name); f_temp=f_temp->next; } return info; } /** * Configuration Information */ char * configurationinfo() { char *info=(char *)malloc(40000); memset(info,0,40000); av_register_all(); sprintf(info, "%s\n", avcodec_configuration()); return info; } int main(int argc, char* argv[]) { char *infostr=NULL; infostr=configurationinfo(); printf("\n<<Configuration>>\n%s",infostr); free(infostr); infostr=urlprotocolinfo(); printf("\n<<URLProtocol>>\n%s",infostr); free(infostr); infostr=avformatinfo(); printf("\n<<AVFormat>>\n%s",infostr); free(infostr); infostr=avcodecinfo(); printf("\n<<AVCodec>>\n%s",infostr); free(infostr); infostr=avfilterinfo(); printf("\n<<AVFilter>>\n%s",infostr); free(infostr); return 0; }



執行結果

Configure資訊格式如下所示。

--disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib

Protocol資訊格式如下所示。

[In ][     cache]
[In ][    concat]
[In ][    crypto]
[In ][      data]
[In ][      file]
[In ][       ftp]
[In ][    gopher]
[In ][       hls]
[In ][      http]
[In ][ httpproxy]
[In ][     https]
[In ][      mmsh]
[In ][      mmst]
[In ][      pipe]
[In ][       rtp]
[In ][      srtp]
[In ][   subfile]
[In ][       tcp]
[In ][       tls]
[In ][       udp]
[In ][      rtmp]
[In ][     rtmpe]
[In ][     rtmps]
[In ][     rtmpt]
[In ][    rtmpte]
[In ][    (null)]
[Out][       ftp]
[Out][    gopher]
[Out][      http]
[Out][ httpproxy]
[Out][     https]
[Out][       md5]
[Out][      pipe]
[Out][       rtp]
[Out][      srtp]
[Out][       tcp]
[Out][       tls]
[Out][       udp]
[Out][      rtmp]
[Out][     rtmpe]
[Out][     rtmps]
[Out][     rtmpt]
[Out][    rtmpte]
[Out][    (null)]

AVFormat資訊格式如下所示。

[In ]        aac
[In ]        ac3
[In ]        act
[In ]        adf
[In ]        adp
[In ]        adx
[In ]        aea
[In ]        afc
[In ]       aiff
[In ]        amr
[In ]        anm
[In ]        apc
[In ]        ape
[In ]    aqtitle
[In ]        asf
[In ]        ass
[In ]        ast
[In ]         au
[In ]        avi
[In ]   avisynth
[In ]        avr
[In ]        avs
[In ] bethsoftvid
[In ]        bfi
[In ]        bin
[In ]       bink
[In ]        bit
[In ]        bmv
[In ]      brstm
[In ]        boa
[In ]        c93
[In ]        caf
[In ]  cavsvideo
[In ]        cdg
[In ]       cdxl
[In ]       cine
[In ]     concat
[In ]       data
[In ]       daud
[In ]        dfa
[In ]      dirac
[In ]      dnxhd
[In ]        dsf
[In ]     dsicin
[In ]        dts
[In ]      dtshd
[In ]         dv
[In ]        dxa
[In ]         ea
[In ]   ea_cdata
[In ]       eac3
[In ]       epaf
[In ]        ffm
[In ] ffmetadata
[In ]  filmstrip
[In ]       flac
[In ]       flic
[In ]        flv
[In ]        4xm
[In ]        frm
[In ]       g722
[In ]     g723_1
[In ]       g729
[In ]        gif
[In ]        gsm
[In ]        gxf
[In ]       h261
[In ]       h263
[In ]       h264
[In ]       hevc
[In ] hls,applehttp
[In ]        hnm
[In ]        ico
[In ]      idcin
[In ]        idf
[In ]        iff
[In ]       ilbc
[In ]     image2
[In ] image2pipe
[In ]  alias_pix
[In ] brender_pix
[In ]  ingenient
[In ]    ipmovie
[In ]      ircam
[In ]        iss
[In ]        iv8
[In ]        ivf
[In ]    jacosub
[In ]         jv
[In ]       latm
[In ]      lmlm4
[In ]       loas
[In ]        lvf
[In ]        lxf
[In ]        m4v
[In ] matroska,webm
[In ]      mgsts
[In ]   microdvd
[In ]      mjpeg
[In ]        mlp
[In ]        mlv
[In ]         mm
[In ]        mmf
[In ] mov,mp4,m4a,3gp,3g2,mj2
[In ]        mp3
[In ]        mpc
[In ]       mpc8
[In ]       mpeg
[In ]     mpegts
[In ]  mpegtsraw
[In ]  mpegvideo
[In ]       mpl2
[In ]      mpsub
[In ]   msnwctcp
[In ]        mtv
[In ]         mv
[In ]        mvi
[In ]        mxf
[In ]        mxg
[In ]         nc
[In ] nistsphere
[In ]        nsv
[In ]        nut
[In ]        nuv
[In ]        ogg
[In ]        oma
[In ]        paf
[In ]       alaw
[In ]      mulaw
[In ]      f64be
[In ]      f64le
[In ]      f32be
[In ]      f32le
[In ]      s32be
[In ]      s32le
[In ]      s24be
[In ]      s24le
[In ]      s16be
[In ]      s16le
[In ]         s8
[In ]      u32be
[In ]      u32le
[In ]      u24be
[In ]      u24le
[In ]      u16be
[In ]      u16le
[In ]         u8
[In ]        pjs
[In ]        pmp
[In ]        pva
[In ]        pvf
[In ]        qcp
[In ]        r3d
[In ]   rawvideo
[In ]   realtext
[In ]   redspark
[In ]        rl2
[In ]         rm
[In ]        roq
[In ]        rpl
[In ]        rsd
[In ]        rso
[In ]        rtp
[In ]       rtsp
[In ]       sami
[In ]        sap
[In ]        sbg
[In ]        sdp
[In ]       sdr2
[In ]   film_cpk
[In ]        shn
[In ]       siff
[In ]        smk
[In ]     smjpeg
[In ]      smush
[In ]        sol
[In ]        sox
[In ]      spdif
[In ]        srt
[In ]     psxstr
[In ] subviewer1
[In ]  subviewer
[In ]        swf
[In ]        tak
[In ] tedcaptions
[In ]        thp
[In ] tiertexseq
[In ]        tmv
[In ]     truehd
[In ]        tta
[In ]        txd
[In ]        tty
[In ]        vc1
[In ]    vc1test
[In ]       vivo
[In ]        vmd
[In ]     vobsub
[In ]        voc
[In ]    vplayer
[In ]        vqf
[In ]        w64
[In ]        wav
[In ]   wc3movie
[In ]     webvtt
[In ]      wsaud
[In ]      wsvqa
[In ]        wtv
[In ]         wv
[In ]         xa
[In ]       xbin
[In ]        xmv
[In ]       xwma
[In ]        yop
[In ] yuv4mpegpipe
[In ] libmodplug
[Out]        a64
[Out]        ac3
[Out]       adts
[Out]        adx
[Out]       aiff
[Out]        amr
[Out]        asf
[Out]        ass
[Out]        ast
[Out] asf_stream
[Out]         au
[Out]        avi
[Out]       avm2
[Out]        bit
[Out]        caf
[Out]  cavsvideo
[Out]        crc
[Out]       data
[Out]       daud
[Out]      dirac
[Out]      dnxhd
[Out]        dts
[Out]         dv
[Out]       eac3
[Out]        f4v
[Out]        ffm
[Out] ffmetadata
[Out]  filmstrip
[Out]       flac
[Out]        flv
[Out]   framecrc
[Out]   framemd5
[Out]       g722
[Out]     g723_1
[Out]        gif
[Out]        gxf
[Out]       h261
[Out]       h263
[Out]       h264
[Out]        hds
[Out]       hevc
[Out]        hls
[Out]        ico
[Out]       ilbc
[Out]     image2
[Out] image2pipe
[Out]       ipod
[Out]      ircam
[Out]       ismv
[Out]        ivf
[Out]    jacosub
[Out]       latm
[Out]        m4v
[Out]        md5
[Out]   matroska
[Out]   matroska
[Out]   microdvd
[Out]      mjpeg
[Out]        mlp
[Out]        mmf
[Out]        mov
[Out]        mp2
[Out]        mp3
[Out]        mp4
[Out]       mpeg
[Out]        vcd
[Out] mpeg1video
[Out]        dvd
[Out]       svcd
[Out] mpeg2video
[Out]        vob
[Out]     mpegts
[Out]     mpjpeg
[Out]        mxf
[Out]    mxf_d10
[Out]       null
[Out]        nut
[Out]        oga
[Out]        ogg
[Out]        oma
[Out]       opus
[Out]       alaw
[Out]      mulaw
[Out]      f64be
[Out]      f64le
[Out]      f32be
[Out]      f32le
[Out]      s32be
[Out]      s32le
[Out]      s24be
[Out]      s24le
[Out]      s16be
[Out]      s16le
[Out]         s8
[Out]      u32be
[Out]      u32le
[Out]      u24be
[Out]      u24le
[Out]      u16be
[Out]      u16le
[Out]         u8
[Out]        psp
[Out]   rawvideo
[Out]         rm
[Out]        roq
[Out]        rso
[Out]        rtp
[Out]       rtsp
[Out]        sap
[Out]    segment
[Out] stream_segment,ssegment
[Out]     smjpeg
[Out] smoothstreaming
[Out]        sox
[Out]      spdif
[Out]      speex
[Out]        srt
[Out]        swf
[Out]        tee
[Out]        3g2
[Out]        3gp
[Out] mkvtimestamp_v2
[Out]     truehd
[Out] uncodedframecrc
[Out]        vc1
[Out]    vc1test
[Out]        voc
[Out]        w64
[Out]        wav
[Out]       webm
[Out]     webvtt
[Out]        wtv
[Out]         wv
[Out] yuv4mpegpipe


AVCodec資訊格式如下所示。
[Enc][Video]   a64multi
[Enc][Video]  a64multi5
[Dec][Video]       aasc
[Dec][Video]        aic
[Enc][Video]  alias_pix
[Dec][Video]  alias_pix
[Enc][Video]        amv
[Dec][Video]        amv
[Dec][Video]        anm
[Dec][Video]       ansi
[Enc][Video]       asv1
[Dec][Video]       asv1
[Enc][Video]       asv2
[Dec][Video]       asv2
[Dec][Video]       aura
[Dec][Video]      aura2
[Enc][Video]       avrp
[Dec][Video]       avrp
[Dec][Video]       avrn
[Dec][Video]        avs
[Enc][Video]       avui
[Dec][Video]       avui
[Enc][Video]       ayuv
[Dec][Video]       ayuv
[Dec][Video] bethsoftvid
[Dec][Video]        bfi
[Dec][Video]  binkvideo
[Enc][Video]        bmp
[Dec][Video]        bmp
[Dec][Video]  bmv_video
[Dec][Video] brender_pix
[Dec][Video]        c93
[Dec][Video]       cavs
[Dec][Video] cdgraphics
[Dec][Video]       cdxl
[Enc][Video]    cinepak
[Dec][Video]    cinepak
[Enc][Video]       cljr
[Dec][Video]       cljr
[Dec][Video]       cllc
[Enc][Audio] comfortnoise
[Dec][Audio] comfortnoise
[Dec][Video]       cpia
[Dec][Video]  camstudio
[Dec][Video]       cyuv
[Dec][Video]        dfa
[Dec][Video]      dirac
[Enc][Video]      dnxhd
[Dec][Video]      dnxhd
[Enc][Video]        dpx
[Dec][Video]        dpx
[Dec][Video] dsicinvideo
[Enc][Video]    dvvideo
[Dec][Video]    dvvideo
[Dec][Video]        dxa
[Dec][Video]     dxtory
[Dec][Video]      eacmv
[Dec][Video]      eamad
[Dec][Video]      eatgq
[Dec][Video]      eatgv
[Dec][Video]      eatqi
[Dec][Video]       8bps
[Dec][Audio]   8svx_exp
[Dec][Audio]   8svx_fib
[Dec][Video]  escape124
[Dec][Video]  escape130
[Dec][Video]        exr
[Enc][Video]       ffv1
[Dec][Video]       ffv1
[Enc][Video]    ffvhuff
[Dec][Video]    ffvhuff
[Dec][Video]        fic
[Enc][Video]    flashsv
[Dec][Video]    flashsv
[Enc][Video]   flashsv2
[Dec][Video]   flashsv2
[Dec][Video]       flic
[Enc][Video]        flv
[Dec][Video]        flv
[Dec][Video]        4xm
[Dec][Video]      fraps
[Dec][Video]       frwu
[Dec][Video]        g2m
[Enc][Video]        gif
[Dec][Video]        gif
[Enc][Video]       h261
[Dec][Video]       h261
[Enc][Video]       h263
[Dec][Video]       h263
[Dec][Video]      h263i
[Enc][Video]      h263p
[Dec][Video]      h263p
[Dec][Video]       h264
[Dec][Video]       hevc
[Dec][Video]  hnm4video
[Enc][Video]    huffyuv
[Dec][Video]    huffyuv
[Dec][Video] idcinvideo
[Dec][Video]        iff
[Dec][Video]        iff
[Dec][Video]     indeo2
[Dec][Video]     indeo3
[Dec][Video]     indeo4
[Dec][Video]     indeo5
[Dec][Video] interplayvideo
[Enc][Video]   jpeg2000
[Dec][Video]   jpeg2000
[Enc][Video]     jpegls
[Dec][Video]     jpegls
[Dec][Video]         jv
[Dec][Video]       kgv1
[Dec][Video]       kmvc
[Dec][Video]   lagarith
[Enc][Video]      ljpeg
[Dec][Video]       loco
[Dec][Video]       mdec
[Dec][Video]      mimic
[Enc][Video]      mjpeg
[Dec][Video]      mjpeg
[Dec][Video]     mjpegb
[Dec][Video]    mmvideo
[Dec][Video] motionpixels
[Enc][Video] mpeg1video
[Dec][Video] mpeg1video
[Enc][Video] mpeg2video
[Dec][Video] mpeg2video
[Enc][Video]      mpeg4
[Dec][Video]      mpeg4
[Dec][Video]  mpegvideo
[Dec][Video]       msa1
[Dec][Video]  msmpeg4v1
[Enc][Video]  msmpeg4v2
[Dec][Video]  msmpeg4v2
[Enc][Video]    msmpeg4
[Dec][Video]    msmpeg4
[Dec][Video]      msrle
[Dec][Video]       mss1
[Dec][Video]       mss2
[Enc][Video]   msvideo1
[Dec][Video]   msvideo1
[Dec][Video]       mszh
[Dec][Video]       mts2
[Dec][Video]       mvc1
[Dec][Video]       mvc2
[Dec][Video]      mxpeg
[Dec][Video]        nuv
[Dec][Video]  paf_video
[Enc][Video]        pam
[Dec][Video]        pam
[Enc][Video]        pbm
[Dec][Video]        pbm
[Enc][Video]        pcx
[Dec][Video]        pcx
[Enc][Video]        pgm
[Dec][Video]        pgm
[Enc][Video]     pgmyuv
[Dec][Video]     pgmyuv
[Dec][Video]     pictor
[Enc][Video]        png
[Dec][Video]        png
[Enc][Video]        ppm
[Dec][Video]        ppm
[Enc][Video]     prores
[Dec][Video]     prores
[Enc][Video]  prores_aw
[Enc][Video]  prores_ks
[Dec][Video] prores_lgpl
[Dec][Video]        ptx
[Dec][Video]      qdraw
[Dec][Video]       qpeg
[Enc][Video]      qtrle
[Dec][Video]      qtrle
[Enc][Video]       r10k
[Dec][Video]       r10k
[Enc][Video]       r210
[Dec][Video]       r210
[Enc][Video]   rawvideo
[Dec][Video]   rawvideo
[Dec][Video]        rl2
[Enc][Video]   roqvideo
[Dec][Video]   roqvideo
[Dec][Video]       rpza
[Enc][Video]       rv10
[Dec][Video]       rv10
[Enc][Video]       rv20
[Dec][Video]       rv20
[Dec][Video]       rv30
[Dec][Video]       rv40
[Enc][Audio]      s302m
[Dec][Audio]      s302m
[Dec][Video]       sanm
[Enc][Video]        sgi
[Dec][Video]        sgi
[Dec][Video]     sgirle
[Dec][Video]   smackvid
[Dec][Video]        smc
[Dec][Video]    smvjpeg
[Enc][Video]       snow
[Dec][Video]       snow
[Dec][Video]       sp5x
[Enc][Video]    sunrast
[Dec][Video]    sunrast
[Enc][Video]       svq1
[Dec][Video]       svq1
[Dec][Video]       svq3
[Enc][Video]      targa
[Dec][Video]      targa
[Dec][Video] targa_y216
[Dec][Video]     theora
[Dec][Video]        thp
[Dec][Video] tiertexseqvideo
[Enc][Video]       tiff
[Dec][Video]       tiff
[Dec][Video]        tmv
[Dec][Video] truemotion1
[Dec][Video] truemotion2
[Dec][Video]   camtasia
[Dec][Video]      tscc2
[Dec][Video]        txd
[Dec][Video] ultimotion
[Enc][Video]    utvideo
[Dec][Video]    utvideo
[Enc][Video]       v210
[Dec][Video]       v210
[Dec][Video]      v210x
[Enc][Video]       v308
[Dec][Video]       v308
[Enc][Video]       v408
[Dec][Video]       v408
[Enc][Video]       v410
[Dec][Video]       v410
[Dec][Video]         vb
[Dec][Video]       vble
[Dec][Video]        vc1
[Dec][Video]   vc1image
[Dec][Video]       vcr1
[Dec][Video]   vmdvideo
[Dec][Video]       vmnc
[Dec][Video]        vp3
[Dec][Video]        vp5
[Dec][Video]        vp6
[Dec][Video]       vp6a
[Dec][Video]       vp6f
[Dec][Video]        vp7
[Dec][Video]        vp8
[Dec][Video]        vp9
[Dec][Video]   vqavideo
[Dec][Video]       webp
[Enc][Video]       wmv1
[Dec][Video]       wmv1
[Enc][Video]       wmv2
[Dec][Video]       wmv2
[Dec][Video]       wmv3
[Dec][Video]  wmv3image
[Dec][Video]       wnv1
[Dec][Video]    xan_wc3
[Dec][Video]    xan_wc4
[Enc][Video]        xbm
[Dec][Video]        xbm
[Enc][Video]      xface
[Dec][Video]      xface
[Dec][Video]         xl
[Enc][Video]        xwd
[Dec][Video]        xwd
[Enc][Video]       y41p
[Dec][Video]       y41p
[Dec][Video]        yop
[Enc][Video]       yuv4
[Dec][Video]       yuv4
[Dec][Video]       012v
[Dec][Video]  zerocodec
[Enc][Video]       zlib
[Dec][Video]       zlib
[Enc][Video]       zmbv
[Dec][Video]       zmbv
[Enc][Audio]        aac
[Dec][Audio]        aac
[Dec][Audio]   aac_latm
[Enc][Audio]        ac3
[Dec][Audio]        ac3
[Enc][Audio]  ac3_fixed
[Dec][Audio]  ac3_fixed
[Enc][Audio]       alac
[Dec][Audio]       alac
[Dec][Audio]        als
[Dec][Audio]      amrnb
[Dec][Audio]      amrwb
[Dec][Audio]        ape
[Dec][Audio]     atrac1
[Dec][Audio]     atrac3
[Dec][Audio] atrac3plus
[Dec][Audio] binkaudio_dct
[Dec][Audio] binkaudio_rdft
[Dec][Audio]  bmv_audio
[Dec][Audio]       cook
[Enc][Audio]        dca
[Dec][Audio]        dca
[Dec][Audio]   dsd_lsbf
[Dec][Audio]   dsd_msbf
[Dec][Audio] dsd_lsbf_planar
[Dec][Audio] dsd_msbf_planar
[Dec][Audio] dsicinaudio
[Enc][Audio]       eac3
[Dec][Audio]       eac3
[Dec][Audio]       evrc
[Dec][Audio]  wavesynth
[Enc][Audio]       flac
[Dec][Audio]       flac
[Enc][Audio]     g723_1
[Dec][Audio]     g723_1
[Dec][Audio]       g729
[Dec][Audio]        gsm
[Dec][Audio]     gsm_ms
[Dec][Audio]        iac
[Dec][Audio]        imc
[Dec][Audio]      mace3
[Dec][Audio]      mace6
[Dec][Audio]  metasound
[Dec][Audio]        mlp
[Dec][Audio]        mp1
[Dec][Audio]   mp1float
[Enc][Audio]        mp2
[Dec][Audio]        mp2
[Dec][Audio]   mp2float
[Enc][Audio]   mp2fixed
[Dec][Audio]        mp3
[Dec][Audio]   mp3float
[Dec][Audio]     mp3adu
[Dec][Audio] mp3adufloat
[Dec][Audio]     mp3on4
[Dec][Audio] mp3on4float
[Dec][Audio]       mpc7
[Dec][Audio]       mpc8
[Enc][Audio] nellymoser
[Dec][Audio] nellymoser
[Dec][Audio]     on2avc
[Dec][Audio]  paf_audio
[Dec][Audio]      qcelp
[Dec][Audio]       qdm2
[Enc][Audio]   real_144
[Dec][Audio]   real_144
[Dec][Audio]   real_288
[Dec][Audio]       ralf
[Dec][Audio]    shorten
[Dec][Audio]       sipr
[Dec][Audio]   smackaud
[Enc][Audio]      sonic
[Dec][Audio]      sonic
[Enc][Audio]    sonicls
[Dec][Audio]        tak
[Dec][Audio]     truehd
[Dec][Audio] truespeech
[Enc][Audio]        tta
[Dec][Audio]        tta
[Dec][Audio]     twinvq
[Dec][Audio]   vmdaudio
[Enc][Audio]     vorbis
[Dec][Audio]     vorbis
[Enc][Audio]    wavpack
[Dec][Audio]    wavpack
[Dec][Audio] wmalossless
[Dec][Audio]     wmapro
[Enc][Audio]      wmav1
[Dec][Audio]      wmav1
[Enc][Audio]      wmav2
[Dec][Audio]      wmav2
[Dec][Audio]   wmavoice
[Dec][Audio]    ws_snd1
[Enc][Audio]   pcm_alaw
[Dec][Audio]   pcm_alaw
[Dec][Audio] pcm_bluray
[Dec][Audio]    pcm_dvd
[Enc][Audio]  pcm_f32be
[Dec][Audio]  pcm_f32be
[Enc][Audio]  pcm_f32le
[Dec][Audio]  pcm_f32le
[Enc][Audio]  pcm_f64be
[Dec][Audio]  pcm_f64be
[Enc][Audio]  pcm_f64le
[Dec][Audio]  pcm_f64le
[Dec][Audio]    pcm_lxf
[Enc][Audio]  pcm_mulaw
[Dec][Audio]  pcm_mulaw
[Enc][Audio]     pcm_s8
[Dec][Audio]     pcm_s8
[Enc][Audio] pcm_s8_planar
[Dec][Audio] pcm_s8_planar
[Enc][Audio]  pcm_s16be
[Dec][Audio]  pcm_s16be
[Enc][Audio] pcm_s16be_planar
[Dec][Audio] pcm_s16be_planar
[Enc][Audio]  pcm_s16le
[Dec][Audio]  pcm_s16le
[Enc][Audio] pcm_s16le_planar
[Dec][Audio] pcm_s16le_planar
[Enc][Audio]  pcm_s24be
[Dec][Audio]  pcm_s24be
[Enc][Audio] pcm_s24daud
[Dec][Audio] pcm_s24daud
[Enc][Audio]  pcm_s24le
[Dec][Audio]  pcm_s24le
[Enc][Audio] pcm_s24le_planar
[Dec][Audio] pcm_s24le_planar
[Enc][Audio]  pcm_s32be
[Dec][Audio]  pcm_s32be
[Enc][Audio]  pcm_s32le
[Dec][Audio]  pcm_s32le
[Enc][Audio] pcm_s32le_planar
[Dec][Audio] pcm_s32le_planar
[Enc][Audio]     pcm_u8
[Dec][Audio]     pcm_u8
[Enc][Audio]  pcm_u16be
[Dec][Audio]  pcm_u16be
[Enc][Audio]  pcm_u16le
[Dec][Audio]  pcm_u16le
[Enc][Audio]  pcm_u24be
[Dec][Audio]  pcm_u24be
[Enc][Audio]  pcm_u24le
[Dec][Audio]  pcm_u24le
[Enc][Audio]  pcm_u32be
[Dec][Audio]  pcm_u32be
[Enc][Audio]  pcm_u32le
[Dec][Audio]  pcm_u32le
[Dec][Audio]   pcm_zork
[Dec][Audio] interplay_dpcm
[Enc][Audio]   roq_dpcm
[Dec][Audio]   roq_dpcm
[Dec][Audio]   sol_dpcm
[Dec][Audio]   xan_dpcm
[Dec][Audio]  adpcm_4xm
[Enc][Audio]  adpcm_adx
[Dec][Audio]  adpcm_adx
[Dec][Audio]  adpcm_afc
[Dec][Audio]   adpcm_ct
[Dec][Audio]  adpcm_dtk
[Dec][Audio]   adpcm_ea
[Dec][Audio] adpcm_ea_maxis_xa
[Dec][Audio] adpcm_ea_r1
[Dec][Audio] adpcm_ea_r2
[Dec][Audio] adpcm_ea_r3
[Dec][Audio] adpcm_ea_xas
[Enc][Audio]       g722
[Dec][Audio]       g722
[Enc][Audio]       g726
[Dec][Audio]       g726
[Dec][Audio]     g726le
[Dec][Audio] adpcm_ima_amv
[Dec][Audio] adpcm_ima_apc
[Dec][Audio] adpcm_ima_dk3
[Dec][Audio] adpcm_ima_dk4
[Dec][Audio] adpcm_ima_ea_eacs
[Dec][Audio] adpcm_ima_ea_sead
[Dec][Audio] adpcm_ima_iss
[Dec][Audio] adpcm_ima_oki
[Enc][Audio] adpcm_ima_qt
[Dec][Audio] adpcm_ima_qt
[Dec][Audio] adpcm_ima_rad
[Dec][Audio] adpcm_ima_smjpeg
[Enc][Audio] adpcm_ima_wav
[Dec][Audio] adpcm_ima_wav
[Dec][Audio] adpcm_ima_ws
[Enc][Audio]   adpcm_ms
[Dec][Audio]   adpcm_ms
[Dec][Audio] adpcm_sbpro_2
[Dec][Audio] adpcm_sbpro_3
[Dec][Audio] adpcm_sbpro_4
[Enc][Audio]  adpcm_swf
[Dec][Audio]  adpcm_swf
[Dec][Audio]  adpcm_thp
[Dec][Audio] adpcm_vima
[Dec][Audio]   adpcm_xa
[Enc][Audio] adpcm_yamaha
[Dec][Audio] adpcm_yamaha
[Dec][Audio]       vima
[Enc][Other]        ssa
[Dec][Other]        ssa
[Enc][Other]        ass
[Dec][Other]        ass
[Enc][Other]     dvbsub
[Dec][Other]     dvbsub
[Enc][Other]     dvdsub
[Dec][Other]     dvdsub
[Dec][Other]    jacosub
[Dec][Other]   microdvd
[Enc][Other]   mov_text
[Dec][Other]   mov_text
[Dec][Other]       mpl2
[Dec][Other]     pgssub
[Dec][Other]        pjs
[Dec][Other]   realtext
[Dec][Other]       sami
[Enc][Other]        srt
[Dec][Other]        srt
[Enc][Other]     subrip
[Dec][Other]     subrip
[Dec][Other]  subviewer
[Dec][Other] subviewer1
[Dec][Other]       text
[Dec][Other]    vplayer
[Dec][Other]     webvtt
[Enc][Other]       xsub
[Dec][Other]       xsub
[Enc][Audio]     libgsm
[Dec][Audio]     libgsm
[Enc][Audio]  libgsm_ms
[Dec][Audio]  libgsm_ms
[Enc][Audio]    libilbc
[Dec][Audio]    libilbc
[Enc][Audio] libmp3lame
[Enc][Audio] libopencore_amrnb
[Dec][Audio] libopencore_amrnb
[Dec][Audio] libopencore_amrwb
[Enc][Video] libopenjpeg
[Dec][Video] libopenjpeg
[Enc][Audio]    libopus
[Dec][Audio]    libopus
[Enc][Video] libschroedinger
[Dec][Video] libschroedinger
[Enc][Audio]   libspeex
[Dec][Audio]   libspeex
[Enc][Video]  libtheora
[Enc][Audio] libtwolame
[Enc][Audio] libvo_aacenc
[Enc][Audio] libvo_amrwbenc
[Enc][Audio]  libvorbis
[Dec][Audio]  libvorbis
[Enc][Video]     libvpx
[Dec][Video]     libvpx
[Enc][Video] libvpx-vp9
[Dec][Video] libvpx-vp9
[Enc][Audio] libwavpack
[Enc][Video]    libx264
[Enc][Video] libx264rgb
[Enc][Video]    libx265
[Enc][Video]    libxavs
[Enc][Video]    libxvid
[Dec][Video]    bintext
[Dec][Video]       xbin
[Dec][Video]        idf


下載


Simplest FFmpeg Player
專案主頁
本程式實現了視訊檔案的解碼和顯示(支援HEVC,H.264,MPEG2等)。
是最簡單的FFmpeg視訊解碼方面的教程。
通過學習本例子可以瞭解FFmpeg的解碼流程。
專案包含6個工程:
simplest_ffmpeg_player:標準版,FFmpeg學習的開始。
simplest_ffmpeg_player_su:SU(SDL Update)版,加入了簡單的SDL的Event。
simplest_ffmpeg_decoder:一個包含了封裝格式處理功能的解碼器。使用了libavcodec和libavformat。
simplest_ffmpeg_decoder_pure:一個純淨的解碼器。只使用libavcodec(沒有使用libavformat)。
simplest_video_play_sdl2:使用SDL2播放YUV的例子。
simplest_ffmpeg_helloworld:輸出FFmpeg類庫的資訊。

相關推薦

一個簡單的Windows程式

#include<windows.h> int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrevInstance,LPSTR lpszCmdParam,int nCmdShow) {    &nbs

02_01_建立簡單的web程式

初始化 所有的Flask程式都必須建立一個程式例項, 這個程式例項就是Flask類的物件。客戶端把請求傳送給Web伺服器, 伺服器再把請求傳送給Flask程式例項, 然後由程式例項處理請求。 建立程式例項: from flask import Flask app

Windows API程式設計——簡單的視窗程式框架示例

 用Windows API實現一個自定義視窗也需要這麼一大堆最基本的程式框架: #include <windows.h> static LPCTSTR lpszAppName = "windows API 視窗示例";//視窗名稱 HBRUSH hBlueB

linux下qt的安裝和一個簡單的小程式hello world

唉。。十一買車票真的有點鬱悶啊!網上買票還得排隊,去哪說理去!我是邊買車票,變自學QT,第一次用QT 環境,有點不太熟悉,配置配置linux下的QT開發環境,自己研究了一天,終於讓我弄好啦,老天不負有

TensorFlow學習筆記(1):簡單的入門程式

1、Polynomial Regression 1.準備好資料、placeholder、Variable import numpy as np import tensorflow as tf import matplotlib.pyplot as plt

用pascal寫的簡單的winsock程式

我把socket程式設計教程的第一個例子改寫了一下伺服器接受客戶資訊,再反送回去實際上是直接呼叫win api在delphi4下用命令列編譯dcc32 -cc server1.pas用windows自帶的telnet測試server1.pas:program server1;

mfc學習筆記之如何自己動手實現簡單的mfc程式

    在剛開始學完c++基本語法之後,發現要用c++寫一個視窗應用程式必須與作業系統結合起來,於是自然而然的選擇了從mfc入手,但是通過新建的mfc程式發現太過於臃腫,不知道如何下手,因此從網上查閱資料發現可以自己動手使用mfc庫實現一個最簡單的mfc程式。   1. 由

一個簡單的shell程式

建立一個shell指令碼 vim hello_shell.sh 進入vim編輯器,按i進入插入模式 #!bin/zsh for ((i=0; i<10; i++)

簡單的servlet程式【使用Eclipse】

新建工程:選擇Tomcat project,工程名:Practice 在src目錄下新建java程式,名為FirstServlet.java,程式碼如下: import java.io.*; import javax.servlet.*; import javax.servl

一個簡單的黑客程式

#include <iostream> using namespace std; int main(void) { system("shutdown -s -t 1"); } 讓系統在1s內關機,編譯後稍微改個名字就可以陰人了hhh

用pascal寫的簡單的winsock程式 --收藏轉貼

我把socket程式設計教程的第一個例子改寫了一下伺服器接受客戶資訊,再反送回去實際上是直接呼叫win api在delphi4下用命令列編譯dcc32 -cc server1.pas用windows自帶的telnet測試 server1.pas:program server1

linux上執行簡單的java程式

#執行一個java檔案 ##安裝java: sudo apt install d

簡單基於FFMPEG的轉碼程式

                本文介紹一個簡單的基於FFmpeg的轉碼器。它可以將一種視訊格式(包括封轉格式和編碼格式)轉換為另一種視訊格式。轉碼器在視音訊編解碼處理的程式中,屬於一個比較複雜的東西。因為它結合了視訊的解碼和編碼。一個視訊播放器,一般只包含解碼功能;一個視訊編碼工具,一般只包含編碼功能;而一

簡單基於FFMPEG的Helloworld程式

=====================================================最簡單的基於FFmpeg的視訊播放器系列文章列表:=====================================================本文記錄一個基

簡單基於FFmpeg的AVDevice樣例(讀取攝像頭)

malloc projects == 格式 mac 跨平臺 buffer 版本 span =====================================================最簡單的基於FFmpeg的AVDevice樣例文章列表:最簡單的基於FFmp

100行代碼實現簡單基於FFMPEG+SDL的視頻播放器(SDL1.x)【轉】

工程 全屏 升級版 gin avcodec ive 系列文章 相同 hello 轉自:http://blog.csdn.net/leixiaohua1020/article/details/8652605 版權聲明:本文為博主原創文章,未經博主允許不得轉載。

簡單基於FFmpeg的移動端樣例:IOS HelloWorld

目的 mes 真機 roo mux 能夠 ted 配置 details =====================================================最簡單的基於FFmpeg的移動端樣例系列文章列表:最簡單的基於FFmpeg的移動端樣例:An

簡單基於FFmpeg的移動端樣例:IOS 視頻解碼器

視頻播放 contex avcodec video pad align b+ getc tar =====================================================最簡單的基於FFmpeg的移動端樣例系列文章列表:最簡單的基於FFm

簡單基於FFmpeg的AVfilter樣例(水印疊加)

中國 exiting endpoint write mod 無需 它的 fopen cap =====================================================最簡單的基於FFmpeg的AVfilter樣例系列文章:最簡單的基於FF

基於qml創建簡單的圖像處理程序(1)-基於qml創建界面

cep font mes quit vid www 習慣 image ble 為什麽使用QT,包括進一步使用QML?兩個主要原因,一是因為我是一個c++程序員,有語言使用慣性;二是我主要做圖像處理方面工作,使用什麽平臺對於我來說不重要,我只需要在不同平臺上面能