Recherche avancée

Médias (91)

Autres articles (37)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Emballe Médias : Mettre en ligne simplement des documents

    29 octobre 2010, par

    Le plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
    Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
    D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (2410)

  • Discord.js Music bot "TypeError" when playing audio with dispatcher

    21 février 2020, par Cole Perry

    I’m new to Discord.js and I’m trying to have the bot join a voice channel and play an audio file on my computer. I have been following this guide : https://discord.js.org/#/docs/main/stable/topics/voice . Here is the Index.js page :

    Colesbot.on('message', message=>{
       if (message.content === '/join') {
           // Only try to join the sender's voice channel if they are in one themselves
           if (message.member.voiceChannel) {
               message.member.voiceChannel.join().then(connection => {
                   message.reply('I have successfully connected to the channel!');

                   // To play a file, we need to give an absolute path to it
                   const dispatcher = connection.playFile('C:\Users\bobal\Documents\GitHub\Spotify-Playlist-Discord-bot\Assets\Glory.mp3');

                   dispatcher.on('end', () => {
                       // The song has finished
                       console.log('Finished playing!');
                     });

                   dispatcher.on('error', e => {
                       // Catch any errors that may arise
                       console.log(e);
                     });

                     dispatcher.setVolume(0.5); // Set the volume to 50%
               }).catch(console.log);
       } else {
           message.reply('You need to join a voice channel first!');
         }
       }
    });
    exports.run = (client, message, args) => {
       let user = message.mentions.users.first || message.author;
    }

    FFMPEG is installed and I have set the environment path for it. When I type FFMPEG in the command line I get the proper response.

    Some have said I need to install the ffmpeg binaries but when I run npm install ffmpeg-binaries I get an error message that is here

    So then I tried installing an older version and I’m now using ffmpeg-binaries@3.2.2-3 but when I type /join I get the error

    [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object
  • "Pixel format 'yuvj420p' is not supported" when converting image to video using CUDA hardware acceleration

    11 février 2020, par laurent

    I’m trying to convert an image to a video using CUDA hardware acceleration but I can’t get it to work.

    The basic command I have is this one :

    ffmpeg -y -hwaccel cuvid -i tests/MediaSamples/portrait_0.jpg -t 10 out.mp4

    And I’m getting this error :

    [AVHWFramesContext @ 0x32d3f00] Pixel format 'yuvj420p' is not supported
    [mjpeg @ 0x2d18480] Error initializing a CUDA frame pool
    cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
    Error while decoding stream #0:0: Invalid argument

    I’ve tried setting the pixel format like so, but that didn’t help :

    ffmpeg -y -hwaccel cuvid -pix_fmt yuv420p -i tests/MediaSamples/portrait_0.jpg -t 10 out.mp4

    I’ve also tried many other flags but can’t get anything to work. Any idea what the issue might be ?

    For information this is the full log :

    ffmpeg version N-96615-gc35382a Copyright (c) 2000-2020 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
     configuration: --enable-nonfree --disable-shared --enable-gpl --enable-openssl --enable-libx264 --enable-cuda-sdk --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/usr/local/ssl/include -I/usr/local/cuda/include -I/usr/local/include -L/usr/local/ssl/lib -Wl,-rpath=/usr/local/ssl/lib' --extra-ldflags=-L/usr/local/cuda/lib64
     libavutil      56. 38.100 / 56. 38.100
     libavcodec     58. 67.101 / 58. 67.101
     libavformat    58. 37.100 / 58. 37.100
     libavdevice    58.  9.103 / 58.  9.103
     libavfilter     7. 73.100 /  7. 73.100
     libswscale      5.  6.100 /  5.  6.100
     libswresample   3.  6.100 /  3.  6.100
     libpostproc    55.  6.100 / 55.  6.100
    Input #0, image2, from 'tests/MediaSamples/portrait_0.jpg':
     Duration: 00:00:00.04, start: 0.000000, bitrate: 40237 kb/s
       Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1600x900 [SAR 72:72 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [AVHWFramesContext @ 0x32d3f00] Pixel format 'yuvj420p' is not supported
    [mjpeg @ 0x2d18480] Error initializing a CUDA frame pool
    cuvid hwaccel requested for input stream #0:0, but cannot be initialized.
    Error while decoding stream #0:0: Invalid argument
    [libx264 @ 0x2d1e840] using SAR=1/1
    [libx264 @ 0x2d1e840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 0x2d1e840] profile High, level 4.0
    [libx264 @ 0x2d1e840] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - 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=24 lookahead_threads=4 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 'out.mp4':
     Metadata:
       encoder         : Lavf58.37.100
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj420p(pc), 1600x900 [SAR 72:72 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc
       Metadata:
         encoder         : Lavc58.67.101 libx264
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
    frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Conversion failed!
  • FFMPEG cannot encode .MP4 to usable .Y4M RAW video : "Operation not permitted"

    26 janvier 2020, par Ham789

    I am running ffmpeg version 4.2.2 on macOS Sierra and I cannot decode a RAW video.

    First I create the .Y4M video :

    ffmpeg -y -i inputfolder/GH012088.MP4 temp_raw_video.Y4M

    Then I try to input it to ffmpeg :

    ffmpeg -i temp_raw_video.Y4M

    However I get the following error in the terminal : temp_raw_video.Y4M: Operation not permitted

    I have checked the permissions for the ’temp_raw_video.Y4M’ file and I have both read and write permissions.

    I have tried the above with .MOV videos from an iPhone and it works fine.

    The problem seems to be with the .MP4 videos I am trying to convert. These videos were taken with a GoPro camera.

    What is going on here ? Please see the GH012088.MP4 file info below :

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb9b6809400] Using non-standard frame rate 29/1
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'inputfolder/GH012088.MP4':
     Metadata:
       major_brand     : mp41
       minor_version   : 538120216
       compatible_brands: mp41
       creation_time   : 2019-12-28T14:12:04.000000Z
       firmware        : HD7.01.01.61.00
     Duration: 00:00:40.47, start: 0.000000, bitrate: 60267 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 60015 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro AVC  
         encoder         : GoPro AVC encoder
         timecode        : 14:40:34:06
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro AAC  
         timecode        : 14:40:34:06
       Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro TCD  
         timecode        : 14:40:34:06
       Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 37 kb/s (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro MET  
       Stream #0:4(eng): Data: none (fdsc / 0x63736466), 10 kb/s (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro SOS

    Here is the output log for creating the .Y4M :

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fa9da802200] Using non-standard frame rate 29/1
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'inputfolder/GH012088.MP4':
     Metadata:
       major_brand     : mp41
       minor_version   : 538120216
       compatible_brands: mp41
       creation_time   : 2019-12-28T14:12:04.000000Z
       firmware        : HD7.01.01.61.00
     Duration: 00:00:40.47, start: 0.000000, bitrate: 60267 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 60015 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro AVC  
         encoder         : GoPro AVC encoder
         timecode        : 14:40:34:06
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro AAC  
         timecode        : 14:40:34:06
       Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro TCD  
         timecode        : 14:40:34:06
       Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 37 kb/s (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro MET  
       Stream #0:4(eng): Data: none (fdsc / 0x63736466), 10 kb/s (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro SOS  
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
    Press [q] to stop, [?] for help
    Output #0, yuv4mpegpipe, to 'temp_raw_video.Y4M':
     Metadata:
       major_brand     : mp41
       minor_version   : 538120216
       compatible_brands: mp41
       firmware        : HD7.01.01.61.00
       encoder         : Lavf58.29.100
       Stream #0:0(eng): Video: wrapped_avframe, yuvj420p, 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
       Metadata:
         creation_time   : 2019-12-28T14:12:04.000000Z
         handler_name    : GoPro AVC  
         timecode        : 14:40:34:06
         encoder         : Lavc58.54.100 wrapped_avframe
    frame=   43 fps=0.0 q=-0.0 size=  522240kB time=00:00:01.43 bitrate=2981801.3kbiframe=   92 fps= 90 q=-0.0 size= 1117696kB time=00:00:03.06 bitrate=2982723.8kbiframe=  144 fps= 95 q=-0.0 size= 1749504kB time=00:00:04.80 bitrate=2982837.3kbiframe=  190 fps= 94 q=-0.0 size= 2308352kB time=00:00:06.33 bitrate=2982809.6kbiframe=  241 fps= 95 q=-0.0 size= 2928128kB time=00:00:08.04 bitrate=2982978.5kbiframe=  287 fps= 94 q=-0.0 size= 3486976kB time=00:00:09.57 bitrate=2982937.8kbiframe=  336 fps= 95 q=-0.0 size= 4082176kB time=00:00:11.21 bitrate=2982837.3kbiframe=  388 fps= 96 q=-0.0 size= 4713984kB time=00:00:12.94 bitrate=2982864.2kbiframe=  436 fps= 96 q=-0.0 size= 5297152kB time=00:00:14.54 bitrate=frame= 1213 fps= 95 q=-0.0 Lsize=14737957kB time=00:00:40.47 bitrate=2983002.4kbits/s speed=3.19x      
    video:635kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2321095.250000%