Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (62)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (3420)

  • FFMPEG Unable to Decode Quicktime QDMC Stream (No decoder for stream)

    23 août 2017, par mbmast

    We are using FFMPEG to convert iPhone video to MP4. This requires an AAC decoder which is not included in any binary distributions of FFMPEG (due to licensing issues). The solution is to download the FFMPEG source and compile it yourself. I’ve done this, apparently incorrectly, as I cannot decode the audio stream. I am getting this error :

    /usr/ffmpeg_builds/ffmpeg -y -i /home/domain/public_html/wp-content/uploads/celebs/main/step-2.mov -threads 12 -vcodec libx264 -acodec libfdk_aac -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -pass 1 -passlogfile /tmp/ffmpeg-passes57a054ee917c4ahl3t/pass-57a054ee91965 /home/domain/public_html/wp-content/uploads/celebs/main/testing-5.mp4
    ffmpeg version N-81827-g81bab10 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
     configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libx264
     libavutil      55. 32.100 / 55. 32.100
     libavcodec     57. 60.100 / 57. 60.100
     libavformat    57. 51.102 / 57. 51.102
     libavdevice    57.  0.102 / 57.  0.102
     libavfilter     6. 63.100 /  6. 63.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  2.100 /  2.  2.100
     libpostproc    54.  0.100 / 54.  0.100
    Guessed Channel Layout for Input Stream #0.1 : mono
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/domain/public_html/wp-content/uploads/celebs/main/step-2.mov':
     Metadata:
       creation_time   : 1998-11-04T16:40:13.000000Z
     Duration: 00:01:00.83, start: 0.000000, bitrate: 110 kb/s
       Stream #0:0(eng): Video: svq1 (SVQ1 / 0x31515653), yuv410p, 160x120, 90 kb/s, 7.51 fps, 7.50 tbr, 600 tbn, 600 tbc (default)
       Metadata:
         creation_time   : 1998-11-04T16:40:13.000000Z
         handler_name    : Apple Alias Data Handler
         encoder         : Sorenson Video
       Stream #0:1(eng): Audio: qdmc (QDMC / 0x434D4451), 44100 Hz, mono (default)
       Metadata:
         creation_time   : 1998-11-04T16:40:13.000000Z
         handler_name    : Apple Alias Data Handler
    No decoder for stream #0:1, filtering impossible
    Error opening filters!

    I suspect that I failed to compile and include the correct codec library when I built FFMPEG. The problem is I don’t know which library I should have built/included. I haven’t found anything that says to decode QDMC audio in FFMPEG you need the XXXXX library.

    Here’s the complete list of decoders that my build supports :

    /usr/ffmpeg_builds/ffmpeg -decoders
    ffmpeg version N-81827-g81bab10 Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
     configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libx264
     libavutil      55. 32.100 / 55. 32.100
     libavcodec     57. 60.100 / 57. 60.100
     libavformat    57. 51.102 / 57. 51.102
     libavdevice    57.  0.102 / 57.  0.102
     libavfilter     6. 63.100 /  6. 63.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  2.100 /  2.  2.100
     libpostproc    54.  0.100 / 54.  0.100
    Decoders:
    V..... = Video
    A..... = Audio
    S..... = Subtitle
    .F.... = Frame-level multithreading
    ..S... = Slice-level multithreading
    ...X.. = Codec is experimental
    ....B. = Supports draw_horiz_band
    .....D = Supports direct rendering method 1
    ------
    V....D 012v                 Uncompressed 4:2:2 10-bit
    V....D 4xm                  4X Movie
    V....D 8bps                 QuickTime 8BPS video
    V....D aasc                 Autodesk RLE
    VF...D aic                  Apple Intermediate Codec
    V....D alias_pix            Alias/Wavefront PIX image
    V....D amv                  AMV Video
    V....D anm                  Deluxe Paint Animation
    V....D ansi                 ASCII/ANSI art
    VF...D apng                 APNG (Animated Portable Network Graphics) image
    V....D asv1                 ASUS V1
    V....D asv2                 ASUS V2
    V....D aura                 Auravision AURA
    V....D aura2                Auravision Aura 2
    V....D avrn                 Avid AVI Codec
    V....D avrp                 Avid 1:1 10-bit RGB Packer
    V....D avs                  AVS (Audio Video Standard) video
    V....D avui                 Avid Meridien Uncompressed
    V....D ayuv                 Uncompressed packed MS 4:4:4:4
    V....D bethsoftvid          Bethesda VID video
    V....D bfi                  Brute Force & Ignorance
    V....D binkvideo            Bink video
    V....D bintext              Binary text
    V....D bmp                  BMP (Windows and OS/2 bitmap)
    V....D bmv_video            Discworld II BMV video
    V....D brender_pix          BRender PIX image
    V....D c93                  Interplay C93
    V....D cavs                 Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)
    V....D cdgraphics           CD Graphics video
    V....D cdxl                 Commodore CDXL video
    VF...D cfhd                 Cineform HD
    V....D cinepak              Cinepak
    V....D cljr                 Cirrus Logic AccuPak
    V....D cllc                 Canopus Lossless Codec
    V....D eacmv                Electronic Arts CMV video (codec cmv)
    V....D cpia                 CPiA video format
    V....D camstudio            CamStudio (codec cscd)
    V....D cyuv                 Creative YUV (CYUV)
    V.S..D dds                  DirectDraw Surface image decoder
    V....D dfa                  Chronomaster DFA
    V.S..D dirac                BBC Dirac VC-2
    VFS..D dnxhd                VC3/DNxHD
    V....D dpx                  DPX (Digital Picture Exchange) image
    V....D dsicinvideo          Delphine Software International CIN video
    V.S..D dvvideo              DV (Digital Video)
    V....D dxa                  Feeble Files/ScummVM DXA
    V....D dxtory               Dxtory
    VFS..D dxv                  Resolume DXV
    V....D escape124            Escape 124
    V....D escape130            Escape 130
    VFS..D exr                  OpenEXR image
    VFS..D ffv1                 FFmpeg video codec #1
    VF..BD ffvhuff              Huffyuv FFmpeg variant
    V.S..D fic                  Mirillis FIC
    V....D flashsv              Flash Screen Video v1
    V....D flashsv2             Flash Screen Video v2
    V....D flic                 Autodesk Animator Flic video
    V...BD flv                  FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1)
    VF...D fraps                Fraps
    V....D frwu                 Forward Uncompressed
    V....D g2m                  Go2Meeting
    V....D gif                  GIF (Graphics Interchange Format)
    V....D h261                 H.261
    V...BD h263                 H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
    V...BD h263i                Intel H.263
    V...BD h263p                H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
    VFS..D h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    VFS..D hap                  Vidvox Hap decoder
    VFS..D hevc                 HEVC (High Efficiency Video Coding)
    V....D hnm4video            HNM 4 video
    V....D hq_hqa               Canopus HQ/HQA
    V.S..D hqx                  Canopus HQX
    VF..BD huffyuv              Huffyuv / HuffYUV
    V....D idcinvideo           id Quake II CIN video (codec idcin)
    V....D idf                  iCEDraw text
    V....D iff                  IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN (codec iff_ilbm)
    V....D indeo2               Intel Indeo 2
    V....D indeo3               Intel Indeo 3
    V....D indeo4               Intel Indeo Video Interactive 4
    V....D indeo5               Intel Indeo Video Interactive 5
    V....D interplayvideo       Interplay MVE video
    VFS..D jpeg2000             JPEG 2000
    V....D jpegls               JPEG-LS
    V....D jv                   Bitmap Brothers JV video
    V....D kgv1                 Kega Game Video
    V....D kmvc                 Karl Morton's video codec
    VF...D lagarith             Lagarith lossless
    V....D loco                 LOCO
    V....D m101                 Matrox Uncompressed SD
    V....D eamad                Electronic Arts Madcow Video (codec mad)
    VFS..D magicyuv             MagicYUV video
    VF...D mdec                 Sony PlayStation MDEC (Motion DECoder)
    VF...D mimic                Mimic
    V....D mjpeg                MJPEG (Motion JPEG)
    V....D mjpegb               Apple MJPEG-B
    V....D mmvideo              American Laser Games MM Video
    V....D motionpixels         Motion Pixels video
    V.S.BD mpeg1video           MPEG-1 video
    V.S.BD mpeg2video           MPEG-2 video
    V.S.BD mpegvideo            MPEG-1 video (codec mpeg2video)
    VF..BD mpeg4                MPEG-4 part 2
    V....D msa1                 MS ATC Screen
    V...BD msmpeg4v1            MPEG-4 part 2 Microsoft variant version 1
    V...BD msmpeg4v2            MPEG-4 part 2 Microsoft variant version 2
    V...BD msmpeg4              MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3)
    V....D msrle                Microsoft RLE
    V....D mss1                 MS Screen 1
    V....D mss2                 MS Windows Media Video V9 Screen
    V....D msvideo1             Microsoft Video 1
    V....D mszh                 LCL (LossLess Codec Library) MSZH
    V....D mts2                 MS Expression Encoder Screen
    V....D mvc1                 Silicon Graphics Motion Video Compressor 1
    V....D mvc2                 Silicon Graphics Motion Video Compressor 2
    V....D mxpeg                Mobotix MxPEG video
    V....D nuv                  NuppelVideo/RTJPEG
    V....D paf_video            Amazing Studio Packed Animation File Video
    V....D pam                  PAM (Portable AnyMap) image
    V....D pbm                  PBM (Portable BitMap) image
    V....D pcx                  PC Paintbrush PCX image
    V....D pgm                  PGM (Portable GrayMap) image
    V....D pgmyuv               PGMYUV (Portable GrayMap YUV) image
    V....D pictor               Pictor/PC Paint
    VF...D png                  PNG (Portable Network Graphics) image
    V....D ppm                  PPM (Portable PixelMap) image
    V.S..D prores               ProRes
    V.S..D prores_lgpl          Apple ProRes (iCodec Pro) (codec prores)
    V....D ptx                  V.Flash PTX image
    V....D qdraw                Apple QuickDraw
    V....D qpeg                 Q-team QPEG
    V....D qtrle                QuickTime Animation (RLE) video
    V....D r10k                 AJA Kona 10-bit RGB Codec
    V....D r210                 Uncompressed RGB 10-bit
    V..... rawvideo             raw video
    V....D rl2                  RL2 video
    V....D roqvideo             id RoQ video (codec roq)
    V....D rpza                 QuickTime video (RPZA)
    V....D rscc                 innoHeim/Rsupport Screen Capture Codec
    V....D rv10                 RealVideo 1.0
    V....D rv20                 RealVideo 2.0
    VF...D rv30                 RealVideo 3.0
    VF...D rv40                 RealVideo 4.0
    V....D sanm                 LucasArts SANM/Smush video
    V....D screenpresso         Screenpresso
    V....D sgi                  SGI image
    V....D sgirle               Silicon Graphics RLE 8-bit video
    VF...D sheervideo           BitJazz SheerVideo
    V....D smackvid             Smacker video (codec smackvideo)
    V....D smc                  QuickTime Graphics (SMC)
    V..... smvjpeg              SMV JPEG
    V....D snow                 Snow
    V....D sp5x                 Sunplus JPEG (SP5X)
    V....D sunrast              Sun Rasterfile image
    V....D svq1                 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
    V...BD svq3                 Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3
    V....D targa                Truevision Targa image
    V....D targa_y216           Pinnacle TARGA CineWave YUV16
    V....D tdsc                 TDSC
    V....D eatgq                Electronic Arts TGQ video (codec tgq)
    V....D eatgv                Electronic Arts TGV video (codec tgv)
    VF..BD theora               Theora
    V....D thp                  Nintendo Gamecube THP video
    V....D tiertexseqvideo      Tiertex Limited SEQ video
    VF...D tiff                 TIFF image
    V....D tmv                  8088flex TMV
    V....D eatqi                Electronic Arts TQI Video (codec tqi)
    V....D truemotion1          Duck TrueMotion 1.0
    V....D truemotion2          Duck TrueMotion 2.0
    V....D truemotion2rt        Duck TrueMotion 2.0 Real Time
    V....D camtasia             TechSmith Screen Capture Codec (codec tscc)
    V....D tscc2                TechSmith Screen Codec 2
    V....D txd                  Renderware TXD (TeXture Dictionary) image
    V....D ultimotion           IBM UltiMotion (codec ulti)
    VF...D utvideo              Ut Video
    V....D v210                 Uncompressed 4:2:2 10-bit
    V....D v210x                Uncompressed 4:2:2 10-bit
    V....D v308                 Uncompressed packed 4:4:4
    V....D v408                 Uncompressed packed QT 4:4:4:4
    V....D v410                 Uncompressed 4:4:4 10-bit
    V....D vb                   Beam Software VB
    VF...D vble                 VBLE Lossless Codec
    V....D vc1                  SMPTE VC-1
    V....D vc1image             Windows Media Video 9 Image v2
    V....D vcr1                 ATI VCR1
    V....D xl                   Miro VideoXL (codec vixl)
    V....D vmdvideo             Sierra VMD video
    V....D vmnc                 VMware Screen Codec / VMware Video
    VF..BD vp3                  On2 VP3
    V....D vp5                  On2 VP5
    V....D vp6                  On2 VP6
    V.S..D vp6a                 On2 VP6 (Flash version, with alpha channel)
    V....D vp6f                 On2 VP6 (Flash version)
    V....D vp7                  On2 VP7
    VFS..D vp8                  On2 VP8
    VF...D vp9                  Google VP9
    VF...D webp                 WebP image
    V...BD wmv1                 Windows Media Video 7
    V...BD wmv2                 Windows Media Video 8
    V....D wmv3                 Windows Media Video 9
    V....D wmv3image            Windows Media Video 9 Image
    V....D wnv1                 Winnov WNV1
    V....D vqavideo             Westwood Studios VQA (Vector Quantized Animation) video (codec ws_vqa)
    V....D xan_wc3              Wing Commander III / Xan
    V....D xan_wc4              Wing Commander IV / Xxan
    V....D xbin                 eXtended BINary text
    V....D xbm                  XBM (X BitMap) image
    V..... xface                X-face image
    V....D xwd                  XWD (X Window Dump) image
    V....D y41p                 Uncompressed YUV 4:1:1 12-bit
    V....D ylc                  YUY2 Lossless Codec
    V..... yop                  Psygnosis YOP Video
    V....D yuv4                 Uncompressed packed 4:2:0
    V....D zerocodec            ZeroCodec Lossless Video
    V....D zlib                 LCL (LossLess Codec Library) ZLIB
    V....D zmbv                 Zip Motion Blocks Video
    A....D 8svx_exp             8SVX exponential
    A....D 8svx_fib             8SVX fibonacci
    A....D aac                  AAC (Advanced Audio Coding)
    A....D aac_fixed            AAC (Advanced Audio Coding) (codec aac)
    A....D libfdk_aac           Fraunhofer FDK AAC (codec aac)
    A....D aac_latm             AAC LATM (Advanced Audio Coding LATM syntax)
    A....D ac3                  ATSC A/52A (AC-3)
    A....D ac3_fixed            ATSC A/52A (AC-3) (codec ac3)
    A....D adpcm_4xm            ADPCM 4X Movie
    A....D adpcm_adx            SEGA CRI ADX ADPCM
    A....D adpcm_afc            ADPCM Nintendo Gamecube AFC
    A....D adpcm_aica           ADPCM Yamaha AICA
    A....D adpcm_ct             ADPCM Creative Technology
    A....D adpcm_dtk            ADPCM Nintendo Gamecube DTK
    A....D adpcm_ea             ADPCM Electronic Arts
    A....D adpcm_ea_maxis_xa    ADPCM Electronic Arts Maxis CDROM XA
    A....D adpcm_ea_r1          ADPCM Electronic Arts R1
    A....D adpcm_ea_r2          ADPCM Electronic Arts R2
    A....D adpcm_ea_r3          ADPCM Electronic Arts R3
    A....D adpcm_ea_xas         ADPCM Electronic Arts XAS
    A....D g722                 G.722 ADPCM (codec adpcm_g722)
    A....D g726                 G.726 ADPCM (codec adpcm_g726)
    A....D g726le               G.726 ADPCM little-endian (codec adpcm_g726le)
    A....D adpcm_ima_amv        ADPCM IMA AMV
    A....D adpcm_ima_apc        ADPCM IMA CRYO APC
    A....D adpcm_ima_dat4       ADPCM IMA Eurocom DAT4
    A....D adpcm_ima_dk3        ADPCM IMA Duck DK3
    A....D adpcm_ima_dk4        ADPCM IMA Duck DK4
    A....D adpcm_ima_ea_eacs    ADPCM IMA Electronic Arts EACS
    A....D adpcm_ima_ea_sead    ADPCM IMA Electronic Arts SEAD
    A....D adpcm_ima_iss        ADPCM IMA Funcom ISS
    A....D adpcm_ima_oki        ADPCM IMA Dialogic OKI
    A....D adpcm_ima_qt         ADPCM IMA QuickTime
    A....D adpcm_ima_rad        ADPCM IMA Radical
    A....D adpcm_ima_smjpeg     ADPCM IMA Loki SDL MJPEG
    A....D adpcm_ima_wav        ADPCM IMA WAV
    A....D adpcm_ima_ws         ADPCM IMA Westwood
    A....D adpcm_ms             ADPCM Microsoft
    A....D adpcm_mtaf           ADPCM MTAF
    A....D adpcm_psx            ADPCM Playstation
    A....D adpcm_sbpro_2        ADPCM Sound Blaster Pro 2-bit
    A....D adpcm_sbpro_3        ADPCM Sound Blaster Pro 2.6-bit
    A....D adpcm_sbpro_4        ADPCM Sound Blaster Pro 4-bit
    A....D adpcm_swf            ADPCM Shockwave Flash
    A....D adpcm_thp            ADPCM Nintendo THP
    A....D adpcm_thp_le         ADPCM Nintendo THP (little-endian)
    A....D adpcm_vima           LucasArts VIMA audio
    A....D adpcm_xa             ADPCM CDROM XA
    A....D adpcm_yamaha         ADPCM Yamaha
    AF...D alac                 ALAC (Apple Lossless Audio Codec)
    A....D amrnb                AMR-NB (Adaptive Multi-Rate NarrowBand) (codec amr_nb)
    A....D amrwb                AMR-WB (Adaptive Multi-Rate WideBand) (codec amr_wb)
    A....D ape                  Monkey's Audio
    A....D atrac1               ATRAC1 (Adaptive TRansform Acoustic Coding)
    A....D atrac3               ATRAC3 (Adaptive TRansform Acoustic Coding 3)
    A....D atrac3plus           ATRAC3+ (Adaptive TRansform Acoustic Coding 3+) (codec atrac3p)
    A....D on2avc               On2 Audio for Video Codec (codec avc)
    A....D binkaudio_dct        Bink Audio (DCT)
    A....D binkaudio_rdft       Bink Audio (RDFT)
    A....D bmv_audio            Discworld II BMV audio
    A....D comfortnoise         RFC 3389 comfort noise generator
    A....D cook                 Cook / Cooker / Gecko (RealAudio G2)
    A..... dsd_lsbf             DSD (Direct Stream Digital), least significant bit first
    A..... dsd_lsbf_planar      DSD (Direct Stream Digital), least significant bit first, planar
    A..... dsd_msbf             DSD (Direct Stream Digital), most significant bit first
    A..... dsd_msbf_planar      DSD (Direct Stream Digital), most significant bit first, planar
    A....D dsicinaudio          Delphine Software International CIN audio
    A....D dss_sp               Digital Speech Standard - Standard Play mode (DSS SP)
    A....D dst                  DST (Digital Stream Transfer)
    A....D dca                  DCA (DTS Coherent Acoustics) (codec dts)
    A....D dvaudio              Ulead DV Audio
    A....D eac3                 ATSC A/52B (AC-3, E-AC-3)
    A....D evrc                 EVRC (Enhanced Variable Rate Codec)
    AF...D flac                 FLAC (Free Lossless Audio Codec)
    A....D g723_1               G.723.1
    A....D g729                 G.729
    A....D gsm                  GSM
    A....D gsm_ms               GSM Microsoft variant
    A....D iac                  IAC (Indeo Audio Coder)
    A....D imc                  IMC (Intel Music Coder)
    A....D interplay_dpcm       DPCM Interplay
    A....D interplayacm         Interplay ACM
    A....D mace3                MACE (Macintosh Audio Compression/Expansion) 3:1
    A....D mace6                MACE (Macintosh Audio Compression/Expansion) 6:1
    A....D metasound            Voxware MetaSound
    A....D mlp                  MLP (Meridian Lossless Packing)
    A....D mp1                  MP1 (MPEG audio layer 1)
    A....D mp1float             MP1 (MPEG audio layer 1) (codec mp1)
    A....D mp2                  MP2 (MPEG audio layer 2)
    A....D mp2float             MP2 (MPEG audio layer 2) (codec mp2)
    A....D mp3                  MP3 (MPEG audio layer 3)
    A....D mp3float             MP3 (MPEG audio layer 3) (codec mp3)
    A....D mp3adu               ADU (Application Data Unit) MP3 (MPEG audio layer 3)
    A....D mp3adufloat          ADU (Application Data Unit) MP3 (MPEG audio layer 3) (codec mp3adu)
    A....D mp3on4               MP3onMP4
    A....D mp3on4float          MP3onMP4 (codec mp3on4)
    A....D als                  MPEG-4 Audio Lossless Coding (ALS) (codec mp4als)
    A....D mpc7                 Musepack SV7 (codec musepack7)
    A....D mpc8                 Musepack SV8 (codec musepack8)
    A....D nellymoser           Nellymoser Asao
    A....D opus                 Opus
    A....D paf_audio            Amazing Studio Packed Animation File Audio
    A....D pcm_alaw             PCM A-law / G.711 A-law
    A....D pcm_bluray           PCM signed 16|20|24-bit big-endian for Blu-ray media
    A....D pcm_dvd              PCM signed 16|20|24-bit big-endian for DVD media
    A....D pcm_f32be            PCM 32-bit floating point big-endian
    A....D pcm_f32le            PCM 32-bit floating point little-endian
    A....D pcm_f64be            PCM 64-bit floating point big-endian
    A....D pcm_f64le            PCM 64-bit floating point little-endian
    A....D pcm_lxf              PCM signed 20-bit little-endian planar
    A....D pcm_mulaw            PCM mu-law / G.711 mu-law
    A....D pcm_s16be            PCM signed 16-bit big-endian
    A....D pcm_s16be_planar     PCM signed 16-bit big-endian planar
    A....D pcm_s16le            PCM signed 16-bit little-endian
    A....D pcm_s16le_planar     PCM signed 16-bit little-endian planar
    A....D pcm_s24be            PCM signed 24-bit big-endian
    A....D pcm_s24daud          PCM D-Cinema audio signed 24-bit
    A....D pcm_s24le            PCM signed 24-bit little-endian
    A....D pcm_s24le_planar     PCM signed 24-bit little-endian planar
    A....D pcm_s32be            PCM signed 32-bit big-endian
    A....D pcm_s32le            PCM signed 32-bit little-endian
    A....D pcm_s32le_planar     PCM signed 32-bit little-endian planar
    A....D pcm_s64be            PCM signed 64-bit big-endian
    A....D pcm_s64le            PCM signed 64-bit little-endian
    A....D pcm_s8               PCM signed 8-bit
    A....D pcm_s8_planar        PCM signed 8-bit planar
    A....D pcm_u16be            PCM unsigned 16-bit big-endian
    A....D pcm_u16le            PCM unsigned 16-bit little-endian
    A....D pcm_u24be            PCM unsigned 24-bit big-endian
    A....D pcm_u24le            PCM unsigned 24-bit little-endian
    A....D pcm_u32be            PCM unsigned 32-bit big-endian
    A....D pcm_u32le            PCM unsigned 32-bit little-endian
    A....D pcm_u8               PCM unsigned 8-bit
    A....D pcm_zork             PCM Zork
    A....D qcelp                QCELP / PureVoice
    A....D qdm2                 QDesign Music Codec 2
    A....D real_144             RealAudio 1.0 (14.4K) (codec ra_144)
    A....D real_288             RealAudio 2.0 (28.8K) (codec ra_288)
    A....D ralf                 RealAudio Lossless
    A....D roq_dpcm             DPCM id RoQ
    A....D s302m                SMPTE 302M
    A....D sdx2_dpcm            DPCM Squareroot-Delta-Exact
    A....D shorten              Shorten
    A....D sipr                 RealAudio SIPR / ACELP.NET
    A....D smackaud             Smacker audio (codec smackaudio)
    A....D sol_dpcm             DPCM Sol
    A..X.D sonic                Sonic
    AF...D tak                  TAK (Tom's lossless Audio Kompressor)
    A....D truehd               TrueHD
    A....D truespeech           DSP Group TrueSpeech
    AF...D tta                  TTA (True Audio)
    A....D twinvq               VQF TwinVQ
    A....D vmdaudio             Sierra VMD audio
    A....D vorbis               Vorbis
    A....D wavesynth            Wave synthesis pseudo-codec
    AF...D wavpack              WavPack
    A....D ws_snd1              Westwood Audio (SND1) (codec westwood_snd1)
    A....D wmalossless          Windows Media Audio Lossless
    A....D wmapro               Windows Media Audio 9 Professional
    A....D wmav1                Windows Media Audio 1
    A....D wmav2                Windows Media Audio 2
    A....D wmavoice             Windows Media Audio Voice
    A....D xan_dpcm             DPCM Xan
    A....D xma1                 Xbox Media Audio 1
    A....D xma2                 Xbox Media Audio 2
    S..... ssa                  ASS (Advanced SubStation Alpha) subtitle (codec ass)
    S..... ass                  ASS (Advanced SubStation Alpha) subtitle
    S..... dvbsub               DVB subtitles (codec dvb_subtitle)
    S..... dvdsub               DVD subtitles (codec dvd_subtitle)
    S..... cc_dec               Closed Caption (EIA-608 / CEA-708) Decoder (codec eia_608)
    S..... pgssub               HDMV Presentation Graphic Stream subtitles (codec hdmv_pgs_subtitle)
    S..... jacosub              JACOsub subtitle
    S..... microdvd             MicroDVD subtitle
    S..... mov_text             3GPP Timed Text subtitle
    S..... mpl2                 MPL2 subtitle
    S..... pjs                  PJS subtitle
    S..... realtext             RealText subtitle
    S..... sami                 SAMI subtitle
    S..... stl                  Spruce subtitle format
    S..... srt                  SubRip subtitle (codec subrip)
    S..... subrip               SubRip subtitle
    S..... subviewer            SubViewer subtitle
    S..... subviewer1           SubViewer1 subtitle
    S..... text                 Raw text subtitle
    S..... vplayer              VPlayer subtitle
    S..... webvtt               WebVTT subtitle
    S..... xsub                 XSUB

    Any idea what I did wrong when building FFMPEG ?

    Here’s a link to the video file that caused the problem : step-2.mov

  • extract subtitle from video ffmpeg. subs.srt : Invalid argument

    3 juillet 2019, par evgeni fotia
       let filename_ext = file.path.split('/').pop()
       let filename = filename_ext.split('.').slice(0, filename_ext.split('.').length-1).join('.')

       var result = ffmpeg({
         MEMFS: [{name: filename_ext, data: buffer}],
         arguments: ["-i", filename_ext, "-map", "0:s:0", "subs.srt"],
         // Ignore stdin read requests
         stdin: function() {},
       });
       // Write out.webm to disk.
       var out = result.MEMFS[0];
       fs.outputFile(pathname + '/' + out.name, Buffer(out.data), 'binary');

    I get the following

       ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with emcc (Emscripten gcc/clang-like replacement) 1.36.7 ()
     configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=png --enable-decoder=mjpeg --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=image2 --enable-demuxer=mp3 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libvpx_vp8 --enable-encoder=libopus --enable-encoder=mjpeg --enable-muxer=webm --enable-muxer=ogg --enable-muxer=null --enable-muxer=image2 --enable-filter=subtitles --enable-libass --enable-libopus --enable-libvpx --extra-cflags=-I../libvpx/dist/include --extra-ldflags=-L../libvpx/dist/lib
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 48.101 / 57. 48.101
     libavformat    57. 41.100 / 57. 41.100
     libavfilter     6. 47.100 /  6. 47.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
    [h264 @ 0x7d7510] Warning: not compiled with thread support, using thread emulation
    [aac @ 0x7d81c0] Warning: not compiled with thread support, using thread emulation
    [ssa @ 0x7d8e30] Warning: not compiled with thread support, using thread emulation
    Input #0, matroska,webm, from 'censored filename.mkv':
     Metadata:
       encoder         : no_variable_data
       creation_time   : 1970-01-01 00:00:00
     Duration: 00:23:40.13, start: 0.000000, bitrate: 2789 kb/s
       Stream #0:0: Video: h264 (High), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
       Metadata:
         BPS             : 2658044
         BPS-eng         : 2658044
         DURATION        : 00:23:40.045000000
         DURATION-eng    : 00:23:40.045000000
         NUMBER_OF_FRAMES: 34047
         NUMBER_OF_FRAMES-eng: 34047
         NUMBER_OF_BYTES : 471817808
         NUMBER_OF_BYTES-eng: 471817808
         _STATISTICS_WRITING_APP: no_variable_data
         _STATISTICS_WRITING_APP-eng: no_variable_data
         _STATISTICS_WRITING_DATE_UTC: 1970-01-01 00:00:00
         _STATISTICS_WRITING_DATE_UTC-eng: 1970-01-01 00:00:00
         _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
         _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
       Stream #0:1(jpn): Audio: aac (LC), 44100 Hz, stereo, fltp (default)
       Metadata:
         BPS             : 128000
         BPS-eng         : 128000
         DURATION        : 00:23:40.109000000
         DURATION-eng    : 00:23:40.109000000
         NUMBER_OF_FRAMES: 61159
         NUMBER_OF_FRAMES-eng: 61159
         NUMBER_OF_BYTES : 22721748
         NUMBER_OF_BYTES-eng: 22721748
         _STATISTICS_WRITING_APP: no_variable_data
         _STATISTICS_WRITING_APP-eng: no_variable_data
         _STATISTICS_WRITING_DATE_UTC: 1970-01-01 00:00:00
         _STATISTICS_WRITING_DATE_UTC-eng: 1970-01-01 00:00:00
         _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
         _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
       Stream #0:2(eng): Subtitle: ass (default)
       Metadata:
         BPS             : 110
         BPS-eng         : 110
         DURATION        : 00:23:25.280000000
         DURATION-eng    : 00:23:25.280000000
         NUMBER_OF_FRAMES: 298
         NUMBER_OF_FRAMES-eng: 298
         NUMBER_OF_BYTES : 19407
         NUMBER_OF_BYTES-eng: 19407
         _STATISTICS_WRITING_APP: no_variable_data
         _STATISTICS_WRITING_APP-eng: no_variable_data
         _STATISTICS_WRITING_DATE_UTC: 1970-01-01 00:00:00
         _STATISTICS_WRITING_DATE_UTC-eng: 1970-01-01 00:00:00
         _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
         _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
       Stream #0:3: Attachment: ttf
       Metadata:
         filename        : OpenSans-Semibold.ttf
         mimetype        : application/x-truetype-font
    [NULL @ 0x9eac90] Unable to find a suitable output format for 'subs.srt'
    subs.srt: Invalid argument

    the file is a mkv video file

    Other info

    Codecs:
    D..... = Decoding supported
    .E.... = Encoding supported
    ..V... = Video codec
    ..A... = Audio codec
    ..S... = Subtitle codec
    ...I.. = Intra frame-only codec
    ....L. = Lossy compression
    .....S = Lossless compression
    -------
    ..VI.. 012v                 Uncompressed 4:2:2 10-bit
    ..V.L. 4xm                  4X Movie
    ..VI.S 8bps                 QuickTime 8BPS video
    ..VIL. a64_multi            Multicolor charset for Commodore 64
    ..VIL. a64_multi5           Multicolor charset for Commodore 64, extended with 5th color (colram)
    ..V..S aasc                 Autodesk RLE
    ..VIL. aic                  Apple Intermediate Codec
    ..VI.S alias_pix            Alias/Wavefront PIX image
    ..VIL. amv                  AMV Video
    ..V.L. anm                  Deluxe Paint Animation
    ..V.L. ansi                 ASCII/ANSI art
    ..V..S apng                 APNG (Animated Portable Network Graphics) image
    ..VIL. asv1                 ASUS V1
    ..VIL. asv2                 ASUS V2
    ..VIL. aura                 Auravision AURA
    ..VIL. aura2                Auravision Aura 2
    ..V... avrn                 Avid AVI Codec
    ..VI.. avrp                 Avid 1:1 10-bit RGB Packer
    ..V.L. avs                  AVS (Audio Video Standard) video
    ..VI.. avui                 Avid Meridien Uncompressed
    ..VI.. ayuv                 Uncompressed packed MS 4:4:4:4
    ..V.L. bethsoftvid          Bethesda VID video
    ..V.L. bfi                  Brute Force & Ignorance
    ..V.L. binkvideo            Bink video
    ..VI.. bintext              Binary text
    ..VI.S bmp                  BMP (Windows and OS/2 bitmap)
    ..V..S bmv_video            Discworld II BMV video
    ..VI.S brender_pix          BRender PIX image
    ..V.L. c93                  Interplay C93
    ..V.L. cavs                 Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)
    ..V.L. cdgraphics           CD Graphics video
    ..VIL. cdxl                 Commodore CDXL video
    ..V.L. cfhd                 Cineform HD
    ..V.L. cinepak              Cinepak
    ..VIL. cljr                 Cirrus Logic AccuPak
    ..VI.S cllc                 Canopus Lossless Codec
    ..V.L. cmv                  Electronic Arts CMV video
    ..V... cpia                 CPiA video format
    ..V..S cscd                 CamStudio
    ..VIL. cyuv                 Creative YUV (CYUV)
    ..V.LS daala                Daala
    ..VILS dds                  DirectDraw Surface image decoder
    ..V.L. dfa                  Chronomaster DFA
    ..V.LS dirac                Dirac
    ..VIL. dnxhd                VC3/DNxHD
    ..VI.S dpx                  DPX (Digital Picture Exchange) image
    ..V.L. dsicinvideo          Delphine Software International CIN video
    ..VIL. dvvideo              DV (Digital Video)
    ..V..S dxa                  Feeble Files/ScummVM DXA
    ..VI.S dxtory               Dxtory
    ..VIL. dxv                  Resolume DXV
    ..V.L. escape124            Escape 124
    ..V.L. escape130            Escape 130
    ..VILS exr                  OpenEXR image
    ..V..S ffv1                 FFmpeg video codec #1
    ..VI.S ffvhuff              Huffyuv FFmpeg variant
    ..V.L. fic                  Mirillis FIC
    ..V..S flashsv              Flash Screen Video v1
    ..V.L. flashsv2             Flash Screen Video v2
    ..V..S flic                 Autodesk Animator Flic video
    ..V.L. flv1                 FLV / Sorenson Spark / Sorenson H.263 (Flash Video)
    ..V..S fraps                Fraps
    ..VI.S frwu                 Forward Uncompressed
    ..V.L. g2m                  Go2Meeting
    ..V..S gif                  GIF (Graphics Interchange Format)
    ..V.L. h261                 H.261
    D.V.L. h263                 H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
    ..V.L. h263i                Intel H.263
    ..V.L. h263p                H.263+ / H.263-1998 / H.263 version 2
    D.V.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    ..VIL. hap                  Vidvox Hap decoder
    D.V.L. hevc                 H.265 / HEVC (High Efficiency Video Coding)
    ..V.L. hnm4video            HNM 4 video
    ..VIL. hq_hqa               Canopus HQ/HQA
    ..VIL. hqx                  Canopus HQX
    ..VI.S huffyuv              HuffYUV
    ..V.L. idcin                id Quake II CIN video
    ..VI.. idf                  iCEDraw text
    ..V.L. iff_ilbm             IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN
    ..V.L. indeo2               Intel Indeo 2
    ..V.L. indeo3               Intel Indeo 3
    ..V.L. indeo4               Intel Indeo Video Interactive 4
    ..V.L. indeo5               Intel Indeo Video Interactive 5
    ..V.L. interplayvideo       Interplay MVE video
    ..VILS jpeg2000             JPEG 2000
    ..VILS jpegls               JPEG-LS
    ..VIL. jv                   Bitmap Brothers JV video
    ..V.L. kgv1                 Kega Game Video
    ..V.L. kmvc                 Karl Morton's video codec
    ..VI.S lagarith             Lagarith lossless
    ..VI.S ljpeg                Lossless JPEG
    ..VI.S loco                 LOCO
    ..VI.S m101                 Matrox Uncompressed SD
    ..V.L. mad                  Electronic Arts Madcow Video
    ..VI.S magicyuv             MagicYUV Lossless Video
    ..VIL. mdec                 Sony PlayStation MDEC (Motion DECoder)
    ..V.L. mimic                Mimic
    DEVIL. mjpeg                Motion JPEG
    ..VIL. mjpegb               Apple MJPEG-B
    ..V.L. mmvideo              American Laser Games MM Video
    ..V.L. motionpixels         Motion Pixels video
    ..V.L. mpeg1video           MPEG-1 video
    D.V.L. mpeg2video           MPEG-2 video
    D.V.L. mpeg4                MPEG-4 part 2
    ..V.L. mpegvideo_xvmc       MPEG-1/2 video XvMC (X-Video Motion Compensation)
    ..V.L. msa1                 MS ATC Screen
    ..V.L. msmpeg4v1            MPEG-4 part 2 Microsoft variant version 1
    ..V.L. msmpeg4v2            MPEG-4 part 2 Microsoft variant version 2
    ..V.L. msmpeg4v3            MPEG-4 part 2 Microsoft variant version 3
    ..V..S msrle                Microsoft RLE
    ..V.L. mss1                 MS Screen 1
    ..VIL. mss2                 MS Windows Media Video V9 Screen
    ..V.L. msvideo1             Microsoft Video 1
    ..VI.S mszh                 LCL (LossLess Codec Library) MSZH
    ..V.L. mts2                 MS Expression Encoder Screen
    ..VIL. mvc1                 Silicon Graphics Motion Video Compressor 1
    ..VIL. mvc2                 Silicon Graphics Motion Video Compressor 2
    ..V.L. mxpeg                Mobotix MxPEG video
    ..V.L. nuv                  NuppelVideo/RTJPEG
    ..V.L. paf_video            Amazing Studio Packed Animation File Video
    ..VI.S pam                  PAM (Portable AnyMap) image
    ..VI.S pbm                  PBM (Portable BitMap) image
    ..VI.S pcx                  PC Paintbrush PCX image
    ..VI.S pgm                  PGM (Portable GrayMap) image
    ..VI.S pgmyuv               PGMYUV (Portable GrayMap YUV) image
    ..VIL. pictor               Pictor/PC Paint
    ..V..S png                  PNG (Portable Network Graphics) image
    ..VI.S ppm                  PPM (Portable PixelMap) image
    ..VIL. prores               Apple ProRes (iCodec Pro)
    ..VIL. ptx                  V.Flash PTX image
    ..VI.S qdraw                Apple QuickDraw
    ..V.L. qpeg                 Q-team QPEG
    ..V..S qtrle                QuickTime Animation (RLE) video
    ..VI.S r10k                 AJA Kona 10-bit RGB Codec
    ..VI.S r210                 Uncompressed RGB 10-bit
    ..VI.S rawvideo             raw video
    ..VIL. rl2                  RL2 video
    ..V.L. roq                  id RoQ video
    ..V.L. rpza                 QuickTime video (RPZA)
    ..V..S rscc                 innoHeim/Rsupport Screen Capture Codec
    ..V.L. rv10                 RealVideo 1.0
    ..V.L. rv20                 RealVideo 2.0
    ..V.L. rv30                 RealVideo 3.0
    ..V.L. rv40                 RealVideo 4.0
    ..V.L. sanm                 LucasArts SANM/SMUSH video
    ..V..S screenpresso         Screenpresso
    ..VI.S sgi                  SGI image
    ..VI.S sgirle               SGI RLE 8-bit
    ..VI.S sheervideo           BitJazz SheerVideo
    ..V.L. smackvideo           Smacker video
    ..V.L. smc                  QuickTime Graphics (SMC)
    ..V... smvjpeg              Sigmatel Motion Video
    ..V.LS snow                 Snow
    ..VIL. sp5x                 Sunplus JPEG (SP5X)
    ..VI.S sunrast              Sun Rasterfile image
    ..V.L. svq1                 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
    ..V.L. svq3                 Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3
    ..VI.S targa                Truevision Targa image
    ..VI.. targa_y216           Pinnacle TARGA CineWave YUV16
    ..V.L. tdsc                 TDSC
    ..V.L. tgq                  Electronic Arts TGQ video
    ..V.L. tgv                  Electronic Arts TGV video
    D.V.L. theora               Theora
    ..VIL. thp                  Nintendo Gamecube THP video
    ..V.L. tiertexseqvideo      Tiertex Limited SEQ video
    ..VI.S tiff                 TIFF image
    ..VIL. tmv                  8088flex TMV
    ..V.L. tqi                  Electronic Arts TQI video
    ..V.L. truemotion1          Duck TrueMotion 1.0
    ..V.L. truemotion2          Duck TrueMotion 2.0
    ..V.L. truemotion2rt        Duck TrueMotion 2.0 Real Time
    ..V..S tscc                 TechSmith Screen Capture Codec
    ..V.L. tscc2                TechSmith Screen Codec 2
    ..VIL. txd                  Renderware TXD (TeXture Dictionary) image
    ..V.L. ulti                 IBM UltiMotion
    ..VI.S utvideo              Ut Video
    ..VI.S v210                 Uncompressed 4:2:2 10-bit
    ..VI.S v210x                Uncompressed 4:2:2 10-bit
    ..VI.. v308                 Uncompressed packed 4:4:4
    ..VI.. v408                 Uncompressed packed QT 4:4:4:4
    ..VI.S v410                 Uncompressed 4:4:4 10-bit
    ..V.L. vb                   Beam Software VB
    ..VI.S vble                 VBLE Lossless Codec
    ..V.L. vc1                  SMPTE VC-1
    ..V.L. vc1image             Windows Media Video 9 Image v2
    ..VIL. vcr1                 ATI VCR1
    ..VIL. vixl                 Miro VideoXL
    ..V.L. vmdvideo             Sierra VMD video
    ..V..S vmnc                 VMware Screen Codec / VMware Video
    D.V.L. vp3                  On2 VP3
    ..V.L. vp5                  On2 VP5
    ..V.L. vp6                  On2 VP6
    ..V.L. vp6a                 On2 VP6 (Flash version, with alpha channel)
    ..V.L. vp6f                 On2 VP6 (Flash version)
    ..V.L. vp7                  On2 VP7
    DEV.L. vp8                  On2 VP8 (encoders: libvpx )
    D.V.L. vp9                  Google VP9
    ..VILS webp                 WebP
    ..V.L. wmv1                 Windows Media Video 7
    ..V.L. wmv2                 Windows Media Video 8
    ..V.L. wmv3                 Windows Media Video 9
    ..V.L. wmv3image            Windows Media Video 9 Image
    ..VIL. wnv1                 Winnov WNV1
    ..V..S wrapped_avframe      AVFrame to AVPacket passthrough
    ..V.L. ws_vqa               Westwood Studios VQA (Vector Quantized Animation) video
    ..V.L. xan_wc3              Wing Commander III / Xan
    ..V.L. xan_wc4              Wing Commander IV / Xxan
    ..VI.. xbin                 eXtended BINary text
    ..VI.S xbm                  XBM (X BitMap) image
    ..VIL. xface                X-face image
    ..VI.S xwd                  XWD (X Window Dump) image
    ..VI.. y41p                 Uncompressed YUV 4:1:1 12-bit
    ..VI.S ylc                  YUY2 Lossless Codec
    ..V.L. yop                  Psygnosis YOP Video
    ..VI.. yuv4                 Uncompressed packed 4:2:0
    ..V..S zerocodec            ZeroCodec Lossless Video
    ..VI.S zlib                 LCL (LossLess Codec Library) ZLIB
    ..V..S zmbv                 Zip Motion Blocks Video
    ..A.L. 4gv                  4GV (Fourth Generation Vocoder)
    ..A.L. 8svx_exp             8SVX exponential
    ..A.L. 8svx_fib             8SVX fibonacci
    D.A.L. aac                  AAC (Advanced Audio Coding)
    ..A.L. aac_latm             AAC LATM (Advanced Audio Coding LATM syntax)
    D.A.L. ac3                  ATSC A/52A (AC-3)
    ..A.L. adpcm_4xm            ADPCM 4X Movie
    ..A.L. adpcm_adx            SEGA CRI ADX ADPCM
    ..A.L. adpcm_afc            ADPCM Nintendo Gamecube AFC
    ..A.L. adpcm_aica           ADPCM Yamaha AICA
    ..A.L. adpcm_ct             ADPCM Creative Technology
    ..A.L. adpcm_dtk            ADPCM Nintendo Gamecube DTK
    ..A.L. adpcm_ea             ADPCM Electronic Arts
    ..A.L. adpcm_ea_maxis_xa    ADPCM Electronic Arts Maxis CDROM XA
    ..A.L. adpcm_ea_r1          ADPCM Electronic Arts R1
    ..A.L. adpcm_ea_r2          ADPCM Electronic Arts R2
    ..A.L. adpcm_ea_r3          ADPCM Electronic Arts R3
    ..A.L. adpcm_ea_xas         ADPCM Electronic Arts XAS
    ..A.L. adpcm_g722           G.722 ADPCM
    ..A.L. adpcm_g726           G.726 ADPCM
    ..A.L. adpcm_g726le         G.726 ADPCM little-endian
    ..A.L. adpcm_ima_amv        ADPCM IMA AMV
    ..A.L. adpcm_ima_apc        ADPCM IMA CRYO APC
    ..A.L. adpcm_ima_dat4       ADPCM IMA Eurocom DAT4
    ..A.L. adpcm_ima_dk3        ADPCM IMA Duck DK3
    ..A.L. adpcm_ima_dk4        ADPCM IMA Duck DK4
    ..A.L. adpcm_ima_ea_eacs    ADPCM IMA Electronic Arts EACS
    ..A.L. adpcm_ima_ea_sead    ADPCM IMA Electronic Arts SEAD
    ..A.L. adpcm_ima_iss        ADPCM IMA Funcom ISS
    ..A.L. adpcm_ima_oki        ADPCM IMA Dialogic OKI
    ..A.L. adpcm_ima_qt         ADPCM IMA QuickTime
    ..A.L. adpcm_ima_rad        ADPCM IMA Radical
    ..A.L. adpcm_ima_smjpeg     ADPCM IMA Loki SDL MJPEG
    ..A.L. adpcm_ima_wav        ADPCM IMA WAV
    ..A.L. adpcm_ima_ws         ADPCM IMA Westwood
    ..A.L. adpcm_ms             ADPCM Microsoft
    ..A.L. adpcm_mtaf           ADPCM MTAF
    ..A.L. adpcm_psx            ADPCM Playstation
    ..A.L. adpcm_sbpro_2        ADPCM Sound Blaster Pro 2-bit
    ..A.L. adpcm_sbpro_3        ADPCM Sound Blaster Pro 2.6-bit
    ..A.L. adpcm_sbpro_4        ADPCM Sound Blaster Pro 4-bit
    ..A.L. adpcm_swf            ADPCM Shockwave Flash
    ..A.L. adpcm_thp            ADPCM Nintendo THP
    ..A.L. adpcm_thp_le         ADPCM Nintendo THP (Little-Endian)
    ..A.L. adpcm_vima           LucasArts VIMA audio
    ..A.L. adpcm_xa             ADPCM CDROM XA
    ..A.L. adpcm_yamaha         ADPCM Yamaha
    ..A..S alac                 ALAC (Apple Lossless Audio Codec)
    ..A.L. amr_nb               AMR-NB (Adaptive Multi-Rate NarrowBand)
    ..A.L. amr_wb               AMR-WB (Adaptive Multi-Rate WideBand)
    ..A..S ape                  Monkey's Audio
    ..A.L. atrac1               ATRAC1 (Adaptive TRansform Acoustic Coding)
    ..A.L. atrac3               ATRAC3 (Adaptive TRansform Acoustic Coding 3)
    ..A.L. atrac3p              ATRAC3+ (Adaptive TRansform Acoustic Coding 3+)
    ..A.L. avc                  On2 Audio for Video Codec
    ..A.L. binkaudio_dct        Bink Audio (DCT)
    ..A.L. binkaudio_rdft       Bink Audio (RDFT)
    ..A.L. bmv_audio            Discworld II BMV audio
    ..A.L. celt                 Constrained Energy Lapped Transform (CELT)
    ..A.L. comfortnoise         RFC 3389 Comfort Noise
    ..A.L. cook                 Cook / Cooker / Gecko (RealAudio G2)
    ..A.L. dsd_lsbf             DSD (Direct Stream Digital), least significant bit first
    ..A.L. dsd_lsbf_planar      DSD (Direct Stream Digital), least significant bit first, planar
    ..A.L. dsd_msbf             DSD (Direct Stream Digital), most significant bit first
    ..A.L. dsd_msbf_planar      DSD (Direct Stream Digital), most significant bit first, planar
    ..A.L. dsicinaudio          Delphine Software International CIN audio
    ..A.L. dss_sp               Digital Speech Standard - Standard Play mode (DSS SP)
    ..A..S dst                  DST (Direct Stream Transfer)
    ..A.LS dts                  DCA (DTS Coherent Acoustics)
    ..A.L. dvaudio              DV audio
    ..A.L. eac3                 ATSC A/52B (AC-3, E-AC-3)
    ..A.L. evrc                 EVRC (Enhanced Variable Rate Codec)
    ..A..S flac                 FLAC (Free Lossless Audio Codec)
    ..A.L. g723_1               G.723.1
    ..A.L. g729                 G.729
    ..A.L. gsm                  GSM
    ..A.L. gsm_ms               GSM Microsoft variant
    ..A.L. iac                  IAC (Indeo Audio Coder)
    ..A.L. ilbc                 iLBC (Internet Low Bitrate Codec)
    ..A.L. imc                  IMC (Intel Music Coder)
    ..A.L. interplay_dpcm       DPCM Interplay
    ..A.L. interplayacm         Interplay ACM
    ..A.L. mace3                MACE (Macintosh Audio Compression/Expansion) 3:1
    ..A.L. mace6                MACE (Macintosh Audio Compression/Expansion) 6:1
    ..A.L. metasound            Voxware MetaSound
    ..A..S mlp                  MLP (Meridian Lossless Packing)
    ..A.L. mp1                  MP1 (MPEG audio layer 1)
    ..A.L. mp2                  MP2 (MPEG audio layer 2)
    D.A.L. mp3                  MP3 (MPEG audio layer 3)
    ..A.L. mp3adu               ADU (Application Data Unit) MP3 (MPEG audio layer 3)
    ..A.L. mp3on4               MP3onMP4
    ..A..S mp4als               MPEG-4 Audio Lossless Coding (ALS)
    ..A.L. musepack7            Musepack SV7
    ..A.L. musepack8            Musepack SV8
    ..A.L. nellymoser           Nellymoser Asao
    DEA.L. opus                 Opus (Opus Interactive Audio Codec) (encoders: libopus )
    ..A.L. paf_audio            Amazing Studio Packed Animation File Audio
    ..A.L. pcm_alaw             PCM A-law / G.711 A-law
    ..A..S pcm_bluray           PCM signed 16|20|24-bit big-endian for Blu-ray media
    ..A..S pcm_dvd              PCM signed 20|24-bit big-endian
    ..A..S pcm_f32be            PCM 32-bit floating point big-endian
    ..A..S pcm_f32le            PCM 32-bit floating point little-endian
    ..A..S pcm_f64be            PCM 64-bit floating point big-endian
    ..A..S pcm_f64le            PCM 64-bit floating point little-endian
    ..A..S pcm_lxf              PCM signed 20-bit little-endian planar
    ..A.L. pcm_mulaw            PCM mu-law / G.711 mu-law
    ..A..S pcm_s16be            PCM signed 16-bit big-endian
    ..A..S pcm_s16be_planar     PCM signed 16-bit big-endian planar
    ..A..S pcm_s16le            PCM signed 16-bit little-endian
    ..A..S pcm_s16le_planar     PCM signed 16-bit little-endian planar
    ..A..S pcm_s24be            PCM signed 24-bit big-endian
    ..A..S pcm_s24daud          PCM D-Cinema audio signed 24-bit
    ..A..S pcm_s24le            PCM signed 24-bit little-endian
    ..A..S pcm_s24le_planar     PCM signed 24-bit little-endian planar
    ..A..S pcm_s32be            PCM signed 32-bit big-endian
    ..A..S pcm_s32le            PCM signed 32-bit little-endian
    ..A..S pcm_s32le_planar     PCM signed 32-bit little-endian planar
    ..A..S pcm_s8               PCM signed 8-bit
    ..A..S pcm_s8_planar        PCM signed 8-bit planar
    ..A..S pcm_u16be            PCM unsigned 16-bit big-endian
    ..A..S pcm_u16le            PCM unsigned 16-bit little-endian
    ..A..S pcm_u24be            PCM unsigned 24-bit big-endian
    ..A..S pcm_u24le            PCM unsigned 24-bit little-endian
    ..A..S pcm_u32be            PCM unsigned 32-bit big-endian
    ..A..S pcm_u32le            PCM unsigned 32-bit little-endian
    ..A..S pcm_u8               PCM unsigned 8-bit
    ..A.L. pcm_zork             PCM Zork
    ..A.L. qcelp                QCELP / PureVoice
    ..A.L. qdm2                 QDesign Music Codec 2
    ..A.L. qdmc                 QDesign Music
    ..A.L. ra_144               RealAudio 1.0 (14.4K)
    ..A.L. ra_288               RealAudio 2.0 (28.8K)
    ..A..S ralf                 RealAudio Lossless
    ..A.L. roq_dpcm             DPCM id RoQ
    ..A..S s302m                SMPTE 302M
    ..A.L. sdx2_dpcm            DPCM Squareroot-Delta-Exact
    ..A..S shorten              Shorten
    ..A.L. sipr                 RealAudio SIPR / ACELP.NET
    ..A.L. smackaudio           Smacker audio
    ..A.L. smv                  SMV (Selectable Mode Vocoder)
    ..A.L. sol_dpcm             DPCM Sol
    ..A... sonic                Sonic
    ..A... sonicls              Sonic lossless
    ..A.L. speex                Speex
    ..A..S tak                  TAK (Tom's lossless Audio Kompressor)
    ..A..S truehd               TrueHD
    ..A.L. truespeech           DSP Group TrueSpeech
    ..A..S tta                  TTA (True Audio)
    ..A.L. twinvq               VQF TwinVQ
    ..A.L. vmdaudio             Sierra VMD audio
    D.A.L. vorbis               Vorbis
    ..A.L. voxware              Voxware RT29 Metasound
    ..A... wavesynth            Wave synthesis pseudo-codec
    ..A.LS wavpack              WavPack
    ..A.L. westwood_snd1        Westwood Audio (SND1)
    ..A..S wmalossless          Windows Media Audio Lossless
    ..A.L. wmapro               Windows Media Audio 9 Professional
    ..A.L. wmav1                Windows Media Audio 1
    ..A.L. wmav2                Windows Media Audio 2
    ..A.L. wmavoice             Windows Media Audio Voice
    ..A.L. xan_dpcm             DPCM Xan
    ..A.L. xma1                 Xbox Media Audio 1
    ..A.L. xma2                 Xbox Media Audio 2
    ..D... bin_data             binary data
    ..D... dvd_nav_packet       DVD Nav packet
    ..D... klv                  SMPTE 336M Key-Length-Value (KLV) metadata
    ..D... otf                  OpenType font
    ..D... timed_id3            timed ID3 metadata
    ..D... ttf                  TrueType font
    D.S... ass                  ASS (Advanced SSA) subtitle (decoders: ssa ass )
    ..S... dvb_subtitle         DVB subtitles
    ..S... dvb_teletext         DVB teletext
    ..S... dvd_subtitle         DVD subtitles
    ..S... eia_608              EIA-608 closed captions
    ..S... hdmv_pgs_subtitle    HDMV Presentation Graphic Stream subtitles
    ..S... hdmv_text_subtitle   HDMV Text subtitle
    ..S... jacosub              JACOsub subtitle
    ..S... microdvd             MicroDVD subtitle
    ..S... mov_text             MOV text
    ..S... mpl2                 MPL2 subtitle
    ..S... pjs                  PJS (Phoenix Japanimation Society) subtitle
    ..S... realtext             RealText subtitle
    ..S... sami                 SAMI subtitle
    ..S... srt                  SubRip subtitle with embedded timing
    ..S... ssa                  SSA (SubStation Alpha) subtitle
    ..S... stl                  Spruce subtitle format
    D.S... subrip               SubRip subtitle (decoders: srt )
    ..S... subviewer            SubViewer subtitle
    ..S... subviewer1           SubViewer v1 subtitle
    ..S... text                 raw UTF-8 text
    ..S... vplayer              VPlayer subtitle
    D.S... webvtt               WebVTT subtitle
    ..S... xsub                 XSUB
  • Setting up OpenCV 2.4.6.1 on Ubuntu 12.04.02

    12 août 2013, par Damilola

    I had previously used OpenCV 2.4.5 with some certain configs and packages on Ubuntu 12.04.1 but had issues upgrading to OpenCV 2.4.6.1 on Ubuntu 12.04.2

    I would like to share some ideas (a compilation of noteworthy information gathered from several sources including SO, ubuntu.org, asklinux.org and many other ; and of course by trying several procedures)

    Below is what eventually got me through.

    NOTE : ensure you uninstall any previous installation of OpenCV, FFMpeg and other dependencies previously installed.

    STEP 1 (install ffmpeg and dependencies)


    # goto http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/
    # download the latest stable opencv such as 2.4.6.1 (http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.5/opencv-2.4.5.1.tar.gz/download) to current directory (such as home or ~/Document)
    # cd /opt
    # tar -xvf /OpenCV-2.4.6.1.tar.gz
    # cd OpenCV-2.4.6.1
    # create a foler under current dir (following previous step, this should be ), called prepare
    # cd prepare
    # Copy the following script to gedit and save as install.sh to current dir, this should be /prepare
    # Check corresponding url used in the script for latest versions of the package and replace as required
    # Open terminal and navigate to location used above
    # sudo chmod +x install.sh
    # ./install

    echo "Removing any pre-installed ffmpeg, x264, and other dependencies (not all the previously installed dependecies)"
    sudo apt-get remove ffmpeg x264 libx264-dev libvpx-dev librtmp0 librtmp-dev libopencv-dev
    sudo apt-get update

    arch=$(uname -m)
    if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then
    flag=0
    else
    flag=1
    fi

    echo "Installing Dependenices"
    sudo apt-get install autoconf automake make g++ curl cmake bzip2 python unzip \
     build-essential checkinstall git git-core libass-dev libgpac-dev \
     libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev \
     libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev

    echo "downloading yasm (assembler used by x264 and FFmpeg)"
    # use git or tarball (not both)
    wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
    tar xzvf yasm-1.2.0.tar.gz
    cd yasm-1.2.0

    echo "installing yasm"
    ./configure
    make
    sudo make install
    cd ..

    echo 'READ NOTE BELOW which was extracted from http://wiki.serviio.org/doku.php?id=build_ffmpeg_linux'
    echo 'New version of x264 contains by default support of OpenCL. If not installed or without sense (example Ubuntu 12.04LTS on VMWare) add to configure additional option --disable-opencl. Without this option ffmpeg could not be configured (ERROR: libx264 not found).'

    echo "downloading x264 (H.264 video encoder)"
    # use git or tarball (not both)
    # git clone http://repo.or.cz/r/x264.git or
    git clone git://git.videolan.org/x264.git
    cd x264
    # wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20130801-2245-stable.tar.bz2
    # tar -xvjf x264-snapshot-20130801-2245-stable.tar.bz2
    # cd x264-snapshot-20130801-2245-stable/

    echo "Installing x264"
    if [ $flag -eq 0 ]; then
    ./configure --enable-static --disable-opencl
    else
    ./configure --enable-shared --enable-pic --disable-opencl
    fi
    make
    sudo make install
    cd ..

    echo "downloading fdk-aac (AAC audio encoder)"
    # use git or tarball (not both)
    git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
    cd fdk-aac

    echo "installing fdk-aac"
    autoreconf -fiv
    ./configure --disable-shared
    make
    sudo make install
    cd ..

    echo "installing libmp3lame-dev (MP3 audio encoder.)"
    sudo apt-get install libmp3lame-dev

    echo "downloading libopus (Opus audio decoder and encoder.)
    wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz
    tar xzvf opus-1.0.3.tar.gz
    cd opus-1.0.3

    echo "installing libopus"
    ./configure --disable-shared
    make
    sudo make install
    cd ..

    echo "downloading libvpx VP8/VP9 video encoder and decoder)
    # use git or tarball (not both)
    git clone --depth 1 http://git.chromium.org/webm/libvpx.git
    cd libvpx
    # wget http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2 (this seems not to be update, but can still be used if the fedoraproject link below is not available))
    # wget http://pkgs.fedoraproject.org/repo/pkgs/libvpx/libvpx-v1.2.0.tar.bz2/400d7c940c5f9d394893d42ae5f463e6/libvpx-v1.2.0.tar.bz2
    # tar xvjf libvpx-v1.2.0.tar.bz2
    # cd libvpx-v1.2.0

    echo "installing libvpx"
    ./configure --disable-examples
    make
    sudo make install
    cd ..

    sudo ldconfig

    echo "downloading ffmpeg"
    # git clone http://repo.or.cz/r/ffmpeg.git
    git clone git://source.ffmpeg.org/ffmpeg.git
    cd ffmpeg/
    # wget http://ffmpeg.org/releases/ffmpeg-2.0.tar.bz2
    # tar -xvjf ffmpeg-2.0.tar.bz2
    # cd ffmpeg-2.0/

    echo "installing ffmpeg"
    if [ $flag -eq 0 ]; then
    ./configure --enable-gpl --enable-libass --enable-libfdk-aac --enable-libopus --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
    else
    ./configure --enable-gpl --enable-libass --enable-libfdk-aac --enable-libopus --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx --enable-shared
    fi

    make
    sudo make install
    hash -r

    cd .. # move up one level to prepare folder
    cd .. # move up one level to opencv folder

    echo "Checking to see if you're using your new ffmpeg"
    ffmpeg 2>&1 | head -n1

    sudo ldconfig

    STEP 2 (Install OpenCV and necessary packages)

    echo "Installing Dependenices"
    sudo apt-get install libopencv-dev
    sudo apt-get install libtiff4-dev libjpeg-dev libjasper-dev

    echo "installing Video I/O libraries, support for Firewire video cameras and video streaming libraries"
    sudo apt-get install libav-tools libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev v4l-utils v4l-conf

    echo "installing the Python development environment and the Python Numerical library"
    sudo apt-get install python-dev python-numpy

    echo "installing the parallel code processing library (the Intel tbb library)"
    sudo apt-get install libtbb-dev

    echo "installing the Qt dev library"
    sudo apt-get install libqt4-dev libgtk2.0-dev

    echo "installing other dependencies (if need be it would upgrade current version of the packages)"
    sudo apt-get install patch subversion ruby librtmp0 librtmp-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libvpx-dev libxvidcore-dev

    echo installing optional packages"
    sudo apt-get install libdc1394-utils libdc1394-22-dev libdc1394-22 libjpeg-dev libpng-dev libtiff-dev libjasper-dev

    STEP 3 (run ldconfig)

    # Open a new terminal window
    # Open /etc/ld.so.conf and check,
    # if the paths "/usr/lib" and "/usr/local/lib" including the quote exist in the file. If not, add them manually or by
       sudo echo "/usr/local/lib" >> /etc/ld.so.conf
       sudo echo "/usr/lib" >> /etc/ld.so.conf
    # execute the following
       sudo ldconfig

    STEP 4

    # still ensure you haven't close the new terminal window open in STEP 3
    # execute the following
       mkdir build
       cd build
       cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_SHARED_LIBS=OFF -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..

       make
       sudo make install

    # add the following to user environment variable ~/.bashrc
       export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
       export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig
    # execute the following
       sudo ldconfig
    # start to use and enjoy opencv, it should have been install into these locations
    #   /usr/local/include/, /usr/local/share/, /usr/local/lib/

    STEP 5 (install v4l : Note : installing v4l-utils after opencv installation works for Ubuntu 12.04.2 & OpenCV 2.4.6.1)

    # still ensure you haven't close the new terminal window open in STEP 3
    # goto http://www.linuxtv.org/downloads/v4l-utils
    # download the latest v4l such as v4l-utils-0.9.5.tar.bz2
    # copy the downloaded file to the current terminal dir (following previous step, this should be /prepare)
    # execute the following
       tar -xvjf v4l-utils-0.9.5.tar.bz2
       cd v4l-utils-0.9.5/
       ./configure
       make
       sudo make install
       cd ..
       cd .. # (to go to )
       sudo ldconfig

    Worth Noting

    # To check the path where opencv & other lib files are stored, do:


    pkg-config --cflags opencv

       (output will come as)
       -I/usr/include/opencv



    pkg-config --libs opencv

       (output will come as)
       -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ --ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann

    # The above paths are needed to compile your opencv programs, as given in the next illustration.

    # write a simple C program to test, by saving below program in a file named DisplayImage.c

    #include
       #include <opencv2></opencv2>highgui/highgui.hpp>

       int main(int argc, char *argv[]) {
           IplImage* img=0; /* pointer to an image */
           printf("Hello\n");

           if(argv[1] != 0)
               img = cvLoadImage(argv[1], 0); // 1 for color
           else
               printf("Enter filename\n");

           if(img != 0) {
               cvNamedWindow("Display", CV_WINDOW_AUTOSIZE); // create a window
               cvShowImage("Display", img); // show image in window
               cvWaitKey(0); // wait until user hits a key
               cvDestroyWindow("Display");
           }
           else
               printf("File not found\n");

           return 0;
       }

    # write a simple C++ program to test, by saving below program in a file named DisplayImage.cpp

    #include
    #include <opencv2></opencv2>opencv.hpp>
    #include <opencv2></opencv2>highgui/highgui.hpp>

    using namespace cv;

    int main( int argc, char** argv )
    {
     Mat image;
     image = imread( argv[1], 1 );

     if( argc != 2 || !image.data )
       {
         printf( "No image data \n" );
         return -1;
       }

     namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
     imshow( "Display Image", image );

     waitKey(0);

     return 0;
    }

    # To compile &amp; run :



    g++  `pkg-config --cflags --libs opencv` &amp;&amp; ./a.out img

    or



    g++ -I/usr/include/opencv -I/usr/local/include -lopencv_core -lopencv_highgui -lopencv_ml -lopencv_imgproc -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann -lopencv_nonfree  &amp;&amp; ./a.out img

    where “img” is the name of any image with extension within the same folder .
    You should be able to see “Hello” and the image in a different window.

    If this runs, Congrats! now you can run any C/C++ program with opencv lib.


    # Now lets simplify the above big command by making a shortcut for it:
    go to your local home directory(cd /home/) and open the .bashrc file using gedit(the file will be hidden). Append the following to the file:



    alias gcv="g++ -I/usr/include/opencv -I/usr/local/include -lopencv_core -lopencv_highgui -lopencv_ml -lopencv_imgproc -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann -lopencv_nonfree"

    and save. Close the terminal and open it again.(as this process requires relogin of the terminal)

    # Now, go to directory containing a sample program &amp; do



    gcv  &amp;&amp; ./a.out

    or



    gcv
       ./a.out input_img.jpg

    As you can see the commands now become similar to $cc filename.c, $./a.out which are used normally for compiling and executing C/C++ programs.


    Some ways to check whether all lib files are installed-

    apt-cache search opencv

    returns :

    libcv-dev - Translation package for libcv-dev
    libcv2.3 - computer vision library - libcv* translation package
    libcvaux-dev - Translation package for libcvaux-dev
    libcvaux2.3 - computer vision library - libcvaux translation package
    libhighgui-dev - Translation package for libhighgui-dev
    libhighgui2.3 - computer vision library - libhighgui translation package
    libopencv-calib3d-dev - development files for libopencv-calib3d
    libopencv-calib3d2.3 - computer vision Camera Calibration library
    libopencv-contrib-dev - development files for libopencv-contrib
    libopencv-contrib2.3 - computer vision contrib library
    libopencv-core-dev - development files for libopencv-core
    libopencv-core2.3 - computer vision core library
    libopencv-dev - development files for opencv
    libopencv-features2d-dev - development files for libopencv-features2d
    libopencv-features2d2.3 - computer vision Feature Detection and Descriptor Extraction library
    libopencv-flann-dev - development files for libopencv-flann
    libopencv-flann2.3 - computer vision Clustering and Search in Multi-Dimensional spaces library
    libopencv-gpu-dev - development files for libopencv-gpu
    libopencv-gpu2.3 - computer vision GPU Processing library
    libopencv-highgui-dev - development files for libopencv-highgui
    libopencv-highgui2.3 - computer vision High-level GUI and Media I/O library
    libopencv-imgproc-dev - development files for libopencv-imgproc
    libopencv-imgproc2.3 - computer vision Image Processing library
    libopencv-legacy-dev - development files for libopencv-legacy
    libopencv-legacy2.3 - computer vision legacy library
    libopencv-ml-dev - development files for libopencv-ml
    libopencv-ml2.3 - computer vision Machine Learning library
    libopencv-objdetect-dev - development files for libopencv-objdetect
    libopencv-objdetect2.3 - computer vision Object Detection library
    libopencv-video-dev - development files for libopencv-video
    libopencv-video2.3 - computer vision Video analysis library
    opencv-doc - OpenCV documentation and examples
    python-opencv - Python bindings for the computer vision library