Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (73)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Le plugin : Gestion de la mutualisation

    2 mars 2010, par

    Le plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
    Installation basique
    On installe les fichiers de SPIP sur le serveur.
    On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
    On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
    < ?php (...)

Sur d’autres sites (10318)

  • Thumbnail generation using golang+ffmpeg

    23 avril 2024, par godvlpr

    I try to generate thumbnail from video mp4 using Golang+ffmpeg.

    &#xA;

    Let me provide some steps :

    &#xA;

      &#xA;
    1. Tried to generate using terminal ffmpeg -i test.mp4 -ss 00:00:00 -vframes 1 thumbnail.jpg - all works successfully
    2. &#xA;

    3. Tried to generate from golang and put result into stdout   cmd := exec.Command("ffmpeg", "-i", "test.mp4", "-ss", "00:00:00", "-vframes", "1", "-f", "image2pipe", "-") - all works successfully
    4. &#xA;

    5. Trying to open video using os.ReadFile and bytes.NewReader and after that -   cmd := exec.Command("ffmpeg", "-i", "pipe:", "-ss", "00:00:00", "-vframes", "1", "-f", "image2pipe", "-") And in this step I have an error.&#xA;Below provided all code and na error
    6. &#xA;

    &#xA;

        r, err := os.ReadFile("test.mp4")&#xA;    if err != nil {&#xA;        log.Fatalf("Failed to read video file: %v", err)&#xA;    }&#xA;    &#xA;    videoBuffer := bytes.NewReader(r)&#xA;&#xA;    cmd := exec.Command("ffmpeg", "-i", "pipe:", "-ss", "00:00:00", "-vframes", "1", "-f", "image2pipe", "-")&#xA;&#xA;    cmd.Stdin = videoBuffer&#xA;&#xA;    // Capture output as bytes&#xA;    var out bytes.Buffer&#xA;    cmd.Stdout = &amp;out&#xA;&#xA;    var stderr bytes.Buffer&#xA;    cmd.Stderr = &amp;stderr&#xA;&#xA;    // Run the command&#xA;    err = cmd.Run()&#xA;    if err != nil {&#xA;        log.Fatalf("ffmpeg command failed: %v, stderr: %s", err, stderr.String())&#xA;    }&#xA;&#xA;    // Convert bytes to image.Image&#xA;    img, _, err := image.Decode(&amp;out)&#xA;    if err != nil {&#xA;        log.Fatalf("Failed to decode thumbnail: %v", err)&#xA;    }&#xA;

    &#xA;

    Error

    &#xA;

    2024/04/23 13:25:51 ffmpeg command failed: exit status 183, stderr: ffmpeg version 7.0 Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.3.9.4)&#xA;  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags=&#x27;-Wl,-ld_classic&#x27; --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon&#xA;  libavutil      59.  8.100 / 59.  8.100&#xA;  libavcodec     61.  3.100 / 61.  3.100&#xA;  libavformat    61.  1.100 / 61.  1.100&#xA;  libavdevice    61.  1.100 / 61.  1.100&#xA;  libavfilter    10.  1.100 / 10.  1.100&#xA;  libswscale      8.  1.100 /  8.  1.100&#xA;  libswresample   5.  1.100 /  5.  1.100&#xA;  libpostproc    58.  1.100 / 58.  1.100&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x136504080] stream 0, offset 0x30: partial file&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x136504080] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080, 3496 kb/s): unspecified pixel format&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; (0) and &#x27;probesize&#x27; (5000000) options&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;pipe:&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.26.100&#xA;  Duration: 00:00:02.01, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none, 1920x1080, 3496 kb/s, 25 fps, 25 tbr, 12800 tbn (default)&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 96 kb/s (default)&#xA;      Metadata:&#xA;        handler_name    : SoundHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))&#xA;[mov,mp4,m4a,3gp,3g2,mj2 @ 0x136504080] stream 0, offset 0x30: partial file&#xA;[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x600001134000] Error during demuxing: Invalid data found when processing input&#xA;Cannot determine format of input 0:0 after EOF&#xA;[vf#0:0 @ 0x600001f2c000] Task finished with error code: -1094995529 (Invalid data found when processing input)&#xA;[vf#0:0 @ 0x600001f2c000] Terminating thread with return code -1094995529 (Invalid data found when processing input)&#xA;[vost#0:0/mjpeg @ 0x104a04650] Could not open encoder before EOF&#xA;[vost#0:0/mjpeg @ 0x104a04650] Task finished with error code: -22 (Invalid argument)&#xA;[vost#0:0/mjpeg @ 0x104a04650] Terminating thread with return code -22 (Invalid argument)&#xA;[out#0/image2pipe @ 0x60000182c000] Nothing was written into output file, because at least one of its streams received no packets.&#xA;frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A    &#xA;Conversion failed!&#xA;

    &#xA;

    Also tried to do something like this cmd := exec.Command("ffmpeg", "-analyzeduration", "10000M", "-probesize", "10000M", "-i", "pipe:", "-ss", "00:00:00", "-vframes", "1", "-f", "image2pipe", "-") - and had the same error (almost the same).

    &#xA;

    How to fix code or ffmpeg command - to bring this code workable ?

    &#xA;

  • FFmpeg - record from stream terminating unexpectedly using kokorin/Jaffree ffmpeg wrapper for Java

    18 avril 2024, par pyrmon

    I am programming a Spring Boot Application using Maven and Java 21. I am trying to record a stream from a url and save it to a mkv file. I intend to do this with kokorin/Jaffree in version 2023.09.10. The recording seems to work ok, however longer videos are terminating unexpectedly. Sometimes after 5 minutes, other times an hour or even longer. Sometimes with Exit Code 0 and sometimes with 1.

    &#xA;

    I have implemented the recording like this :

    &#xA;

    @Override&#xA;    public void startRecording(RecordingSchedule recordingSchedule) {&#xA;        logger.info("Starting recording for schedule with filename {}", recordingSchedule.getFileName());&#xA;&#xA;        String m3uUrl = recordingSchedule.getM3uUrl();&#xA;        LocalDateTime endTime = timeUtils.parseStringToLocalDateTime(recordingSchedule.getEndTime());&#xA;        LocalDateTime stopTime = endTime.plusSeconds(20);&#xA;        String timeToRecord = timeUtils.calculateTimeToRecord(stopTime);&#xA;        Path outputPath = Paths.get("/recordings/" &#x2B; recordingSchedule.getFileName());&#xA;&#xA;        try {&#xA;            FFmpeg.atPath()&#xA;                  .addInput(UrlInput.fromUrl(m3uUrl))&#xA;                  .addArgument("-xerror")&#xA;                  .addArguments("-reconnect", "5")&#xA;                  .addArguments("-reconnect_streamed", "5")&#xA;                  .addArguments("-reconnect_delay_max", "20")&#xA;                  .addArguments("-t", timeToRecord)&#xA;                  .addArguments("-c", "copy")&#xA;                  .addOutput(&#xA;                      UrlOutput.toPath(outputPath))&#xA;                  .setLogLevel(LogLevel.WARNING)&#xA;                  .execute();&#xA;            logger.info("Recording complete. Output file: {}", outputPath.toAbsolutePath());&#xA;        } catch (Exception e) {&#xA;            logger.error("Error recording M3U stream {}: {}", recordingSchedule.getFileName(), e.getMessage());&#xA;        }&#xA;    }&#xA;

    &#xA;

    And I am calling the method like this :&#xA;executorConfig.executorService().submit(() -> ffmpegService.startRecording(recording));

    &#xA;

    Any ideas what I am doing wrong ?&#xA;Here are the log lines at the beginning and end of recording of the past two attempts :

    &#xA;

    2024-04-18T00:54:48.689&#x2B;02:00  INFO 1 --- [pool-2-thread-1] m.s.r.service.impl.FfmpegServiceImpl     : Starting recording for schedule with filename Example1.mkv&#xA;2024-04-18T00:54:48.697&#x2B;02:00  WARN 1 --- [pool-2-thread-1] c.github.kokorin.jaffree.ffmpeg.FFmpeg   : ProgressListener isn&#x27;t set, progress won&#x27;t be reported&#xA;2024-04-18T00:54:48.698&#x2B;02:00  INFO 1 --- [pool-2-thread-1] c.g.k.jaffree.process.ProcessHandler     : Command constructed:&#xA;ffmpeg -loglevel level&#x2B;warning -i http://example.stream.url.com -n -xerror -reconnect 5 -reconnect_streamed 5 -reconnect_delay_max 20 -t 10771 -c copy /recordings/Example1.mkv&#xA;2024-04-18T00:54:48.698&#x2B;02:00  INFO 1 --- [pool-2-thread-1] c.g.k.jaffree.process.ProcessHandler     : Starting process: ffmpeg&#xA;2024-04-18T00:54:48.701&#x2B;02:00  INFO 1 --- [pool-2-thread-1] c.g.k.jaffree.process.ProcessHandler     : Waiting for process to finish&#xA;2024-04-18T01:31:02.633&#x2B;02:00  WARN 1 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [h264 @ 0x559cd22dd940] [warning] Increasing reorder buffer to 2&#xA;2024-04-18T01:31:02.633&#x2B;02:00  INFO 1 --- [pool-2-thread-1] c.g.k.jaffree.process.ProcessHandler     : Process has finished with status: 0&#xA;2024-04-18T01:31:02.734&#x2B;02:00  INFO 1 --- [pool-2-thread-1] m.s.r.service.impl.FfmpegServiceImpl     : Recording complete. Output file: /recordings/Example1.mkv&#xA;&#xA;2024-04-18T03:54:48.678&#x2B;02:00  INFO 1 --- [pool-2-thread-2] m.s.r.service.impl.FfmpegServiceImpl     : Starting recording for schedule with filename Example2.mkv&#xA;2024-04-18T03:54:48.678&#x2B;02:00  WARN 1 --- [pool-2-thread-2] c.github.kokorin.jaffree.ffmpeg.FFmpeg   : ProgressListener isn&#x27;t set, progress won&#x27;t be reported&#xA;2024-04-18T03:54:48.678&#x2B;02:00  INFO 1 --- [pool-2-thread-2] c.g.k.jaffree.process.ProcessHandler     : Command constructed:&#xA;ffmpeg -loglevel level&#x2B;warning -i http://example.stream.url.com/ -n -xerror -reconnect 5 -reconnect_streamed 5 -reconnect_delay_max 20 -t 11431 -c copy /recordings/Example2.mkv&#xA;2024-04-18T03:54:48.678&#x2B;02:00  INFO 1 --- [pool-2-thread-2] c.g.k.jaffree.process.ProcessHandler     : Starting process: ffmpeg&#xA;2024-04-18T03:54:48.679&#x2B;02:00  INFO 1 --- [pool-2-thread-2] c.g.k.jaffree.process.ProcessHandler     : Waiting for process to finish&#xA;2024-04-18T04:57:22.256&#x2B;02:00  WARN 1 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [h264 @ 0x55707ba988c0] [warning] Increasing reorder buffer to 3&#xA;2024-04-18T04:58:47.455&#x2B;02:00 ERROR 1 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [NULL @ 0x55707ba988c0] [error] Picture timing SEI payload too large&#xA;2024-04-18T04:58:47.456&#x2B;02:00 ERROR 1 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [NULL @ 0x55707ba988c0] [error] non-existing PPS 1 referenced&#xA;2024-04-18T04:58:47.456&#x2B;02:00  WARN 1 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [matroska @ 0x55707ba9a380] [warning] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly&#xA;2024-04-18T04:58:47.456&#x2B;02:00 ERROR 1 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [matroska @ 0x55707ba9a380] [error] Can&#x27;t write packet with unknown timestamp&#xA;2024-04-18T04:58:47.463&#x2B;02:00 ERROR 1 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [error] av_interleaved_write_frame(): Invalid argument&#xA;2024-04-18T04:58:47.463&#x2B;02:00  INFO 1 --- [pool-2-thread-2] c.g.k.jaffree.process.ProcessHandler     : Process has finished with status: 1&#xA;2024-04-18T04:58:47.564&#x2B;02:00 ERROR 1 --- [pool-2-thread-2] m.s.r.service.impl.FfmpegServiceImpl     : Error recording M3U stream Example2.mkv: Process execution has ended with non-zero status: 1. Check logs for detailed error message.&#xA;

    &#xA;

    They were supposed to run nearly 3 hours and the other one over 3 hours. And with the timestamps you can see that they are not running nearly as long.&#xA;Thank you for your help !

    &#xA;

  • FFmpeg -ss parameter is the video duration, Output file is empty

    16 avril 2024, par noun nil

    The main function is to obtain the corresponding video frame based on the input seconds.Before processing, the duration of the video will be obtained to determine whether the input is within the duration range of the video. If so, the corresponding instruction will be executed.

    &#xA;

    > ffprobe input.mp4&#xA;  ...&#xA;  Duration: 00:00:28.05, start: 0.000000, bitrate: 1136 kb/s&#xA;

    &#xA;

    > ffmpeg -ss 00:00:28 -i input.mp4 -frames:v 1 output.png&#xA; ffmpeg version 7.0 Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with Apple clang version 15.0.0 (clang-1500.3.9.4)&#xA;  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags=&#x27;-Wl,-ld_classic&#x27; --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenvino --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon&#xA;  libavutil      59.  8.100 / 59.  8.100&#xA;  libavcodec     61.  3.100 / 61.  3.100&#xA;  libavformat    61.  1.100 / 61.  1.100&#xA;  libavdevice    61.  1.100 / 61.  1.100&#xA;  libavfilter    10.  1.100 / 10.  1.100&#xA;  libswscale      8.  1.100 /  8.  1.100&#xA;  libswresample   5.  1.100 /  5.  1.100&#xA;  libpostproc    58.  1.100 / 58.  1.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;input.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    encoder         : Lavf58.29.100&#xA;    description     : Packed by Bilibili XCoder v2.0.2&#xA;  Duration: 00:00:28.05, start: 0.000000, bitrate: 1136 kb/s&#xA;  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 720x1280 [SAR 1:1 DAR 9:16], 1005 kb/s, 25.27 fps, 25.25 tbr, 16k tbn (default)&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;      Metadata:&#xA;        handler_name    : SoundHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> png (native))&#xA;Press [q] to stop, [?] for help&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e48000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e58000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e68000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e78000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e88000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110e98000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110ea8000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110eb8000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[swscaler @ 0x1187a0000] [swscaler @ 0x110ec8000] No accelerated colorspace conversion found from yuv420p to rgb24.&#xA;[vost#0:0/png @ 0x12ce06840] No filtered frames for output stream, trying to initialize anyway.&#xA;Output #0, image2, to &#x27;output.png&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    description     : Packed by Bilibili XCoder v2.0.2&#xA;    encoder         : Lavf61.1.100&#xA;  Stream #0:0(und): Video: png, rgb24(progressive), 720x1280 [SAR 1:1 DAR 9:16], q=2-31, 200 kb/s, 25.25 fps, 16k tbn (default)&#xA;      Metadata:&#xA;        handler_name    : VideoHandler&#xA;        vendor_id       : [0][0][0][0]&#xA;        encoder         : Lavc61.3.100 png&#xA;[out#0/image2 @ 0x600000e983c0] video:0KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown&#xA;[out#0/image2 @ 0x600000e983c0] Output file is empty, nothing was encoded(check -ss / -t / -frames parameters if used)&#xA;frame=    0 fps=0.0 q=0.0 Lsize=N/A time=N/A bitrate=N/A speed=N/A    &#xA;&#xA;

    &#xA;

    -ss 00:00:28 within the video duration range, but still cannot obtain frames...

    &#xA;

    -ss 00:00:27 Can obtain video frames

    &#xA;