Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (8)

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (3995)

  • How to tell ffmpeg that /tmp/phpFm6H79 is a safe file name ?

    28 août 2023, par hanshenrik

    How do I tell ffmpeg that /tmp/phpFm6H79 is a safe filename ?

    


    When I do

    


    ffmpeg -y -f concat -i '/tmp/phpFm6H79' -c:v:libx264 -vsync vfr '/home/hans/projects/test/output2.mp4'


    


    I get (*only the last 2 lines are interesting)

    


    ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[concat @ 0x55b070e9ff40] Unsafe file name '/tmp/phpbshsmF'
/tmp/phpFm6H79: Operation not permitted


    


    The filepath is generated with PHP's tmpfile() like

    


    $ffmpegInputTxtFileHandle = tmpfile();
$ffmpegInputTxtFilePath = stream_get_meta_data($ffmpegInputTxtFileHandle)['uri'];


    


    The code should be threadsafe, so using hardcoded paths is not really viable, and using tmpfile() is very convenient, it takes care of automatically deleting the file when the script exit, even if php crashes, so I'd rather tell ffmpeg that it is safe, than change it to something other than tmpfile(), is it possible ? how ?

    


    I tried using this fugly workaround to get it to end with ".txt"

    


            $ffmpegInputTxtFileHandle = tmpfile();
        $ffmpegInputTxtFilePath = stream_get_meta_data($ffmpegInputTxtFileHandle)['uri'] . ".txt";
        fclose($ffmpegInputTxtFileHandle);
        $ffmpegInputTxtFileHandle = fopen($ffmpegInputTxtFilePath, 'w+b');
        register_shutdown_function(function () use ($ffmpegInputTxtFileHandle, $ffmpegInputTxtFilePath) {
            @fclose($ffmpegInputTxtFileHandle);
            @unlink($ffmpegInputTxtFilePath);
        });


    


    but it even says that /tmp/phpFm6H79.txt is an unsafe filename :'(

    


  • ffmpeg - cut without reencoding and strange behaviour : application provided duration is out of range for mov/mp4 format [closed]

    27 août 2023, par user2707175

    In Ubuntu 18.04 I quite often used the following command for trimming part of the video without re encoding (which means without any quality loss).

    


    ffmpeg -ss 00:06:00 -i DSCF5984.MOV -t 00:07:00 -c copy DSCF5984_A_wszystkie.MOV

    


    Not so much time ago I moved to Ubuntu 22.04. Still having the same video camera and still using the same format for recording, when using the command as above I'm getting quite strange error and the behavior is unexpected. In this case mov file is 40 sec file. I want to get 7 seconds fragment starting from 6 second (thus from 6 to 13 sec). Instead of this I get very short fragment from the beginning of the file. I don't even know how long as none of video players want to display its length. Probably it's 1-2 sec. Thus it's not only, I get this error, but ffmpeg doesn't work. In theory I have the newest version available for ubuntu 22.04.

    


    Messages displayed by ffmpeg

    


    ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-libsmbclient
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DSCF5984.MOV':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2023-08-12T23:07:18.000000Z
    original_format : Digital Camera
    original_format-eng: Digital Camera
    comment         : FUJIFILM DIGITAL CAMERA X-S10
    comment-eng     : FUJIFILM DIGITAL CAMERA X-S10
  Duration: 00:00:40.04, start: 0.000000, bitrate: 105270 kb/s
  Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/smpte170m), 3840x2160, 101873 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2023-08-12T23:07:18.000000Z
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
      timecode        : 07:05:54;21
  Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2023-08-12T23:07:18.000000Z
      vendor_id       : [0][0][0][0]
      timecode        : 07:05:54;21
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2023-08-12T23:07:18.000000Z
      timecode        : 07:05:54;21
[mov @ 0x55a005fa6e40] Application provided duration: -9223372036854775808 / timestamp: -9223372036854775808 is out of range for mov/mp4 format
[mov @ 0x55a005fa6e40] pts has no value
Output #0, mov, to 'DSCF5984_A_wszystkie.MOV':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    comment-eng     : FUJIFILM DIGITAL CAMERA X-S10
    original_format : Digital Camera
    original_format-eng: Digital Camera
    comment         : FUJIFILM DIGITAL CAMERA X-S10
    encoder         : Lavf58.76.100
  Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/smpte170m), 3840x2160, q=2-31, 101873 kb/s, 0.03 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
    Metadata:
      creation_time   : 2023-08-12T23:07:18.000000Z
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
      timecode        : 07:05:54;21
  Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2023-08-12T23:07:18.000000Z
      vendor_id       : [0][0][0][0]
      timecode        : 07:05:54;21
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=   30 fps=0.0 q=-1.0 Lsize=   13475kB time=-00:05:19.97 bitrate=N/A speed=N/A    
video:13191kB audio:282kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.019629%


    


    Is that some kind of error ? Or should I do sth different ? I'm quite surprised as I didn't change my camera. So is that sth changed in ffmpeg ?

    


  • How to resolve Electron ffmpeg error opening input file ?

    26 août 2023, par 3V1LXD

    I have an Electron app with ffmpeg.exe inside the project's bin folder. When i try to use ffmpeg to make a new video I get an error reading the input file.

    


    FFmpeg error: [in#0 @ 000002667f2ab9c0] Error opening input: No such file or directory

Error opening input file C:/Users/xxxx/Videos/Powder/2023.08.19%2017.30.37_Apex_Legends/Powder_2023.08.19%2021.00.48.mp4


    


    const ffmpeg = spawn(ffmpegPath, [
  '-i', videoFile,
  '-filter_complex', filterComplex,
  '-map', '[out]',
  '-c:v', 'libx264',
  '-crf', '18',
  '-preset', 'veryfast',
  '-y',
  path.join(outputDir, outputName)
]);

ffmpeg.stdout.on('data', (data) => {
  console.log(`FFmpeg output: ${data}`);
});

ffmpeg.stderr.on('data', (data) => {
  console.error(`FFmpeg error: ${data}`);
});

ffmpeg.on('close', (code) => {
  console.log(`FFmpeg process exited with code ${code}`);
  event.reply('ffmpeg-export-done'); // Notify the renderer process
});


    


    How can i resolve this path issue ?