Recherche avancée

Médias (91)

Autres articles (11)

  • MediaSPIP Init et Diogène : types de publications de MediaSPIP

    11 novembre 2010, par

    À l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
    Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
    Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)

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

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (515)

  • Can't fix this ffmpeg, NoClassDefFoundError org.bytedeco.ffmpeg.global.avutil

    16 mars 2023, par noob234

    I am trying to get the video duration with this library import org.bytedeco.javacv.FFmpegFrameGrabber;

    


    When I upload this mp4 video (https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4), I get this error message :
java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.ffmpeg.global.avutil

    


    It will break when trying to get the 'grabber' :

    


    private void videoInfo(MultipartFile file) {
    try (FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(file.getInputStream())) { // on this line it will break :(
        grabber.start();
        long durationMs = grabber.getLengthInTime();
    } catch (FrameGrabber.Exception e) {
        throw new RuntimeException(e);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}


    


    This is my build.gradle :

    


    plugins {
    id 'java'
    id 'org.springframework.boot' version '2.7.9'
    id 'io.spring.dependency-management' version '1.0.15.RELEASE'
}

group = 'com.nob234'
version = '0.0.1-SNAPSHOT'

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web'
    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    implementation 'org.springdoc:springdoc-openapi-ui:1.6.9'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    runtimeOnly 'org.postgresql:postgresql'
    // for logging
    implementation 'org.slf4j:slf4j-api:1.7.30'
    implementation 'org.slf4j:jcl-over-slf4j:1.7.30'
    implementation 'org.slf4j:log4j-over-slf4j:1.7.30'
    implementation 'ch.qos.logback:logback-classic:1.2.3'
    implementation 'org.bytedeco:javacv:1.5.8'
}

tasks.named('test') {
    useJUnitPlatform()
}


    


    This is my ffmpeg version :

    


    ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
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-libaribb24 --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-libvpl --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
libavutil      58.  2.100 / 58.  2.100
libavcodec     60.  3.100 / 60.  3.100
libavformat    60.  3.100 / 60.  3.100
libavdevice    60.  1.100 / 60.  1.100
libavfilter     9.  3.100 /  9.  3.100
libswscale      7.  1.100 /  7.  1.100
libswresample   4. 10.100 /  4. 10.100
libpostproc    57.  1.100 / 57.  1.100


    


    Please keep in mind that I use Java 8 in this project and I hope this issue is reproducible. If you want more info please leave a comment.

    


  • Ffmpeg/Fluent-Ffmpeg : Output file #0 does not contain any stream

    16 août 2017, par Code Sherpa

    Use Case

    When a user records an audio file and uploads to firebase storage, run a trigger that crops a clip of that file and saves it to a "preview" directory.

    Problem

    Getting Output file #0 does not contain any stream after static .AAC file is downloaded to temp directory and ffmpeg command is run.

    Environment

    • mac client / firebase storage
    • node v8.1.0
    • ffmpeg v3.2.2
    • fluent-ffmpeg v2.1.2

    Node Code

     var command = new ffmpeg({ source: tempFilePath, timeout: 0 })
         .setFfmpegPath(ffmpegPath)
         .setFfprobePath(ffprobePath)
         .inputOption('-t', '10')
         .inputOption('-ss', '10')
         .outputOption('-acodec', 'copy')
         .on('start', function(commandLine) {
               console.log('Spawned Ffmpeg with command: ', commandLine);
          })
         .on('end', function() {
             console.log('Preview file cropping done successfully');
          })
         .on('error', function(err, stdout, stderr) {
             var build = err;
             if (!stdout === '') { build = build + '\n' + stdout; }
             build = build + '\n' + stderr;

             console.log(build);
          }).save(tempFilePath);

    Ffmpeg Command

    Spawned Ffmpeg with command : ffmpeg -t 10 -ss 10 -i
    /tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac -y -acodec
    copy /tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac

    Debug Output From Firebase

    Error : ffmpeg exited with code 1 : Output #0, adts, to
    ’/tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ : Output
    file #0 does not contain any stream

    ffmpeg version 3.2.2-static http://johnvansickle.com/ffmpeg/
    Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.4.1
    (Debian 5.4.1-4) 20161202 configuration : —enable-gpl
    —enable-version3 —enable-static —disable-debug —disable-ffplay —disable-indev=sndio —disable-outdev=sndio —cc=gcc-5 —enable-fontconfig —enable-frei0r —enable-gnutls —enable-gray —enable-libass —enable-libfreetype —enable-libfribidi —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-libopus —enable-librtmp —enable-libsoxr —enable-libspeex —enable-libtheora —enable-libvidstab —enable-libvo-amrwbenc —enable-libvorbis —enable-libvpx —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxvid —enable-libzimg libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 /
    4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 [aac @ 0x3a00e60] Format aac detected only with low score of 1, misdetection possible ! [aac @ 0x3a00e60] Could
    not find codec parameters for stream 0 (Audio : aac, 0 channels, fltp) :
    unspecified sample rate Consider increasing the value for the
    ’analyzeduration’ and ’probesize’ options
    /tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac : could not
    seek to position 10.000 Input #0, aac, from
    ’/tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ :
    Duration : N/A, bitrate : N/A
    Stream #0:0 : Audio : aac, 0 channels, fltp Output #0, adts, to ’/tmp/2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ : Output
    file #0 does not contain any stream

    Console Output

    | $ ffmpeg -t 10 -ss 10 -i 2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac -y -acodec aac
    output_file.aac

    ffmpeg version 3.2.2 Copyright (c) 2000-2016 the
    FFmpeg developers built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
    configuration : —prefix=/Volumes/Ramdisk/sw —enable-gpl
    —enable-pthreads —enable-version3 —enable-libspeex —enable-libvpx —disable-decoder=libvpx —enable-libmp3lame —enable-libtheora —enable-libvorbis —enable-libx264 —enable-avfilter —enable-libopencore_amrwb —enable-libopencore_amrnb —enable-filters —enable-libgsm —enable-libvidstab —enable-libx265 —disable-doc —arch=x86_64 —enable-runtime-cpudetect libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 /
    4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 [aac @ 0x7fac6c800a00] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from
    ’2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ : Duration :
    00:01:07.71, bitrate : 223 kb/s
    Stream #0:0 : Audio : aac (LC), 44100 Hz, stereo, fltp, 277 kb/s Output #0, adts, to ’output_file.aac’ : Metadata :
    encoder : Lavf57.56.100
    Stream #0:0 : Audio : aac (LC), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata :
    encoder : Lavc57.64.101 aac Stream mapping : Stream #0:0 -> #0:0 (aac (native) -> aac (native)) Press [q] to stop, [?] for help size= 159kB time=00:00:10.00 bitrate= 130.5kbits/s
    speed=12.7x video:0kB audio:156kB subtitle:0kB other streams:0kB
    global headers:0kB muxing overhead : 1.887004% [aac @ 0x7fac6d004600]
    Qavg : 383.548

    Origin File Format

    $ ffprobe -show_format
    2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac

    ffprobe version 3.2.2 Copyright (c) 2007-2016 the FFmpeg developers
    built with llvm-gcc 4.2.1 (LLVM build 2336.11.00) configuration :
    —prefix=/Volumes/Ramdisk/sw —enable-gpl —enable-pthreads —enable-version3 —enable-libspeex —enable-libvpx —disable-decoder=libvpx —enable-libmp3lame —enable-libtheora —enable-libvorbis —enable-libx264 —enable-avfilter —enable-libopencore_amrwb —enable-libopencore_amrnb —enable-filters —enable-libgsm —enable-libvidstab —enable-libx265 —disable-doc —arch=x86_64 —enable-runtime-cpudetect libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 / 57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 /
    4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 [aac @ 0x7fefbd001400] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from
    ’2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac’ : Duration :
    00:01:07.71, bitrate : 223 kb/s
    Stream #0:0 : Audio : aac (LC), 44100 Hz, stereo, fltp, 223 kb/s [FORMAT]
    filename=2EB100B0-6C1E-4D51-9087-764CA653AFC720170711232034.aac
    nb_streams=1 nb_programs=0 format_name=aac format_long_name=raw ADTS
    AAC (Advanced Audio Coding) start_time=N/A duration=67.706333
    size=1892392 bit_rate=223599 probe_score=51 [/FORMAT]

    Output File Format

    $ ffprobe -show_format output_file.aac ffprobe version 3.2.2 Copyright
    (c) 2007-2016 the FFmpeg developers built with llvm-gcc 4.2.1 (LLVM
    build 2336.11.00) configuration : —prefix=/Volumes/Ramdisk/sw
    —enable-gpl —enable-pthreads —enable-version3 —enable-libspeex —enable-libvpx —disable-decoder=libvpx —enable-libmp3lame —enable-libtheora —enable-libvorbis —enable-libx264 —enable-avfilter —enable-libopencore_amrwb —enable-libopencore_amrnb —enable-filters —enable-libgsm —enable-libvidstab —enable-libx265 —disable-doc —arch=x86_64 —enable-runtime-cpudetect libavutil 55. 34.100 / 55. 34.100 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.100 /
    57. 56.100 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 /
    54. 1.100 [aac @ 0x7fa904802a00] Estimating duration from bitrate, this may be inaccurate Input #0, aac, from ’output_file.aac’ :
    Duration : 00:00:09.45, bitrate : 138 kb/s
    Stream #0:0 : Audio : aac (LC), 44100 Hz, stereo, fltp, 138 kb/s [FORMAT] filename=output_file.aac nb_streams=1 nb_programs=0
    format_name=aac format_long_name=raw ADTS AAC (Advanced Audio Coding)
    start_time=N/A duration=9.454635 size=163278 bit_rate=138156
    probe_score=51 [/FORMAT]

    Comments & Observations

    • I am able to run the ffmpeg command (provided above) locally and get the results I want.

    • The origin file is AAC. I have verified that it is, indeed, an AAC file and not a different file type masquerading as an AAC.

    • The output file format appears as audio/x-aac in firebase. I would expect it to be the same as the origin file - audio/aac.

  • FFmpeg crashing on drawtext filter (ffmpeg-python)

    31 août 2023, par DeadSec

    Hey guys so im trying to use ffmpeg-python to add text to a video but its crashing at

    


    [Parsed_drawtext_0 @ 0000012ea115ee80] Setting 'text' to value 'hi'

    


    and I'm not sure what I can do to fix this problem. I tried pure FFmpeg command-line style and still the same issue where it gets stuck at Setting text to value and it simply outputs a 0byte mp4 after crashing.

    


    My code :

    


    os.environ['FONTCONFIG_FILE'] = r'C:\Users\NOP\NOP\NOP\NOP\binaries\fonts\fonts.conf'
    os.environ['FONTCONFIG_PATH'] = r'C:\Users\NOP\NOP\NOP\NOP\binaries\fonts'
    os.environ['FC_CONFIG_DIR'] = r'C:\Users\NOP\NOP\NOP\NOP\binaries\fonts'
    in_ = ffmpeg.input(output_video_logo)
    in_ = in_.drawtext(text='hi')
    ffmpeg.output(in_, output_video).global_args('-loglevel', 'debug').run(cmd=FFMPEG_PATH)


    


    Font config file :

    


    &lt;?xml version="1.0"?>&#xA;&#xA;&#xA;<fontconfig>&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;    <dir>WINDOWSFONTDIR</dir>&#xA;    <dir>~/fonts</dir>&#xA;    <dir prefix="cwd">.</dir>&#xA;    <dir>~/.fonts</dir>&#xA;&#xA;&#xA;    <match target="pattern">&#xA;        <test qual="any">&#xA;            <string>mono</string>&#xA;        </test>&#xA;        <edit mode="assign">&#xA;            <string>monospace</string>&#xA;        </edit>&#xA;    </match>&#xA;&#xA;&#xA;    <match target="pattern">&#xA;        <test qual="any">&#xA;            <string>sans serif</string>&#xA;        </test>&#xA;        <edit mode="assign">&#xA;            <string>sans-serif</string>&#xA;        </edit>&#xA;    </match>&#xA;&#xA;&#xA;    <match target="pattern">&#xA;        <test qual="any">&#xA;            <string>sans</string>&#xA;        </test>&#xA;        <edit mode="assign">&#xA;            <string>sans-serif</string>&#xA;        </edit>&#xA;    </match>&#xA;&#xA;&#xA;    <include>conf.d</include>&#xA;&#xA;&#xA;&#xA;    <cachedir>WINDOWSTEMPDIR_FONTCONFIG_CACHE</cachedir>&#xA;    <cachedir>~/.fontconfig</cachedir>&#xA;&#xA;    <config>&#xA;&#xA;&#xA;        <rescan>&#xA;            <int>30</int>&#xA;        </rescan>&#xA;    </config>&#xA;&#xA;</fontconfig>&#xA;

    &#xA;

    Is this a issue with any of my fontconfig or script ? I'm really lost on fixing this.

    &#xA;

    As requested by Rotem tried adding new input to drawtext and this was the output before crashing with no error message :&#xA;Successfully opened the file.

    &#xA;

    [Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;box&#x27; to value &#x27;1&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;boxcolor&#x27; to value &#x27;yellow&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;fontcolor&#x27; to value &#x27;blue&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;fontsize&#x27; to value &#x27;72&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;text&#x27; to value &#x27;hi&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;x&#x27; to value &#x27;10&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;y&#x27; to value &#x27;10&#x27;&#xA;

    &#xA;

    Full log :&#xA;https://pastebin.com/E6sHvwUz

    &#xA;