Recherche avancée

Médias (91)

Autres articles (53)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

Sur d’autres sites (8256)

  • ffmpeg doesn't detect the subtitle format (webvtt) and refuses to copy it

    29 novembre 2023, par Thomas

    I am trying to re-encode the audio on some video files.
I want to copy the video and subtitles without touching them, however, ffmpeg doesn't detect the format of the subtitle (which is webvtt) and refuses to do anything.

    



    fmpeg -copy_unknown -analyzeduration 2000M -probesize 2000M -i input.mkv -map_metadata 0 -map 0 -c copy -c:a:0 aac -b:a 384k output.mkv

    



    [matroska,webm @ 0x5597558e4040] Unknown/unsupported AVCodecID S_TEXT/WEBVTT.
[matroska,webm @ 0x5597558e4040] Could not find codec parameters for stream 2 (Subtitle: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    encoder         : libebml v1.3.9 + libmatroska v1.5.2
    creation_time   : 2020-03-05T09:03:02.000000Z
  Duration: 00:56:33.26, start: 0.000000, bitrate: 3597 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      BPS-eng         : 3340067
      DURATION-eng    : 00:56:33.140000000
      NUMBER_OF_FRAMES-eng: 81354
      NUMBER_OF_BYTES-eng: 1416664616
      _STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 09:03:02
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1: Audio: eac3, 48000 Hz, 5.1, fltp (default)
    Metadata:
      BPS-eng         : 256000
      DURATION-eng    : 00:56:33.248000000
      NUMBER_OF_FRAMES-eng: 106039
      NUMBER_OF_BYTES-eng: 108583936
      _STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 09:03:02
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Subtitle: none (default)
    Metadata:
      BPS-eng         : 38
      DURATION-eng    : 00:54:47.388000000
      NUMBER_OF_FRAMES-eng: 514
      NUMBER_OF_BYTES-eng: 15766
      _STATISTICS_WRITING_APP-eng: mkvmerge v38.0.0 ('The Silent Type') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-03-05 09:03:02
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
  Stream #0:2 -> #0:2 (copy)

[aac @ 0x5597b06ae000] Using a PCE to encode channel layout "5.1(side)"
[matroska @ 0x5597b06ab540] Subtitle codec 0 is not supported.
Could not write header for output file #0 (incorrect codec parameters ?): Function not implemented
Error initializing output stream 0:1 -- 
[aac @ 0x5597b06ae000] Qavg: -nan
Conversion failed!


    



    VLC shows it as WebVTT and displays the subtitles correctly :

    



    VLC shows as WebVTT

    



    MediaInfo also detects properly as webvtt :

    



    Text
ID                                       : 3
Format                                   : S_TEXT/WEBVTT
Codec ID                                 : S_TEXT/WEBVTT
Duration                                 : 54 min 47 s
Bit rate                                 : 38 b/s
Count of elements                        : 514
Stream size                              : 15.4 KiB (0%)
Language                                 : English
Default                                  : Yes
Forced                                   : No


    



    My ffmpeg was built with webvtt :

    



    $ ffmpeg -codecs | grep VTT
ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.3.0 (Arch Linux 9.3.0-1)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  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
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
 DES... webvtt               WebVTT subtitle


    



    How can I tell ffmpeg "this is webvtt, just copy it please !" ?

    



    EDIT : RESOLVED (thanks @Gyan)

    



    To force the decoder, -c:s webvtt must be set before the input :
fmpeg -analyzeduration 50M -probesize 50M -c:s webvtt -i input.mkv ...

    


  • Debian php ffmpeg error "Could not get frame filename number 2 from pattern"

    22 août 2021, par Sam

    My code below works fine in on my osx laptop

    


    $sec = 1;
$ffmpeg = \FFMpeg\FFMpeg::create([
   'ffmpeg.binaries'  => exec('which ffmpeg'),
   'ffprobe.binaries' => exec('which ffprobe')
]);

$video = $ffmpeg->open($file);
$frame = $video->frame(TimeCode::fromSeconds($sec));
if(!file_exists($newFilePath)) {
      $frame->save($newFilePath);
      $this->output->writeln('make: ' . $newFilePath);
}


    


    but on debian I get error Could not get frame filename number 2 from pattern

    


    here is the error description from ffmpeg website

    


    


    This usually occurs because the output name is incorrect or some option was omitted.
If outputting a single image you need to include -frames:v 1.
If outputting a series of images you need to use the proper naming pattern as described in the image muxer documentation. For example, output_%03d.png will make a series named output_001.png, output_002.png, output_003.png, etc.
If outputting a single image that is continuously overwritten with new images, add -update 1.

    


    


    My filename looks fine to me

    


    here is the detailed error :

    


    ffmpeg failed to execute command '/usr/bin/ffmpeg' '-y' '-ss' '00:00:01.00' '-i' '/var/www/web/public/data/post/J4ukGXDowqFFA6hNIuP11606468845/BuF8e7HrkX1606  
  468845.mov' '-vframes' '1' '-f' 'image2' '/var/www/web/public/data/post/J4ukGXDowqFFA6hNIuP11606468845/BuF8e7HrkX1606468845-preview.webp':

Error Output:

ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd
64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass
--enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libf
ribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-li
bpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-l
ibtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-li
bzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chrom
aprint --enable-frei0r --enable-libx264 --enable-shared
libavutil      56. 22.100 / 56. 22.100
libavcodec     58. 35.100 / 58. 35.100
libavformat    58. 20.100 / 58. 20.100
libavdevice    58.  5.100 / 58.  5.100
libavfilter     7. 40.101 /  7. 40.101
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  3.100 /  5.  3.100
libswresample   3.  3.100 /  3.  3.100
libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/web/public/data/post/J4ukGXDowqFFA6hNIuP11606468845/BuF8e7HrkX1606468845.mov':                               
Metadata:
major_brand     : qt
minor_version   : 0
compatible_brands: qt
creation_time   : 2020-11-27T09:17:34.000000Z
Duration: 00:00:03.18, start: 0.000000, bitrate: 932 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 138 kb/s (default)                                                                 
Metadata:
creation_time   : 2020-11-27T09:17:34.000000Z
handler_name    : Core Media Audio
Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 480x264, 780 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)  
Metadata:
creation_time   : 2020-11-27T09:17:34.000000Z
handler_name    : Core Media Video
encoder         : H.264
Stream mapping:
Stream #0:1 -> #0:0 (h264 (native) -> webp (libwebp_anim))                                                                                                          
Press [q] to stop, [?] for help
Output #0, image2, to '/var/www/web/public/data/post/J4ukGXDowqFFA6hNIuP11606468845/BuF8e7HrkX1606468845-preview.webp':                                        
Metadata:
major_brand     : qt
minor_version   : 0
compatible_brands: qt
encoder         : Lavf58.20.100
Stream #0:0(und): Video: webp (libwebp_anim), yuv420p, 480x264, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)                                                
Metadata:
creation_time   : 2020-11-27T09:17:34.000000Z
handler_name    : Core Media Video
encoder         : Lavc58.35.100 libwebp_anim
[image2 @ 0x55bc313ccfc0] Could not get frame filename number 2 from pattern '/var/www/web/public/data/post/J4ukGXDowqFFA6hNIuP11606468845/BuF8e7HrkX16064688  
  45-preview.webp' (either set update or use a pattern like %03d within the filename pattern)                                                                           
  av_interleaved_write_frame(): Invalid argument                                                                                                                        
  frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.06 bitrate=N/A speed=1.54x                                                                                         
  video:18kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown                                                                       
  Conversion failed!   


    


  • Core : fixed Regular Expression Denial of Service vulnerability (#2371)

    9 janvier 2021, par staabm
    Core : fixed Regular Expression Denial of Service vulnerability (#2371)
    

    ReDoS, or Regular Expression Denial of Service, is a vulnerability affecting
    poorly constructed and potentially inefficient regular expressions which can
    make them perform extremely badly given a creatively constructed input string.

    GHSL-2020-294

    credits to @erik-krogh for reporting the issue and providing a fix