Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (39)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Changer le statut par défaut des nouveaux inscrits

    26 décembre 2015, par

    Par défaut, lors de leur inscription, les nouveaux utilisateurs ont le statut de visiteur. Ils disposent de certains droits mais ne peuvent pas forcément publier leurs contenus eux-même etc...
    Il est possible de changer ce statut par défaut. en "rédacteur".
    Pour ce faire, un administrateur webmestre du site doit aller dans l’espace privé de SPIP en ajoutant ecrire/ à l’url de son site.
    Une fois dans l’espace privé, il lui faut suivre les menus configuration > Interactivité et activer (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (4828)

  • 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 :'(

    


  • Wrong duration of the result video when using ffmpeg filter complex concat [closed]

    9 décembre 2023, par Igor Chubin

    I am trying to do a trivial task of concatenating
several segments of the original video/audio
into a new file (and dropping the rest) :

    


        ffmpeg -i bdt.mkv -filter_complex '
    [0:v]trim=start=10.0:end=15.0,setpts=PTS-STARTPTS[0v];
    [0:a]atrim=start=10.0:end=15.0,asetpts=PTS-STARTPTS[0a];
    [0:v]trim=start=65.0:end=70.0,setpts=PTS-STARTPTS[1v];
    [0:a]atrim=start=65.0:end=70.0,asetpts=PTS-STARTPTS[1a];[0v][0a][1v]
    [1a]concat=n=2:v=1:a=1[outv][outa]' -map [outv] -map [outa] out.mp4


    


    When I am trying to watch out.mp4 after that, it has the original duration of bdt.mkv (70 minutes) and not 10 seconds, as I would expect.

    


    What am I doing wrong ?

    


    Update 1.

    


    (exactly as Scott Codez suggested)

    


    The problem is related to the formats. If the output format is mkv too, the problem disappears. But when I use mp4, that I need, the problem persists.

    


  • FFmpeg filter_complex to merge audio from two files fails without an error due to album cover PNG stream

    13 décembre 2023, par kaushal

    When you run FFmpeg filter_complex command to process two mp3 files and merge them into one, the command runs successfully, the output mp3 file is generated. No errors are reported. But the output fails to run. The result log from FFmpeg looks something like this, which points to an PNG stream in one of the mp3.

    


    [mp3 @ 00000215d251e7c0] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'C:\\vid gen\\Track_ Outwild x She Is Jules - Golden [NCS Release].mp3':
  Metadata:
    artist          : Outwild x She Is Jules
    album_artist    : Outwild x She Is Jules
    TCM             : Outwild, She Is Jules
    album           : Golden [Single]
    title           : Golden
    genre           : Electronic
    date            : 2021
  Duration: 00:04:09.60, 
start: 0.000000, bitrate: 378 kb/s
  Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 320 kb/s
  Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 3000x3000, 90k tbr, 90k tbn (attached pic)
    Metadata:
      comment         : Other
[mp3 @ 00000215d253f380] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from 'E:\voiceover.mp3':
  Duration: 00:00:51.96, start: 0.000000, bitrate: 32 kb/s
  Stream #1:0: Audio: mp3, 24000 Hz, mono, fltp, 32 kb/s
Stream mapping:
  Stream #0:0 (mp3float) -> volume:default (graph 0)
  Stream #1:0 (mp3float) -> adelay:default (graph 0)
  amerge:default (graph 0) -> Stream #0:0 (libmp3lame)
  Stream #0:1 -> #0:1 (mjpeg (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 00000215d46ff480] deprecated pixel format used, make sure you did set range correctly
    Last message repeated 3 times
[Parsed_amerge_6 @ 00000215d470d2c0] No channel layout for input 1
Output #0, mp3, to 'output_test.mp3':
  Metadata:
    TPE1            : Outwild x She Is Jules
    TPE2            : Outwild x She Is Jules
    TCM             : Outwild, She Is Jules
    TALB            : Golden [Single]
    TIT2            : Golden
    TCON            : Electronic
    TDRC            : 2021
    TSSE            : Lavf60.18.100
  Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp\r\rame=    0 fps=0.0 q=0.0 size=       0kB time=-00:00:00.02 bitrate=N/A speed=N/A    \rframe=    0 fps=0.0 q=0.0 size=       0kB time=-00:00:00.02 bitrate=N/A speed=N/A    \r[out#0/mp3 @ 00000215d2537400] video:3696kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.011831%
frame=    1 fps=0.8 q=-0.0 Lsize=    3698kB time=00:00:00.07 bitrate=415140.5kbits/s speed=0.0601x