Recherche avancée

Médias (0)

Mot : - Tags -/masques

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

Autres articles (7)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • 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 ; (...)

Sur d’autres sites (3768)

  • ffmepg why error :Failed to write core dump

    9 juillet 2021, par dmouse

    I wang to implement a feature that allows me to save RTSP stram as a file,
use javacv implement a demo,but there's an error.
i debug the demo , execute 'recorder.record(frame) ;' error, "ulimit -c unlimited" is useless,the program still reports an error.
review of the source code did note find the problem principle.pleace give me a hand.

    


    import org.bytedeco.javacpp.avcodec;
import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.FFmpegFrameRecorder;
import org.bytedeco.javacv.Frame;

import java.io.File;
import java.io.IOException;

/**
 * @ClassName video
 * @Description TODO
 * @Author mouse
 * @Date 2021/7/9 11:13
 * @Version 1.0
 **/
public class Video {
    public static void main(String[] args) {
        String streamUrl = "rtsp://admin:12345678.@192.168.20.180:554/h265/ch1/main/av_stream";
        String filePath = "./video/hello.mp3";
        File outFile = new File(filePath);
        FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(streamUrl);
        if (!outFile.getParentFile().exists()) {
            outFile.getParentFile().mkdirs();
        }
        FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(filePath,1080,1440, 1);
        recorder.setVideoCodec(avcodec.AV_CODEC_ID_H265);
        recorder.setFormat("flv");
        recorder.setVideoBitrate(4000);
        try {
            grabber.start();
            recorder.start();
            Frame frame = grabber.grabFrame();
            while (frame!=null){
                recorder.record(frame);
                frame = grabber.grabFrame();
            }
            recorder.record(frame);
            recorder.stop();
            grabber.stop();

        } catch (FFmpegFrameGrabber.Exception e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (recorder != null) {
                    recorder.stop();
                }
                if (grabber != null) {
                    grabber.stop();
                }
            } catch (FFmpegFrameRecorder.Exception | FFmpegFrameGrabber.Exception e) {
                e.printStackTrace();
            }
        }
    }
}



    


    log error

    


    #
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000131fef233, pid=50498, tid=0x0000000000001003
#
# JRE version: Java(TM) SE Runtime Environment (8.0_281-b09) (build 1.8.0_281-b09)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.281-b09 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libavformat.57.dylib+0xbf233]  av_write_frame+0x993
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#


    


    pom :

    


            <dependency>&#xA;            <groupid>org.bytedeco</groupid>&#xA;            <artifactid>javacv</artifactid>&#xA;            <version>1.4.3</version>&#xA;        </dependency>&#xA;        <dependency>&#xA;            <groupid>org.bytedeco.javacpp-presets</groupid>&#xA;            <artifactid>ffmpeg-platform</artifactid>&#xA;            <version>4.0.2-1.4.3</version>&#xA;        </dependency>&#xA;

    &#xA;

    My os : macOS Bgi Sur 11.4 ;
    &#xA;JDK : 1.8.0_281
    &#xA;execute 'recorder.record(frame) ;' error,&#xA;"ulimit -c unlimited" is useless,the program still reports an error .

    &#xA;

  • MKV video playback shows a black picture and audio plays good

    24 mars 2023, par gbriones.gdl

    I have an MKV video file that has something wrong, every time I start my player, the video shows full black picture and the audio starts playing good, if I use the seek bar to position the playback anywhere in the time, then the video shows correct picture but audio stops playing, eventually (it takes several seconds) audio starts playing again in sync with video.

    &#xA;

    The player I am using is the one in Kodi 20.1.0, I have tried enabling/disabling HW acceleration without success.

    &#xA;

    I also tried VLC 3.0.16, which has a simmilar behavior with the exception that video starts showing from the very begining when opening the file, just when seeking the audio stops for several seconds.

    &#xA;

    I also tried using ffmpeg to reencode the video with different codecs without success, I have tried multiple video and audio codec combinations, and also tried changing the pixel format.

    &#xA;

    Then eventually I managed to fix the video by extracting streams into separate files, then merge them again, without reencoding, I thought that maybe something could be wrong with the metadata of the video, so I copied the same metadata and final output file still works fine. My question is how can I fix my video without having to split and merge streams ?

    &#xA;

    Here is the info about my input file :

    &#xA;

    $ ffmpeg -i S01E08.mkv &#xA;ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)&#xA;  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&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;Input #0, matroska,webm, from &#x27;S01E08.mkv&#x27;:&#xA;  Metadata:&#xA;    ENCODER         : Lavf59.27.100&#xA;  Duration: 00:25:02.21, start: 0.000000, bitrate: 1382 kb/s&#xA;  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt470bg/unknown/unknown, progressive), 1280x960, 59.94 fps, 59.94 tbr, 1k tbn, 59.94 tbc&#xA;    Metadata:&#xA;      ENCODER         : Lavc59.37.100 libx265&#xA;      DURATION        : 00:25:00.032000000&#xA;  Stream #0:1(spa): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default)&#xA;    Metadata:&#xA;      title           : Stereo&#xA;      DURATION        : 00:25:02.207000000&#xA;  Stream #0:2(jpn): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp&#xA;    Metadata:&#xA;      title           : Stereo&#xA;      DURATION        : 00:25:00.116000000&#xA;  Stream #0:3(spa): Subtitle: ass&#xA;    Metadata:&#xA;      ENCODER         : Lavc59.37.100 ssa&#xA;      DURATION        : 00:24:56.585000000&#xA;At least one output file must be specified&#xA;

    &#xA;

    Here are the steps I followed to fix the video, I had to use mkv format for the outputs because other formats were no good at writing metadata :

    &#xA;

    ffmpeg -i S01E08.mkv -map 0:v:0 -c:v copy -map_metadata 0 video.mkv&#xA;ffmpeg -i S01E08.mkv -map 0:a:0 -c:a copy -map_metadata 0 audio1.mkv&#xA;ffmpeg -i S01E08.mkv -map 0:a:1 -c:a copy -map_metadata 0 audio2.mkv&#xA;ffmpeg -i S01E08.mkv -map 0:s -c:s copy -map_metadata 0 subs.mkv&#xA;ffmpeg -i video.mkv -i audio1.mkv -i audio2.mkv -i subs.mkv -map 0:v -map 1:a -map 2:a -map 3:s -c:v copy -c:a copy -c:s copy -map_metadata 0 -map_metadata 1 -map_metadata 2 -map_metadata 3 -disposition:s:0 0 -default_mode infer_no_subs video_audio.mkv&#xA;

    &#xA;

    I had to compare both input and output files :

    &#xA;

    $ ffmpeg -i video_audio.mkv&#xA;ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)&#xA;  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&#xA;  libavutil      56. 70.100 / 56. 70.100&#xA;  libavcodec     58.134.100 / 58.134.100&#xA;  libavformat    58. 76.100 / 58. 76.100&#xA;  libavdevice    58. 13.100 / 58. 13.100&#xA;  libavfilter     7.110.100 /  7.110.100&#xA;  libswscale      5.  9.100 /  5.  9.100&#xA;  libswresample   3.  9.100 /  3.  9.100&#xA;  libpostproc    55.  9.100 / 55.  9.100&#xA;Input #0, matroska,webm, from &#x27;video_audio.mkv&#x27;:&#xA;  Metadata:&#xA;    ENCODER         : Lavf58.76.100&#xA;  Duration: 00:25:02.21, start: 0.000000, bitrate: 1382 kb/s&#xA;  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt470bg/unknown/unknown, progressive), 1280x960, 59.94 fps, 59.94 tbr, 1k tbn, 59.94 tbc (default)&#xA;    Metadata:&#xA;      ENCODER         : Lavc59.37.100 libx265&#xA;      DURATION        : 00:25:00.031000000&#xA;  Stream #0:1(spa): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default)&#xA;    Metadata:&#xA;      title           : Stereo&#xA;      DURATION        : 00:25:02.207000000&#xA;  Stream #0:2(jpn): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp&#xA;    Metadata:&#xA;      title           : Stereo&#xA;      DURATION        : 00:25:00.116000000&#xA;  Stream #0:3(spa): Subtitle: ass&#xA;    Metadata:&#xA;      ENCODER         : Lavc59.37.100 ssa&#xA;      DURATION        : 00:24:56.585000000&#xA;At least one output file must be specified&#xA;&#xA;$ ffprobe -show_streams S01E08.mkv > probe_bad.txt&#xA;$ ffprobe -show_streams video_audio.mkv > probe_good.txt&#xA;$ diff probe_bad.txt probe_good.txt &#xA;32,33c32,33&#xA;&lt; duration_ts=1502207&#xA;&lt; duration=1502.207000&#xA;---&#xA;> duration_ts=N/A&#xA;> duration=N/A&#xA;40c40&#xA;&lt; DISPOSITION:default=0&#xA;---&#xA;> DISPOSITION:default=1&#xA;53c53&#xA;&lt; TAG:DURATION=00:25:00.032000000&#xA;---&#xA;> TAG:DURATION=00:25:00.031000000&#xA;

    &#xA;

    Then I thought that maybe the disposition flag in the video stream was causing the error, so I ran ffmpeg to copy all streams from my input video S01E08.mkv and added the disposition flag with the following command :

    &#xA;

    ffmpeg -i S01E08.mkv -map 0:v -map 0:a:0 -map 0:a:1 -map 0:s -c:v copy -c:a copy -c:s copy -map_metadata 0 -disposition:v:0 default -disposition:s:0 0 -default_mode infer_no_subs test.mkv&#xA;

    &#xA;

    Still no luck, test.mkv shows no video when opening the file, I had to double check that disposition flag was changed :

    &#xA;

    $ ffprobe -show_streams test.mkv > probe_bad2.txt&#xA;$ diff probe_bad.txt probe_bad2.txt &#xA;40c40&#xA;&lt; DISPOSITION:default=0&#xA;---&#xA;> DISPOSITION:default=1&#xA;53c53&#xA;&lt; TAG:DURATION=00:25:00.032000000&#xA;---&#xA;> TAG:DURATION=00:25:00.031000000&#xA;

    &#xA;

    In other words I have to focibly split and merge to make the file work correctly. May be I need to set the duration and duration_ts of the video stream to N/A but I don't know how to do this.

    &#xA;

  • Lost video when converting from MKV to MP4 with FFMPEG

    25 décembre 2022, par Francesco Virga

    I'm trying to come up with a robust script to handle all MKV -> MP4 video conversions.

    &#xA;

    The classic example I've found is ffmpeg -i input.mkv -codec copy output.mp4. This works for most videos, but I find that the video stream gets lost for certain videos. Using -map 0 doesn't help, the examples I'm using only have one video stream and one audio stream.

    &#xA;

    If I only copy the audio codec, it seems to work fine, but takes much longer since video is re-encoded. For this I'm use ffmpeg -i input.mkv -c:a copy output.mp4. I'm fine to use this for certain videos, but am not sure how to determine whether video re-encoding is needed or not (since I want to avoid it when possible).

    &#xA;

    Here's the output I get when I run the first command and lose video :

    &#xA;

    % ffmpeg -i input.mkv -codec copy output.mp4&#xA;&#xA;ffmpeg version N-103075-g4c694093be-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple clang version 11.0.0 (clang-1100.0.33.17)&#xA;  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay&#xA;  libavutil      57.  2.100 / 57.  2.100&#xA;  libavcodec     59.  3.102 / 59.  3.102&#xA;  libavformat    59.  4.101 / 59.  4.101&#xA;  libavdevice    59.  0.100 / 59.  0.100&#xA;  libavfilter     8.  1.103 /  8.  1.103&#xA;  libswscale      6.  0.100 /  6.  0.100&#xA;  libswresample   4.  0.100 /  4.  0.100&#xA;  libpostproc    56.  0.100 / 56.  0.100&#xA;Input #0, matroska,webm, from &#x27;input.mkv&#x27;:&#xA;  Metadata:&#xA;    CREATION_TIME   :&#xA;    ENCODER         : Lavf55.12.0&#xA;  Duration: 00:59:15.97, start: 0.062000, bitrate: 1892 kb/s&#xA;  Stream #0:0: Video: hevc (Main), yuv420p(tv, bt709), 1912x1072 [SAR 1:1 DAR 239:134], 23.98 fps, 23.98 tbr, 1k tbn (default)&#xA;  Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)&#xA;    Metadata:&#xA;      title           : Surround&#xA;      LANGUAGE        : eng&#xA;  Stream #0:2(eng): Subtitle: ass (default)&#xA;  Stream #0:3(eng): Subtitle: ass&#xA;Output #0, mp4, to &#x27;output.mp4&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf59.4.101&#xA;  Stream #0:0: Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709), 1912x1072 [SAR 1:1 DAR 239:134], q=2-31, 23.98 fps, 23.98 tbr, 16k tbn (default)&#xA;  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp (default)&#xA;    Metadata:&#xA;      title           : Surround&#xA;      LANGUAGE        : eng&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;  Stream #0:1 -> #0:1 (copy)&#xA;Press [q] to stop, [?] for help&#xA;frame=32634 fps=0.0 q=-1.0 size=  295424kB time=00:22:41.04 bitrate=1778.1kbits/s speed=2.72e&#x2B;03x frame=63776 fps=63775 q=-1.0 size=  611840kB time=00:44:19.94 bitrate=1884.3kbits/s speed=2.66e&#x2B;03frame=85256 fps=62686 q=-1.0 Lsize=  822207kB time=00:59:15.83 bitrate=1894.2kbits/s speed=2.61e&#x2B;03x&#xA;video:736136kB audio:83404kB subtitle:0kB other streams:0kB global headers:1kB muxing overhead: 0.325361%&#xA;

    &#xA;