Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (28)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (3540)

  • FFMpeg Input link in1:v0 parameters (size > 640x352, SAR 0:1) do not match the corresponding output link in0:v0 > parameters [duplicate]

    25 avril 2020, par Android Developer

    I am using below command to concatenate videos-

    



    String command[] = {"-i",inputFile1AbsolutePath,"-i",inputFile2AbsolutePath .....,"-i",inputFileNAbsolutePath,"-filter_complex","[0:v0] [0:a0] [1:v1] [1:a1]...[N:vN] concat=n=N:v=1:a=1 [v] [a],"-map","[v]","-map","[a]", outputFileAbsolutePath};


    



    and got below error-

    



    


    FAILED with output : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the
 FFmpeg developers
 built with gcc 4.8 (GCC)
 configuration : —target-os=linux
 —cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi-
 —arch=arm —cpu=cortex-a8 —enable-runtime-cpudetect —sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot
 —enable-pic —enable-libx264 —enable-libass —enable-libfreetype —enable-libfribidi —enable-libmp3lame —enable-fontconfig —enable-pthreads —disable-debug —disable-ffserver —enable-version3 —enable-hardcoded-tables —disable-ffplay —disable-ffprobe —enable-gpl —enable-yasm —disable-doc —disable-shared —enable-static —pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config —prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a —extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include
 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' —extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib
 -Wl,-z,relro -Wl,-z,now -pie' —extra-libs='-lpng -lexpat -lm' —extra-cxxflags=
 libavutil 55. 17.103 / 55. 17.103
 libavcodec 57. 24.102 / 57. 24.102
 libavformat 57. 25.100 / 57. 25.100
 libavdevice 57. 0.101 / 57. 0.101
 libavfilter 6. 31.100 / 6. 31.100
 libswscale 4. 0.100 / 4. 0.100
 libswresample 2. 0.101 / 2. 0.101
 libpostproc 54. 0.100 / 54. 0.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/storage/emulated/0/Download/g3cm1tt7qtd41.mp4' :
 Metadata :
 major_brand : iso6
 minor_version : 1
 compatible_brands : mp42iso6avc1isom
 creation_time : 2020-01-30 11:13:07
 Duration : 00:00:00.00, start : 0.042667, bitrate : N/A
 Stream #0:0(und) : Video : h264 (Main) (avc1 / 0x31637661), yuv420p,
 854x480 [SAR 2136:2135 DAR 89:50], 1225 kb/s, 30 fps, 30 tbr, 15360
 tbn, 60 tbc (default)
 Stream #0:1(eng) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 128 kb/s (default)
 Input #1, mov,mp4,m4a,3gp,3g2,mj2, from
 '/storage/emulated/0/WhatsApp/Media/WhatsApp
 Video/VID-20200404-WA0000.mp4' :
 Metadata :
 major_brand : mp42
 minor_version : 0
 compatible_brands : mp42isom
 Duration : 00:03:43.14, start : 0.000000, bitrate : 774 kb/s
 Stream #1:0(und) : Video : h264 (Baseline) (avc1 / 0x31637661), yuv420p,
 640x352, 675 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
 Stream #1:1(und) : Audio : aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono,
 fltp, 96 kb/s (default)
 [Parsed_concat_0 @ 0xb4529400] Input link in1:v0 parameters (size
 640x352, SAR 0:1) do not match the corresponding output link in0:v0
 parameters (854x480, SAR 2136:2135)
 [Parsed_concat_0 @ 0xb4529400] Failed to configure output pad on
 Parsed_concat_0
 Error configuring complex filters.
 Invalid argument

    


    



    Seeing this answer i tried using-

    



    [0:v]setsar=1[v0]; [0:a0] [1:v]setsar=1[v1]; [1:a1]


    



    but did not worked !

    



    How can i resolve this ?

    


  • ffmpeg overlay timing issue

    22 avril 2020, par Mario Iannotta

    I'm trying to add a png as overlay to a mov video with ffmpeg (version 4.2.2) using the following command :

    



    ffmpeg -i ./input.mov -i ./overlay.png -y -filter_complex "overlay=enable='between(t,1,4)'" ./output.mp4

    



    Now my understanding of overlay=enable='between(t,1,4) is that the overlay will be added at one second and will be removed at 4 seconds since the begin of the video but the output is somehow different.

    



    The overlay is added at roughly 2:66 and it is removed at 5:14.

    



    Trying with different values result in even more confusing outputs.

    



    eg :

    



      

    • between(t,3,10) —> 3:12 | 11:05

    • 


    • between(t,2,7) —> 2:65 | 7:22

    • 


    • between(t,1,2) —> the overlay is not added ad all

    • 


    



    The metadata of the input video are the following

    



      Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2020-04-19T08:09:00.000000Z
  Duration: 00:00:14.84, start: 0.053333, bitrate: 849 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt709/unknown), 828x1792 [SAR 1:1 DAR 207:448], 848 kb/s, 23.34 fps, 600 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      creation_time   : 2020-04-19T08:09:00.000000Z
      handler_name    : Core Media Video
      encoder         : H.264


    



    I also tried to convert the video to mp4 (with ffmpeg -i input.mov -vcodec copy -acodec copy out.mp4) before applying the overlay but the issue is still there.

    



    Edit : I downloaded a test mp4 video and the command is working as expected so it is definitely something wrong with my input video. Any idea what it is ?

    



    Edit 2 : Here's the output of ffmpeg command :

    



    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './input.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2020-04-22T07:49:31.000000Z
  Duration: 00:00:17.80, start: 0.051667, bitrate: 1097 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/unknown), 750x1334 [SAR 1:1 DAR 375:667], 1097 kb/s, 12.96 fps, 60 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      creation_time   : 2020-04-22T07:49:31.000000Z
      handler_name    : Core Media Video
      encoder         : H.264
Input #1, png_pipe, from './overlay.png':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Video: png, rgba(pc), 83x128, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 (h264) -> overlay:main
  Stream #1:0 (png) -> overlay:overlay
  overlay -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 0x7fcad0001200] using SAR=1/1
[libx264 @ 0x7fcad0001200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fcad0001200] profile High, level 4.0
[libx264 @ 0x7fcad0001200] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - 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=18 lookahead_threads=3 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
Output #0, mp4, to './output.mp4':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 750x1334 [SAR 1:1 DAR 375:667], q=-1--1, 60 fps, 15360 tbn, 60 tbc (default)
    Metadata:
      encoder         : Lavc58.54.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=  326 fps=0.0 q=31.0 size=       0kB time=00:00:04.35 bitrate=   0.1kbits/frame=  499 fps=461 q=31.0 size=     256kB time=00:00:07.23 bitrate= 290.0kbits/frame=  830 fps=494 q=31.0 size=     512kB time=00:00:12.75 bitrate= 329.0kbits/frame=  956 fps=491 q=-1.0 Lsize=     593kB time=00:00:15.88 bitrate= 306.0kbits/s dup=726 drop=0 speed=8.16x
video:581kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.030694%
[libx264 @ 0x7fcad0001200] frame I:6     Avg QP:18.73  size: 30783
[libx264 @ 0x7fcad0001200] frame P:288   Avg QP:21.57  size:  1150
[libx264 @ 0x7fcad0001200] frame B:662   Avg QP:30.94  size:   119
[libx264 @ 0x7fcad0001200] consecutive B-frames:  4.9%  6.9%  4.1% 84.1%
[libx264 @ 0x7fcad0001200] mb I  I16..4: 19.1% 64.5% 16.4%
[libx264 @ 0x7fcad0001200] mb P  I16..4:  0.8%  0.9%  0.5%  P16..4:  2.4%  0.4%  0.1%  0.0%  0.0%    skip:94.9%
[libx264 @ 0x7fcad0001200] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8:  1.8%  0.0%  0.0%  direct: 0.0%  skip:98.0%  L0:43.8% L1:55.9% BI: 0.3%
[libx264 @ 0x7fcad0001200] 8x8 transform intra:53.9% inter:64.1%
[libx264 @ 0x7fcad0001200] coded y,uvDC,uvAC intra: 18.2% 20.8% 13.9% inter: 0.1% 0.4% 0.1%
[libx264 @ 0x7fcad0001200] i16 v,h,dc,p: 35% 63%  1%  1%
[libx264 @ 0x7fcad0001200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 48% 17% 29%  1%  1%  1%  1%  1%  1%
[libx264 @ 0x7fcad0001200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 32% 15%  3%  4%  4%  3%  3%  3%
[libx264 @ 0x7fcad0001200] i8c dc,h,v,p: 71% 21%  7%  1%
[libx264 @ 0x7fcad0001200] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fcad0001200] ref P L0: 74.6%  4.0% 13.4%  8.0%
[libx264 @ 0x7fcad0001200] ref B L0: 80.0% 17.6%  2.3%
[libx264 @ 0x7fcad0001200] ref B L1: 97.6%  2.4%
[libx264 @ 0x7fcad0001200] kb/s:298.58


    


  • FFmpeg inaccurate outputs [duplicate]

    20 mai 2020, par Shlomi
    


    Possible Duplicate :
    
 ffmpeg : videos before and after conversion aren’t the same length

    


    





    Recently, I've been trying to use FFmpeg for an application which requires a VERY accurate manipulation when it comes to the time parameter (milliseconds resolution). Unfortunately, I was surprised to find out that FFmpeg's manipulation functionalities return some inaccurate results.

    



    Here is the output of 'ffmpeg' :

    



    ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jul 25 2012 19:55:05 with gcc 4.2.1 (Apple Inc. build 5664)
  configuration: --enable-gpl --enable-shared --enable-pthreads --enable-libx264 --enable-libmp3lame
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100


    



    Now, let's assume I want to rip the audio track of 'foo.mov'. Here is the relevant output of 'ffmpeg -i foo.mov' :

    



    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'foo.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2012-07-24 23:16:08
  Duration: 00:00:40.38, start: 0.000000, bitrate: 805 kb/s
    Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 480x360, 733 kb/s, 24.46 fps, 29.97 tbr, 600 tbn, 1200 tbc
    Metadata:
      rotate          : 90
      creation_time   : 2012-07-24 23:16:08
      handler_name    : Core Media Data Handler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, s16, 63 kb/s
    Metadata:
      creation_time   : 2012-07-24 23:16:08
      handler_name    : Core Media Data Handler


    



    As you probably noticed, the video file duration is 00:00:40.38. Using the following command, I ripped it's audio track :

    



    'ffmpeg -i foo.mov foo.wav'

    



    Output :

    



    Output #0, wav, to 'foo.wav':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2012-07-24 23:16:08
    encoder         : Lavf54.6.100
    Stream #0:0(und): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
    Metadata:
      creation_time   : 2012-07-24 23:16:08
      handler_name    : Core Media Data Handler
Stream mapping:
  Stream #0:1 -> #0:0 (aac -> pcm_s16le)
Press [q] to stop, [?] for help
size=3482kB time=00:00:40.42 bitrate= 705.6kbits/s    
video:0kB audio:3482kB global headers:0kB muxing overhead 0.001290%


    



    As you can see, the output file is longer than the file in the input.

    



    Another example is audio (and video) file trimming :
Let's assume I would like to use ffmpeg for audio file trimming. I used the next command :

    



    'ffmpeg -t 00:00:10.000 -i foo.wav trimmed_foo.wav -ss 00:00:25.000'

    



    Output :

    



    [wav @ 0x10180e800] max_analyze_duration 5000000 reached at 5015510
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, wav, from 'foo.wav':
  Duration: 00:00:40.42, bitrate: 705 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
Output #0, wav, to 'trimmed_foo.wav':
  Metadata:
    encoder         : Lavf54.6.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
    Press [q] to stop, [?] for help
size=864kB time=00:00:10.03 bitrate= 705.6kbits/s    
video:0kB audio:864kB global headers:0kB muxing overhead 0.005199%


    



    Again, the output file is 30 milliseconds longer than I expected.

    



    I tried, for a long time, to research the issue without any success. When I use audacity for the same functionality, it does it very accurately !

    



    Does anyone have any idea how to solve this problem ?