Recherche avancée

Médias (0)

Mot : - Tags -/signalement

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (26)

  • Utilisation et configuration du script

    19 janvier 2011, par

    Informations spécifiques à la distribution Debian
    Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
    Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
    Récupération du script
    Le script d’installation peut être récupéré de deux manières différentes.
    Via svn en utilisant la commande pour récupérer le code source à jour :
    svn co (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (4812)

  • Nodejs ffmpeg "The input file path can not be empty" error, but files exist

    29 octobre 2022, par 0szi

    I'm trying to merge an audio file with a video file from the same source (Youtube)

    


    In the following code I first read in the console parameters wirh commander then i define the videoOutput dir and download the highset res. video from youtube with node-ytdl-core. After that I download the audio for the video. and in the callback of the video.on("end", ....)
i call the function merge()

    


    const path = require(&#x27;path&#x27;);&#xA;const fs = require(&#x27;fs&#x27;);&#xA;const readline = require("readline");&#xA;const ytdl = require(&#x27;ytdl-core&#x27;);&#xA;const { program } = require(&#x27;commander&#x27;);&#xA;const ffmpeg = require(&#x27;ffmpeg&#x27;);&#xA;&#xA;program&#xA;    .option("--url, --url <url>", "Youtube video url")&#xA;    .option("--name, --name <name>", "Name of the video in hard drive")&#xA;&#xA;program.parse(process.argv);&#xA;&#xA;&#xA;const options = program.opts();&#xA;let url = options.url;&#xA;let name = options.name;&#xA;&#xA;let videoOutput = path.resolve(`./video${name}.mp4`);&#xA;&#xA;let video = ytdl(url, {&#xA;  quality: "highestvideo"&#xA;});&#xA;&#xA;let starttime = 0;&#xA;&#xA;video.pipe(fs.createWriteStream(videoOutput));&#xA;&#xA;video.once(&#x27;response&#x27;, () => {&#xA;  starttime = Date.now();&#xA;});&#xA;&#xA;video.on(&#x27;progress&#x27;, (chunkLength, downloaded, total) => {&#xA;    const percent = downloaded / total;&#xA;    const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;&#xA;    const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;&#xA;    readline.cursorTo(process.stdout, 0);&#xA;    process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);&#xA;    process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);&#xA;    process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);&#xA;    process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);&#xA;    readline.moveCursor(process.stdout, 0, -1);&#xA;  });&#xA;&#xA;  video.on(&#x27;end&#x27;, () => {&#xA;    process.stdout.write(&#x27;\n\n&#x27;);&#xA;  });&#xA;&#xA;&#xA;//   repeat for audio&#xA;video = ytdl(url, {&#xA;  quality: "highestaudio"&#xA;});&#xA;  &#xA;starttime = 0;&#xA;&#xA;let audioOutput = path.resolve(`./audio${name}.mp3`);&#xA;&#xA;video.pipe(fs.createWriteStream(audioOutput));&#xA;&#xA;video.once(&#x27;response&#x27;, () => {&#xA;  starttime = Date.now();&#xA;});&#xA;&#xA;video.on(&#x27;progress&#x27;, (chunkLength, downloaded, total) => {&#xA;    const percent = downloaded / total;&#xA;    const downloadedMinutes = (Date.now() - starttime) / 1000 / 60;&#xA;    const estimatedDownloadTime = (downloadedMinutes / percent) - downloadedMinutes;&#xA;    readline.cursorTo(process.stdout, 0);&#xA;    process.stdout.write(`${(percent * 100).toFixed(2)}% downloaded `);&#xA;    process.stdout.write(`(${(downloaded / 1024 / 1024).toFixed(2)}MB of ${(total / 1024 / 1024).toFixed(2)}MB)\n`);&#xA;    process.stdout.write(`running for: ${downloadedMinutes.toFixed(2)}minutes`);&#xA;    process.stdout.write(`, estimated time left: ${estimatedDownloadTime.toFixed(2)}minutes `);&#xA;    readline.moveCursor(process.stdout, 0, -1);&#xA;  });&#xA;&#xA;&#xA;function merge(){&#xA;    ffmpeg()&#xA;    .input("./videotest.mp4") //your video file input path&#xA;    .input("./audiotest.mp3") //your audio file input path&#xA;    .output("./finished.mp4") //your output path&#xA;    .outputOptions([&#x27;-map 0:v&#x27;, &#x27;-map 1:a&#x27;, &#x27;-c:v copy&#x27;, &#x27;-shortest&#x27;])&#xA;    .on(&#x27;start&#x27;, (command) => {&#xA;      console.log(&#x27;TCL: command -> command&#x27;, command)&#xA;    })&#xA;    .on(&#x27;error&#x27;, (error) => console.log("errrrr",error))&#xA;    .on(&#x27;end&#x27;,()=>console.log("Completed"))&#xA;    .run()  &#xA;}&#xA;&#xA;video.on(&#x27;end&#x27;, () => {&#xA;  process.stdout.write(&#x27;\n\n&#x27;);&#xA;  merge();&#xA;});&#xA;&#xA;</name></url>

    &#xA;

    But even though the files are there ffmpeg throws me this error :&#xA;enter image description here

    &#xA;

    I also tried this in the video-end callback, because maybe the audio is finished downloading before the video, still doesn't work. I've also tried to rename the outputDirs for the files and keep the old files and rerun the script so the files are 100% there. Still doesn't work.

    &#xA;

    I have also tried absolute paths ("C :/..." also with backslash "C :\...") but I still get the error message that the input file path can't be empty.

    &#xA;

    Appreciate any piece of advise or help !

    &#xA;

  • Ffmpeg x265 error : "Color Primaries must be", "ransfer Characteristics must be", "Matrix Coefficients must be" [closed]

    16 septembre 2022, par Mister Sir

    I'm trying to do the following conversion :

    &#xA;

    ffmpeg -i video.mp4 -map 0 -c copy -c:v libx265 -crf 30 -vf "scale=-1:\&#x27;min(720,ih)\&#x27;" -c:a libopus -b:a 44k -map_metadata 0 -loglevel error -hide_banner video.mkv&#xA;

    &#xA;

    This works fine except for a specific video. I'm getting the following output :

    &#xA;

    x265 [info]: HEVC encoder version 3.5&#x2B;39-7c7ea0a4b&#xA;x265 [info]: build info [Windows][GCC 12.1.0][64 bit] 8bit&#x2B;10bit&#x2B;12bit&#xA;x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX&#xA;x265 [error]: Color Primaries must be unknown, bt709, bt470m, bt470bg, smpte170m, smpte240m, film, bt2020, smpte-st-428, smpte-rp-431 or smpte-eg-432&#xA;x265 [error]: Transfer Characteristics must be unknown, bt709, bt470m, bt470bg, smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, bt2020-10, bt2020-12, smpte-st-2084, smpte-st-428 or arib-std-b67&#xA;x265 [error]: Matrix Coefficients must be unknown, bt709, fcc, bt470bg, smpte170m, smpte240m, gbr, ycgco, bt2020nc, bt2020c, smpte-st-2085, chroma-nc, chroma-c or ictcp&#xA;[libx265 @ 00000000005a2940] Cannot open libx265 encoder.&#xA;

    &#xA;

    Can't find a single result when I google the first error text, ffmpeg "Color Primaries must be unknown"

    &#xA;

    This is the verbose output :

    &#xA;

    ffmpeg version 2022-06-16-git-5242ede48d-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with gcc 11.3.0 (Rev1, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      57. 27.100 / 57. 27.100&#xA;  libavcodec     59. 33.100 / 59. 33.100&#xA;  libavformat    59. 25.100 / 59. 25.100&#xA;  libavdevice    59.  6.100 / 59.  6.100&#xA;  libavfilter     8. 41.100 /  8. 41.100&#xA;  libswscale      6.  6.100 /  6.  6.100&#xA;  libswresample   4.  6.100 /  4.  6.100&#xA;  libpostproc    56.  5.100 / 56.  5.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;video_2022-07-22_10-01-25.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    creation_time   : 2022-07-04T13:14:36.000000Z&#xA;  Duration: 00:01:04.32, start: 0.000000, bitrate: 342 kb/s&#xA;  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, reserved, progressive), 1280x720, 209 kb/s, 24.99 fps, 50 tbr, 90k tbn (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-07-04T13:14:29.000000Z&#xA;      handler_name    : VideoHandle&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-07-04T13:14:29.000000Z&#xA;      handler_name    : SoundHandle&#xA;      vendor_id       : [0][0][0][0]&#xA;Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 0, only the last option &#x27;-c:v libx265&#x27; will be used.&#xA;Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 1, only the last option &#x27;-c:a libopus&#x27; will be used.&#xA;File &#x27;C:\Users\Administrator\Downloads\delendum\New folder\testout.mkv&#x27; already exists. Overwrite? [y/N] Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> opus (libopus))&#xA;Press [q] to stop, [?] for help&#xA;x265 [info]: HEVC encoder version 3.5&#x2B;37-07b011400&#xA;x265 [info]: build info [Windows][GCC 11.2.0][64 bit] 8bit&#x2B;10bit&#x2B;12bit&#xA;x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2&#xA;x265 [error]: Color Primaries must be unknown, bt709, bt470m, bt470bg, smpte170m, smpte240m, film, bt2020, smpte-st-428, smpte-rp-431 or smpte-eg-432&#xA;x265 [error]: Transfer Characteristics must be unknown, bt709, bt470m, bt470bg, smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, bt2020-10, bt2020-12, smpte-st-2084, smpte-st-428 or arib-std-b67&#xA;x265 [error]: Matrix Coefficients must be unknown, bt709, fcc, bt470bg, smpte170m, smpte240m, gbr, ycgco, bt2020nc, bt2020c, smpte-st-2085, chroma-nc, chroma-c or ictcp&#xA;[libx265 @ 0000000002e60340] Cannot open libx265 encoder.&#xA;Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height&#xA;[libopus @ 000000000056fe00] 1 frames left in the queue on closing&#xA;Conversion failed!&#xA;

    &#xA;

    I'm not an expert at video encoding, so I don't really know what this all means. Probably something with the source file. How to get around this ? Thanks in advance ! If I need to upload the video, let me know how I can do that.

    &#xA;

  • how to remux/fix video file saved with testdisk that reports error "Invalid NAL unit size"

    18 août 2022, par Luka

    I have deleted a video file from an SD card and then 'undeleted' it with tool called testdisk for Linux. It saved complete file (6Gb), but video seems broken (can't be played by any video players) and ffprobe reports :

    &#xA;

    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c613baef00] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1000&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c613baef00] st: 0 edit list 1 Cannot find an index entry before timestamp: 1000.&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c613baef00] Found duplicated MOOV Atom. Skipped it&#xA;[aac @ 0x55c613bb6dc0] channel element 3.6 is not allocated&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-2119335523 > 644375).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (1846222201 > 61596).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-864346179 > 57764).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (822755552 > 161099).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (188456672 > 131075).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-2009136561 > 113517).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-821906870 > 228207).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-516947408 > 120554).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (268246533 > 115897).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-1483463928 > 238451).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-1693450506 > 114421).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (1048922816 > 114846).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-600883429 > 357422).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-1612859848 > 93601).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-600474974 > 111975).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (321873764 > 211226).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-665491613 > 92183).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (258461639 > 95290).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (713914840 > 195792).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-556556768 > 93998).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-1864278243 > 94783).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-333442404 > 203732).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (1836887686 > 95706).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (125657193 > 96573).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-2049008956 > 342294).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (650110420 > 98067).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (694115932 > 100359).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (955742608 > 204098).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (1004021052 > 100944).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-885264782 > 100557).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[h264 @ 0x55c613bb0cc0] Invalid NAL unit size (-1074298568 > 209804).&#xA;[h264 @ 0x55c613bb0cc0] Error splitting the input into NAL units.&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c613baef00] decoding for stream 0 failed&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c613baef00] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none(pc, bt709), 1920x1080, 29593 kb/s): unspecified pixel format&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;MVI_1399.MP4&#x27;:&#xA;  Metadata:&#xA;    creation_time   : 2022-08-17T17:13:19.000000Z&#xA;    major_brand     : mp42&#xA;    minor_version   : 1&#xA;    make            : &#xA;    make-eng        : &#xA;    model           : &#xA;    model-eng       : &#xA;    compatible_brands: mp42avc1CAEP&#xA;  Duration: 00:29:59.08, start: 0.000000, bitrate: 29879 kb/s&#xA;    Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), none(pc, bt709), 1920x1080, 29593 kb/s, 25 fps, 25 tbr, 25k tbn, 50k tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-08-17T17:13:19.000000Z&#xA;    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2022-08-17T17:13:19.000000Z&#xA;

    &#xA;

    I'm no programmer, but have used ffmpeg a lot. How can I remux (or even re-encode) such file to fix this and make the file usable for further work ?

    &#xA;

    I have created a 10seconds snippet with ffmpeg -i MVI_1399.MP4 -t 00:00:10 -c copy MVI_1399_10sec.mp4 for anyone to check. I also created a ten second snippet from a functioning clip from the same camera (I presume same codec parameters etc) :

    &#xA;

    https://cb.emanat.si/s/WzTCxHDkzGw3gM3

    &#xA;