Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (112)

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

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (13277)

  • How do I get an InputStream out of a Mono ?

    30 octobre 2022, par Einfari

    Bear with my noobness, I am learning web-flux. I had this simple application that takes a video and extract the audio using FFprobe and FFmpeg, so I thought of redoing it reactively, but I am failing miserably...

    


    Controller :

    


    @PostMapping("/upload")&#xA;public String upload(@RequestPart("file") Mono<filepart> filePartMono, final Model model) {&#xA;    Flux<string> filenameList = mediaComponent.extractAudio(filePartMono);&#xA;    model.addAttribute("filenameList", new ReactiveDataDriverContextVariable(filenameList));&#xA;    return "download";&#xA;}&#xA;</string></filepart>

    &#xA;

    Function to get audio streams out of the video :

    &#xA;

    public Mono<ffproberesult> getAudioStreams(InputStream inputStream) {&#xA;    try {&#xA;        return Mono.just(FFprobe.atPath(FFprobePath)&#xA;                .setShowStreams(true)&#xA;                .setSelectStreams(StreamType.AUDIO)&#xA;                .setLogLevel(LogLevel.INFO)&#xA;                .setInput(inputStream)&#xA;                .execute());&#xA;    } catch (JaffreeException e) {&#xA;        log.error(e.getMessage(), e);&#xA;        throw new MediaException("Audio formats could not be identified.");&#xA;    }&#xA;}&#xA;</ffproberesult>

    &#xA;

    Attempt 1 :

    &#xA;

    public Flux<string> extractAudio(Mono<filepart> filePartMono) {&#xA;    filePartMono.flatMapMany(Part::content)&#xA;            .map(dataBuffer -> dataBuffer.asInputStream(true))&#xA;            .flatMap(this::getAudioStreams)&#xA;            .subscribe(System.out::println);&#xA;    ...&#xA;}&#xA;</filepart></string>

    &#xA;

    Attempt 2 :

    &#xA;

    public Flux<string> extractAudio(Mono<filepart> filePartMono) {&#xA;    filePartMono.flatMapMany(Part::content)&#xA;            .reduce(InputStream.nullInputStream(), (inputStream, dataBuffer) -> new SequenceInputStream(&#xA;                    inputStream, dataBuffer.asInputStream()&#xA;            ))&#xA;            .flatMap(this::getAudioStreams)&#xA;            .subscribe(System.out::println);&#xA;    ...&#xA;}&#xA;</filepart></string>

    &#xA;

    Attempt 3 :

    &#xA;

    public Flux<string> extractAudio(Mono<filepart> filePartMono) {&#xA;    DataBufferUtils.write(filePartMono.flatMapMany(Part::content), OutputStream.nullOutputStream())&#xA;            .map(dataBuffer -> dataBuffer.asInputStream(true))&#xA;            .flatMap(this::getAudioStreams)&#xA;            .subscribe(System.out::println);&#xA;    ...&#xA;}&#xA;</filepart></string>

    &#xA;

    Attempt 1 and 3 seems to be the same in the end, FFprobe complains as follows :

    &#xA;

    2022-10-30 11:24:30.292  WARN 79049 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9162702340] [warning] STSZ atom truncated&#xA;2022-10-30 11:24:30.292 ERROR 79049 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9162702340] [error] stream 0, contradictionary STSC and STCO&#xA;2022-10-30 11:24:30.292 ERROR 79049 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9162702340] [error] error reading header&#xA;2022-10-30 11:24:30.294 ERROR 79049 --- [         StdErr] c.g.k.jaffree.process.BaseStdReader      : [error] tcp://127.0.0.1:51532: Invalid data found when processing input&#xA;2022-10-30 11:24:30.295  INFO 79049 --- [oundedElastic-3] c.g.k.jaffree.process.ProcessHandler     : Process has finished with status: 1&#xA;2022-10-30 11:24:30.409 ERROR 79049 --- [oundedElastic-3] c.e.s.application.MediaComponent         : Process execution has ended with non-zero status: 1. Check logs for detailed error message.&#xA;

    &#xA;

    Attempt 2 produces multiple of these :

    &#xA;

    Exception in thread "Runnable-0" java.lang.StackOverflowError&#xA;    at java.base/java.io.SequenceInputStream.read(SequenceInputStream.java:198)&#xA;

    &#xA;

    Could anybody point me in the right direction ? What am I doing wrong ? By the way, I am outputting to console just to see a result, but in the end I need to take all the outputted streams and pass them as arguments to another function that will finally extract the audio, so I need to figure out that as well.

    &#xA;

    Thank you in advance.

    &#xA;

  • How to convert png images to a HEVC(h265) video with alpha

    20 décembre 2022, par ImWH

    I want to convert a sequence of png images to a HEVC video with alpha, I would like to use ffmpeg to do this work and find the following command(images name are p01.png, p02.png...) :

    &#xA;

    ffmpeg -framerate 10 -i p%02d.png -c:v hevc_videotoolbox -require_sw 1 -allow_sw 1 -alpha_quality 0.5 -vtag hvc1 hevc.mov&#xA;

    &#xA;

    the print is here :

    &#xA;

    ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with Apple clang version 14.0.0 (clang-1400.0.29.202)&#xA;  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --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-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;Input #0, image2, from &#x27;p%02d.png&#x27;:&#xA;  Duration: 00:00:09.60, start: 0.000000, bitrate: N/A&#xA;  Stream #0:0: Video: png, rgba(pc), 375x812 [SAR 3779:3779 DAR 375:812], 10 fps, 10 tbr, 10 tbn&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (png (native) -> hevc (hevc_videotoolbox))&#xA;Press [q] to stop, [?] for help&#xA;[1]    16348 trace trap  ffmpeg -framerate 10 -i p%02d.png -c:v hevc_videotoolbox -require_sw 1  1  0.&#xA;

    &#xA;

    It seems like there is no error and the video has been generated but the size of video is always 0kb, I try to change the parameter for command but nothing changed, so is there something working with the command ? or Is there is a simple way to create the HEVC video using png image ? Thanks

    &#xA;

    My Environment :&#xA;Apple silicon(MacBook with M1 Pro clip) Mac OS 13.0&#xA;ffmpeg : 5.1.2

    &#xA;

  • How to remove black bars with ffmpeg ?

    3 novembre 2022, par watch-this

    I'm trying to remove black bars from a 637×478 video

    &#xA;

    enter image description here

    &#xA;

    here's what happens :

    &#xA;

    % ffmpeg -i sfu11.mp4 -vf "scale=ih*16/9:ih,scale=iw:-2,setsar=1" -y out.mp4 &#xA;ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers&#xA;  built with Apple clang version 14.0.0 (clang-1400.0.29.102)&#xA;  configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --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-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox&#xA;  libavutil      57. 28.100 / 57. 28.100&#xA;  libavcodec     59. 37.100 / 59. 37.100&#xA;  libavformat    59. 27.100 / 59. 27.100&#xA;  libavdevice    59.  7.100 / 59.  7.100&#xA;  libavfilter     8. 44.100 /  8. 44.100&#xA;  libswscale      6.  7.100 /  6.  7.100&#xA;  libswresample   4.  7.100 /  4.  7.100&#xA;  libpostproc    56.  6.100 / 56.  6.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;sfu11.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2mp41&#xA;    encoder         : Lavf57.83.100&#xA;  Duration: 01:02:49.37, start: 0.000000, bitrate: 15 kb/s&#xA;  Chapters:&#xA;    Chapter #0:0: start 0.000000, end 99.833000&#xA;      Metadata:&#xA;        title           : Chapter 01&#xA;    Chapter #0:1: start 99.833000, end 701.818000&#xA;      Metadata:&#xA;        title           : Chapter 02&#xA;    Chapter #0:2: start 701.818000, end 1213.746000&#xA;      Metadata:&#xA;        title           : Chapter 03&#xA;    Chapter #0:3: start 1213.746000, end 1726.892000&#xA;      Metadata:&#xA;        title           : Chapter 04&#xA;    Chapter #0:4: start 1726.892000, end 2167.882000&#xA;      Metadata:&#xA;        title           : Chapter 05&#xA;    Chapter #0:5: start 2167.882000, end 2816.430000&#xA;      Metadata:&#xA;        title           : Chapter 06&#xA;    Chapter #0:6: start 2816.430000, end 3769.366000&#xA;      Metadata:&#xA;        title           : Chapter 07&#xA;  Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, progressive), 708x478 [SAR 9:10 DAR 1593:1195], 544 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 341 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:2[0x3](eng): Data: bin_data (text / 0x74786574)&#xA;    Metadata:&#xA;      handler_name    : SubtitleHandler&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[libx264 @ 0x7f8630806e00] width not divisible by 2 (849x478)&#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;[aac @ 0x7f8630809d00] Qavg: 15927.165&#xA;[aac @ 0x7f8630809d00] 2 frames left in the queue on closing&#xA;Conversion failed!&#xA;

    &#xA;

    However, the same flags work using ffplay but I get horizontal black bars instead.

    &#xA;

    % ffplay -i sfu11.mp4 -vf "scale=ih\*16/9:ih,scale=iw:-2,setsar=1"&#xA;

    &#xA;

    enter image description here

    &#xA;

    I also tried using the cropdetect filter. It doesn't work and end up with the very same black bars while passing -vf crop=....

    &#xA;