Recherche avancée

Médias (91)

Autres articles (74)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Soumettre bugs et patchs

    10 avril 2011

    Un logiciel n’est malheureusement jamais parfait...
    Si vous pensez avoir mis la main sur un bug, reportez le dans notre système de tickets en prenant bien soin de nous remonter certaines informations pertinentes : le type de navigateur et sa version exacte avec lequel vous avez l’anomalie ; une explication la plus précise possible du problème rencontré ; si possibles les étapes pour reproduire le problème ; un lien vers le site / la page en question ;
    Si vous pensez avoir résolu vous même le bug (...)

  • Installation en mode standalone

    4 février 2011, par

    L’installation de la distribution MediaSPIP se fait en plusieurs étapes : la récupération des fichiers nécessaires. À ce moment là deux méthodes sont possibles : en installant l’archive ZIP contenant l’ensemble de la distribution ; via SVN en récupérant les sources de chaque modules séparément ; la préconfiguration ; l’installation définitive ;
    [mediaspip_zip]Installation de l’archive ZIP de MediaSPIP
    Ce mode d’installation est la méthode la plus simple afin d’installer l’ensemble de la distribution (...)

Sur d’autres sites (7795)

  • Why i got an error with ffmpeg when i'm trying to merge 2 video file with the audio of a third video file multiple time in 1 line ?

    28 août 2020, par Niron

    I have 1 video file that i want to concat with an other video file using the audio of a third video file, and this 5 time in a line.
The only file that don't change is the first video file.
So i tried to run this command :

    


    ./ffmpeg.exe -i Video\\decompte.mp4 -i "Video\\Breaking Bad_OPENING_Opening.mp4" -i "TempVideo\\Breaking 
Bad_OPENING_Opening.mp4" -i "Video\\The 100_OPENING_Opening.mp4" -i "TempVideo\\The 
100_OPENING_Opening.mp4" -i "Video\\Stranger Things_OPENING_Opening.mp4" -i "TempVideo\\Stranger 
Things_OPENING_Opening.mp4" -i "Video\\Lucifer_OPENING_Opening.mp4" -i 
"TempVideo\\Lucifer_OPENING_Opening.mp4" -i "Video\\Black Mirror_OPENING_Opening.mp4" -i 
"TempVideo\\Black Mirror_OPENING_Opening.mp4" -filter_complex "
[0:0]scale=1280:720:force_original_aspect_ratio=1[v0]; 
[2:v]scale=1280:720:force_original_aspect_ratio=1[v2]; 
[4:v]scale=1280:720:force_original_aspect_ratio=1[v4]; 
[6:v]scale=1280:720:force_original_aspect_ratio=1[v6]; 
[8:v]scale=1280:720:force_original_aspect_ratio=1[v8]; 
[10:v]scale=1280:720:force_original_aspect_ratio=1[v10]; 
[v0][v2][1:a][v0][v4][3:a][v0][v6][5:a][v0][v8][7:a][v0][v10][9:a]concat=n=5:v=2:a=1[outv][outa]"
 -map "[outv]" -map "[outa]" 637342141280804229.mp4


    


    But when i run this command i get an error but i don't understand why :

    


    ffmpeg version git-2019-11-22-27c6c92 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20191010
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 36.100 / 56. 36.100
  libavcodec     58. 62.100 / 58. 62.100
  libavformat    58. 35.100 / 58. 35.100
  libavdevice    58.  9.101 / 58.  9.101
  libavfilter     7. 66.100 /  7. 66.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Video\decompte.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2020-04-02T15:15:56.000000Z
  Duration: 00:00:20.00, start: 0.000000, bitrate: 475 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1600x900, 468 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2020-04-02T15:15:56.000000Z
      handler_name    : ?Mainconcept Video Media Handler
      encoder         : AVC Coding
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'Video\Breaking Bad_OPENING_Opening.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.35.100
  Duration: 00:00:17.60, start: 0.000000, bitrate: 399 kb/s
    Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 426x240 [SAR 1:1 DAR 71:40], 275 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'TempVideo\Breaking Bad_OPENING_Opening.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.35.100
  Duration: 00:00:02.02, start: 0.000000, bitrate: 551 kb/s
    Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 426x240 [SAR 1:1 DAR 71:40], 417 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #3, mov,mp4,m4a,3gp,3g2,mj2, from 'Video\The 100_OPENING_Opening.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.35.100
  Duration: 00:00:34.13, start: 0.000000, bitrate: 3925 kb/s
    Stream #3:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3794 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #3:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #4, mov,mp4,m4a,3gp,3g2,mj2, from 'TempVideo\The 100_OPENING_Opening.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.35.100
  Duration: 00:00:02.02, start: 0.000000, bitrate: 6158 kb/s
    Stream #4:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 6076 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #4:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #5, mov,mp4,m4a,3gp,3g2,mj2, from 'Video\Stranger Things_OPENING_Opening.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.35.100
  Duration: 00:00:53.45, start: 0.000000, bitrate: 1015 kb/s
    Stream #5:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 881 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
    Stream #5:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #6, mov,mp4,m4a,3gp,3g2,mj2, from 'TempVideo\Stranger Things_OPENING_Opening.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.35.100
  Duration: 00:00:02.02, start: 0.000000, bitrate: 1186 kb/s
    Stream #6:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1058 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
    Stream #6:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #7, mov,mp4,m4a,3gp,3g2,mj2, from 'Video\Lucifer_OPENING_Opening.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.35.100
  Duration: 00:03:24.17, start: 0.000000, bitrate: 178 kb/s
    Stream #7:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 43 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 07/28/2020.
    Stream #7:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 126 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #8, mov,mp4,m4a,3gp,3g2,mj2, from 'TempVideo\Lucifer_OPENING_Opening.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.35.100
  Duration: 00:00:02.02, start: 0.000000, bitrate: 239 kb/s
    Stream #8:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 99 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 07/28/2020.
    Stream #8:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #9, mov,mp4,m4a,3gp,3g2,mj2, from 'Video\Black Mirror_OPENING_Opening.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2018-03-13T16:58:18.000000Z
  Duration: 00:00:19.04, start: 0.000000, bitrate: 314 kb/s
    Stream #9:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x718 [SAR 1:1 DAR 640:359], 184 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2018-03-13T16:58:18.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 03/13/2018.
    Stream #9:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2018-03-13T16:58:18.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 03/13/2018.
Input #10, mov,mp4,m4a,3gp,3g2,mj2, from 'TempVideo\Black Mirror_OPENING_Opening.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.35.100
  Duration: 00:00:02.02, start: 0.000000, bitrate: 351 kb/s
    Stream #10:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x718 [SAR 1:1 DAR 640:359], 211 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 03/13/2018.
    Stream #10:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc. Created on: 03/13/2018.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000020b6fd5cb80] Invalid stream specifier: v0.
    Last message repeated 1 times
Stream specifier 'v0' in filtergraph description [0:0]scale=1280:720:force_original_aspect_ratio=1[v0]; [2:v]scale=1280:720:force_original_aspect_ratio=1[v2]; [4:v]scale=1280:720:force_original_aspect_ratio=1[v4]; [6:v]scale=1280:720:force_original_aspect_ratio=1[v6]; [8:v]scale=1280:720:force_original_aspect_ratio=1[v8]; [10:v]scale=1280:720:force_original_aspect_ratio=1[v10]; [v0][v2][1:a][v0][v4][3:a][v0][v6][5:a][v0][v8][7:a][v0][v10][9:a]concat=n=5:v=2:a=1[outv][outa] matches no streams.



    


    Please someone can help me because i'm stuck with this.

    


  • ffmpeg-python error, cannot load mp4 encoder

    19 août 2020, par tristan_jia

    This error came when I just try a simple demo from the page of ffmpeg-python :

    


    import ffmpeg
stream = ffmpeg.input('human_face.mp4')
stream = ffmpeg.hflip(stream)
stream = ffmpeg.output(stream, 'new_human_face.mp4')
ffmpeg.run(stream)


    


    And the output goes like :

    


    ...&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;human_face.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2mp41&#xA;    encoder         : Lavf58.49.100&#xA;  Duration: 00:00:12.45, start: 0.000000, bitrate: 742 kb/s&#xA;    Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), none, 256x256, 741 kb/s, 20 fps, 20 tbr, 10240 tbn, 10240 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;Automatic encoder selection failed for output stream #0:0. Default encoder for format mp4 (codec mpeg4) is probably disabled or this build of ffmpeg does not include that codec. Please choose an encoder manually.&#xA;Error selecting an encoder for stream 0:0&#xA;Traceback (most recent call last):&#xA;  File "<stdin>", line 1, in <module>&#xA;  File "/home/tristan_jia/workspace/py3.6/venv/lib/python3.6/site-packages/ffmpeg/_run.py", line 325, in run&#xA;    raise Error(&#x27;ffmpeg&#x27;, out, err)&#xA;</module></stdin>

    &#xA;

    I think the most important log is :"Automatic encoder selection failed for output stream #0:0. Default encoder for format mp4 (codec mpeg4) is probably disabled or this build of ffmpeg does not include that codec. Please choose an encoder manually."

    &#xA;

    I've reinstalled the ffmpeg package but the error remains.

    &#xA;


    &#xA;

    Appended 1 :&#xA;Thanks for the comment from @HernánAlarcón :

    &#xA;

      &#xA;
    • the version is 3.4.4.
    • &#xA;

    • the output of ffmpeg -encoders is :
    • &#xA;

    &#xA;

    (venv) tristan_jia@linux-ftbv:~/.../data> ffmpeg -encoders&#xA;ffmpeg version 3.4.4 Copyright (c) 2000-2018 the FFmpeg developers&#xA;  built with gcc 7 (SUSE Linux)&#xA;  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags=&#x27;-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g&#x27; --optflags=&#x27;-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g&#x27; --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-libcdio --enable-gnutls --enable-ladspa --disable-cuda --disable-cuvid --enable-libass --enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau --enable-muxers --enable-demuxers --disable-encoders --disable-decoders --disable-decoder=&#x27;mpeg4,h263,h264,hevc,vc1&#x27; --enable-encoder=&#x27;apng,ass,ayuv,bmp,ffv1,ffvhuff,flac,gif,huffyuv,jpegls,libgsm,libmp3lame,libopenjpeg,libopus,libschroedinger,libspeex,libtheora,libtwolame,libvorbis,libvpx_vp8,libvpx_vp9,libwebp,libwebp_anim,mjpeg,mp2,mp2fixed,opus,pam,pbm,pcm_alaw,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,png,ppm,sgi,srt,ssa,sunrast,targa,text,tiff,v210,v308,v408,v410,vorbis,xbm,xwd,y41p,yuv4,zlib,&#x27; --enable-decoder=&#x27;ac3,ansi,apng,ass,ayuv,bmp,dirac,exr,ffv1,ffvhuff,ffwavesynth,flac,gif,gsm,huffyuv,libcelt,libgsm,libopenjpeg,libopus,libschroedinger,libspeex,libvorbis,libvpx_vp8,libvpx_vp9,mjpeg,mpeg1video,mpeg2video,,mp1,mp1float,mp2,mp2float,mp3,mp3float,opus,pam,pbm,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planar,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pcx,pgm,pgmyuv,pgssub,png,ppm,rawvideo,sgi,srt,ssa,sunrast,targa,text,theora,tiff,v210,v210x,v308,v408,v410,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,webp,xbm,xwd,y41p,yuv4,zlib,&#x27;&#xA;  libavutil      55. 78.100 / 55. 78.100&#xA;  libavcodec     57.107.100 / 57.107.100&#xA;  libavformat    57. 83.100 / 57. 83.100&#xA;  libavdevice    57. 10.100 / 57. 10.100&#xA;  libavfilter     6.107.100 /  6.107.100&#xA;  libavresample   3.  7.  0 /  3.  7.  0&#xA;  libswscale      4.  8.100 /  4.  8.100&#xA;  libswresample   2.  9.100 /  2.  9.100&#xA;  libpostproc    54.  7.100 / 54.  7.100&#xA;Encoders:&#xA; V..... = Video&#xA; A..... = Audio&#xA; S..... = Subtitle&#xA; .F.... = Frame-level multithreading&#xA; ..S... = Slice-level multithreading&#xA; ...X.. = Codec is experimental&#xA; ....B. = Supports draw_horiz_band&#xA; .....D = Supports direct rendering method 1&#xA; ------&#xA; V..... apng                 APNG (Animated Portable Network Graphics) image&#xA; V..... ayuv                 Uncompressed packed MS 4:4:4:4&#xA; V..... bmp                  BMP (Windows and OS/2 bitmap)&#xA; V.S... ffv1                 FFmpeg video codec #1&#xA; VF.... ffvhuff              Huffyuv FFmpeg variant&#xA; V..... gif                  GIF (Graphics Interchange Format)&#xA; VF.... huffyuv              Huffyuv / HuffYUV&#xA; VF.... libopenjpeg          OpenJPEG JPEG 2000 (codec jpeg2000)&#xA; VF.... jpegls               JPEG-LS&#xA; VFS... mjpeg                MJPEG (Motion JPEG)&#xA; V..... pam                  PAM (Portable AnyMap) image&#xA; V..... pbm                  PBM (Portable BitMap) image&#xA; V..... pcx                  PC Paintbrush PCX image&#xA; V..... pgm                  PGM (Portable GrayMap) image&#xA; V..... pgmyuv               PGMYUV (Portable GrayMap YUV) image&#xA; VF.... png                  PNG (Portable Network Graphics) image&#xA; V..... ppm                  PPM (Portable PixelMap) image&#xA; V..... sgi                  SGI image&#xA; V..... sunrast              Sun Rasterfile image&#xA; V..... targa                Truevision Targa image&#xA; V..... libtheora            libtheora Theora (codec theora)&#xA; VF.... tiff                 TIFF image&#xA; V..... v210                 Uncompressed 4:2:2 10-bit&#xA; V..... v308                 Uncompressed packed 4:4:4&#xA; V..... v408                 Uncompressed packed QT 4:4:4:4&#xA; V..... v410                 Uncompressed 4:4:4 10-bit&#xA; V..... libvpx               libvpx VP8 (codec vp8)&#xA; V..... libvpx-vp9           libvpx VP9 (codec vp9)&#xA; V..... libwebp_anim         libwebp WebP image (codec webp)&#xA; V..... libwebp              libwebp WebP image (codec webp)&#xA; V..... xbm                  XBM (X BitMap) image&#xA; V..... xwd                  XWD (X Window Dump) image&#xA; V..... y41p                 Uncompressed YUV 4:1:1 12-bit&#xA; V..... yuv4                 Uncompressed packed 4:2:0&#xA; VF.... zlib                 LCL (LossLess Codec Library) ZLIB&#xA; A..... flac                 FLAC (Free Lossless Audio Codec)&#xA; A..... libgsm               libgsm GSM (codec gsm)&#xA; A..... mp2                  MP2 (MPEG audio layer 2)&#xA; A..... mp2fixed             MP2 fixed point (MPEG audio layer 2) (codec mp2)&#xA; A..... libtwolame           libtwolame MP2 (MPEG audio layer 2) (codec mp2)&#xA; A..... libmp3lame           libmp3lame MP3 (MPEG audio layer 3) (codec mp3)&#xA; A..X.. opus                 Opus&#xA; A..... libopus              libopus Opus (codec opus)&#xA; A..... pcm_alaw             PCM A-law / G.711 A-law&#xA; A..... pcm_f32be            PCM 32-bit floating point big-endian&#xA; A..... pcm_f32le            PCM 32-bit floating point little-endian&#xA; A..... pcm_f64be            PCM 64-bit floating point big-endian&#xA; A..... pcm_f64le            PCM 64-bit floating point little-endian&#xA; A..... pcm_mulaw            PCM mu-law / G.711 mu-law&#xA; A..... pcm_s16be            PCM signed 16-bit big-endian&#xA; A..... pcm_s16be_planar     PCM signed 16-bit big-endian planar&#xA; A..... pcm_s16le            PCM signed 16-bit little-endian&#xA; A..... pcm_s16le_planar     PCM signed 16-bit little-endian planar&#xA; A..... pcm_s24be            PCM signed 24-bit big-endian&#xA; A..... pcm_s24le            PCM signed 24-bit little-endian&#xA; A..... pcm_s24le_planar     PCM signed 24-bit little-endian planar&#xA; A..... pcm_s32be            PCM signed 32-bit big-endian&#xA; A..... pcm_s32le            PCM signed 32-bit little-endian&#xA; A..... pcm_s32le_planar     PCM signed 32-bit little-endian planar&#xA; A..... pcm_s8               PCM signed 8-bit&#xA; A..... pcm_s8_planar        PCM signed 8-bit planar&#xA; A..... pcm_u16be            PCM unsigned 16-bit big-endian&#xA; A..... pcm_u16le            PCM unsigned 16-bit little-endian&#xA; A..... pcm_u24be            PCM unsigned 24-bit big-endian&#xA; A..... pcm_u24le            PCM unsigned 24-bit little-endian&#xA; A..... pcm_u32be            PCM unsigned 32-bit big-endian&#xA; A..... pcm_u32le            PCM unsigned 32-bit little-endian&#xA; A..... pcm_u8               PCM unsigned 8-bit&#xA; A..... libspeex             libspeex Speex (codec speex)&#xA; A..X.. vorbis               Vorbis&#xA; A..... libvorbis            libvorbis (codec vorbis)&#xA; S..... ssa                  ASS (Advanced SubStation Alpha) subtitle (codec ass)&#xA; S..... ass                  ASS (Advanced SubStation Alpha) subtitle&#xA; S..... srt                  SubRip subtitle (codec subrip)&#xA; S..... text                 Raw text subtitle&#xA;&#x27;&#x27;&#x27;&#xA;

    &#xA;

  • How to overlay 2 videos, one is main second one is overlaying it, and play sound simultaneously. using FFMPEG in ANDROID STUDIO

    6 août 2020, par Dusan Lilic

    as title say I'm trying to overlay 2 videos and play sound simultaneously. So far i managed to put 1 video over another using this command :

    &#xA;

    String[] command = {"-i", mainVideoPath, "-vf",&#xA;            "movie=" &#x2B; overlayVideo &#x2B; ", scale=300:-1[inner]; [in][inner]overlay=10:10[out]" ,combinedVideoOutput};&#xA;

    &#xA;

    and this works but I have 3 problems here.&#xA;First, video is rotated by 90 degrees (overlay video), second Audio is played only from main video (I want to play sound from both videos simultaneously), and third overlay video is longer (for example : overlayVideo duration is 10 seconds and main video last 7 seconds) then mainVideo, so i want to final video last as long as mainVideo, as soon as mainVideo finish, overlayVideo should also stop (need to cut it prolly ?)

    &#xA;

    String[] command = {"-i", mainVideoPath, "-i", overlayVideo ,&#xA;            "-filter_complex", "[1:v][0:v]scale2ref=(256/256)*ih/8/sar:ih/8[wm][base];[base][wm]overlay=10:10" ,combinedVideoOutput};&#xA;

    &#xA;

    Using this command i have 2 problems same as above except video is not rotated here.&#xA;I have to say that I'm not very familiar with ffmpeg commands. I was trying to figure it out from documentation link to documentation but without any success.&#xA;I know that I'm missing some filters like -map merge or something but can't figure it out.&#xA;Thanks in advance !

    &#xA;

    EDIT1 :&#xA;This is logcat from second commad as asked

    &#xA;

    D/LISKO: ffmpeg version n4.0-39-gda39990 Copyright (c) 2000-2018 the FFmpeg developers&#xA;      built with gcc 4.9.x (GCC) 20150123 (prerelease)&#xA;D/LISKO:   configuration: --target-os=linux --cross-prefix=/root/bravobit/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/root/bravobit/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-ffprobe --enable-libopus --enable-libvorbis --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-libvpx --enable-libass --enable-yasm --enable-pthreads --disable-debug --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-linux-perf --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --enable-nonfree --enable-network --enable-avresample --enable-avformat --enable-avcodec --enable-indev=lavfi --enable-hwaccels --enable-ffmpeg --enable-zlib --enable-gpl --enable-small --enable-nonfree --pkg-config=pkg-config --pkg-config-flags=--static --prefix=/root/bravobit/ffmpeg-android/build/armeabi-v7a --extra-cflags=&#x27;-I/root/bravobit/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all&#x27; --extra-ldflags=&#x27;-L/root/bravobit/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie&#x27; --extra-cxxflags=&#xA;D/LISKO:   libavutil      56. 14.100 / 56. 14.100&#xA;      libavcodec     58. 18.100 / 58. 18.100&#xA;      libavformat    58. 12.100 / 58. 12.100&#xA;      libavdevice    58.  3.100 / 58.  3.100&#xA;      libavfilter     7. 16.100 /  7. 16.100&#xA;D/LISKO:   libavresample   4.  0.  0 /  4.  0.  0&#xA;      libswscale      5.  1.100 /  5.  1.100&#xA;D/LISKO:   libswresample   3.  1.100 /  3.  1.100&#xA;      libpostproc    55.  1.100 / 55.  1.100&#xA;D/LISKO: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/storage/emulated/0/mainVideo.mp4&#x27;:&#xA;      Metadata:&#xA;        major_brand     : iso6&#xA;        minor_version   : 1&#xA;        compatible_brands: mp42iso6avc1isom&#xA;        creation_time   : 2020-08-03T13:20:11.000000Z&#xA;      Duration: 00:00:07.04, start: 0.000000, bitrate: 1380 kb/s&#xA;        Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 140 kb/s (default)&#xA;        Metadata:&#xA;          creation_time   : 2020-07-28T08:11:36.000000Z&#xA;        Stream #0:1(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 81:256 DAR 9:16], 1264 kb/s, 30 fps, 30 tbr, 90k tbn, 180k tbc (default)&#xA;        Metadata:&#xA;          creation_time   : 2020-07-28T08:11:36.000000Z&#xA;D/LISKO: Input #1, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/storage/emulated/0/overlayVideo.mp4&#x27;:&#xA;      Metadata:&#xA;        major_brand     : mp42&#xA;        minor_version   : 0&#xA;        compatible_brands: isommp42&#xA;        creation_time   : 2020-08-04T07:27:47.000000Z&#xA;        com.android.version: 10&#xA;      Duration: 00:00:11.19, start: 0.000000, bitrate: 9993 kb/s&#xA;D/LISKO:     Stream #1:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 9238 kb/s, SAR 1:1 DAR 16:9, 28.38 fps, 29.75 tbr, 90k tbn, 180k tbc (default)&#xA;        Metadata:&#xA;          rotate          : 270&#xA;          creation_time   : 2020-08-04T07:27:47.000000Z&#xA;          handler_name    : VideoHandle&#xA;        Side data:&#xA;          displaymatrix: rotation of 90.00 degrees&#xA;        Stream #1:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)&#xA;        Metadata:&#xA;          creation_time   : 2020-08-04T07:27:47.000000Z&#xA;          handler_name    : SoundHandle&#xA;    Stream mapping:&#xA;      Stream #0:1 (h264) -> scale2ref:ref (graph 0)&#xA;      Stream #1:0 (h264) -> scale2ref:default (graph 0)&#xA;      overlay (graph 0) -> Stream #0:0 (libx264)&#xA;      Stream #0:0 -> #0:1 (aac (native) -> aac (native))&#xA;    Press [q] to stop, [?] for help&#xA;D/LISKO: [libx264 @ 0xee986100] using SAR=81/256&#xA;D/LISKO: [libx264 @ 0xee986100] using cpu capabilities: ARMv6 NEON&#xA;    [libx264 @ 0xee986100] profile High, level 3.1&#xA;D/LISKO: [libx264 @ 0xee986100] 264 - core 152 r2851M ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00&#xA;D/LISKO: Output #0, mp4, to &#x27;/storage/emulated/0/outputVideo.mp4&#x27;:&#xA;D/LISKO:   Metadata:&#xA;        major_brand     : iso6&#xA;D/LISKO:     minor_version   : 1&#xA;D/LISKO:     compatible_brands: mp42iso6avc1isom&#xA;D/LISKO:     encoder         : Lavf58.12.100&#xA;        Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 81:256 DAR 9:16], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)&#xA;D/LISKO:     Metadata:&#xA;          encoder         : Lavc58.18.100 libx264&#xA;        Side data:&#xA;          cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1&#xA;D/LISKO:     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;        Metadata:&#xA;          creation_time   : 2020-07-28T08:11:36.000000Z&#xA;D/LISKO:       encoder         : Lavc58.18.100 aac&#xA;D/LISKO: frame=   26 fps=0.0 q=0.0 size=       0kB time=00:00:00.09 bitrate=   4.1kbits/s dup=2 drop=0 speed=0.185x    &#xA;D/LISKO: frame=   41 fps= 41 q=0.0 size=       0kB time=00:00:00.58 bitrate=   0.7kbits/s dup=2 drop=0 speed=0.574x    &#xA;D/LISKO: frame=   49 fps= 32 q=0.0 size=       0kB time=00:00:00.92 bitrate=   0.4kbits/s dup=2 drop=0 speed=0.613x    &#xA;D/LISKO: frame=   59 fps= 29 q=29.0 size=       0kB time=00:00:01.97 bitrate=   0.2kbits/s dup=2 drop=0 speed=0.974x    &#xA;D/LISKO: frame=   75 fps= 29 q=29.0 size=       0kB time=00:00:01.97 bitrate=   0.2kbits/s dup=2 drop=0 speed=0.762x &#xA;

    &#xA;

    EDIT2 :&#xA;After adding "-shortest" to command i managed to cut overlay video to be the same length as main video (because overlay video is always longer then mainVideo, "-shortest" take short one duration. So now, command looks like this :

    &#xA;

        String[] command = {"-i", mainVideoPath, "-i", overlayVideo ,"-filter_complex", &#xA;"[1:v][0:v]scale2ref=(256/256)*ih/8/sar:ih/8[wm][base];[base][wm]overlay=10:10", "-shortest", combinedVideoOutput};&#xA;

    &#xA;

    Rotation is good so only need to merge their audios. For now, only mainVideo audio is playing, overlay video audio isn't

    &#xA;

    EDIT 3 :

    &#xA;

       String[] command = {"-i", mainVideoPath, "-i", overlayVideo ,&#xA;            "-strict", "experimental",&#xA;            "-filter_complex",&#xA;            "[1:v][0:v]scale2ref=(256/256)*ih/8/sar:ih/8[wm][base];" &#x2B;&#xA;                    "[base][wm]overlay=10:10; " &#x2B;&#xA;                    "pan=stereo|c0=2*c0|c1=3*c0[a0];[1:a]pan=stereo|c0=1*c0|c1=4*c0[a1];[a0][a1]amix=inputs=2:duration=first:dropout_transition=2",&#xA;            "-shortest" ,combinedVideoOutput};&#xA;

    &#xA;

    With this command i managed to overlay videos, and play sound from both of them, rotation is good, but -shortest doesn't work now. Only existing problem now is to make them to last as shorter one (mainVideo is always shorter) ???

    &#xA;

    EDIT 4 :

    &#xA;

    This is finally working command

    &#xA;

            String[] command = {"-i", mainVideoPath, "-i", overlayVideo,&#xA;            "-filter_complex",&#xA;            "[1:v][0:v]scale2ref=(256/256)*ih/8/sar:ih/8[wm][base];" &#x2B;&#xA;                    "[base][wm]overlay=10:10:shortest=1;" &#x2B;&#xA;                    "pan=stereo|c0=2*c0|c1=3*c0[a0];[1:a]pan=stereo|c0=1*c0|c1=4*c0[a1];" &#x2B;&#xA;                    "[a0][a1]amix=inputs=2:duration=first:dropout_transition=2",&#xA;            combinedVideoOutput};&#xA;

    &#xA;

    Thanks

    &#xA;