Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (73)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (6993)

  • 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;

  • electron ffmpeg mas build "Illegal instruction : 4"

    8 mars 2021, par Martin

    I am trying to release an electron app on the Mac Apple Store (mas), my electron app uses ffmpeg to render videos. In order to release my app on the mac apple store, It needs to be sandboxed, and by default ffmpeg makes calls to external libraries so I need to statically build ffmpeg and package it with my app. My code is on the 'mas-ffmpeg-fix' branch : https://github.com/MartinBarker/digify/tree/mas-ffmpeg-fix

    &#xA;

    My static ffmpeg build works before I build my app, but after running electron-builder build --mac, the ffmpeg executable now fails with Illegal instruction: 4

    &#xA;

    This is the full timeline of building/packaging/submitting my app to the mac apple store and where the error first appears :

    &#xA;

      &#xA;
    • In Digify repo :

      &#xA;

    • &#xA;

    • clone, configure, and build static ffpmeg : “sudo rm -rf ffmpeg-mac/ && npm run download-ffmpeg”

      &#xA;

    • &#xA;

    • download-ffmpeg command is inside package.json and runs this :&#xA;git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg-mac &amp;&amp; cd ffmpeg-mac &amp;&amp; ./configure pkg_config=&#x27;pkg-config --static&#x27; --pkg-config-flags=&#x27;--static&#x27; --libdir=/usr/local/lib --extra-version=ntd_20150128 --disable-shared --disable-lzma --enable-gpl --enable-pthreads --enable-nonfree --enable-libass --enable-libfdk-aac  --enable-libmp3lame  --enable-libx264 --enable-static --enable-filters --enable-runtime-cpudetect &amp;&amp; make &amp;&amp; cd ..

      &#xA;

    • &#xA;

    • Check if any dylibb files in the static ffmpeg build with command : “otool -L ffmpeg-mac/ffmpeg | grep /usr/local”

      &#xA;

    • &#xA;

    • If there are any, move them to folder in desktop, run ‘otool’ again to ensure there are no dynamic libraries, rebuild static ffmpeg.

      &#xA;

    • &#xA;

    • there will now be a folder 'ffmpeg-mac' which contains static versions of ffmpeg and ffprobe

      &#xA;

    • &#xA;

    &#xA;

    Using ffmpeg with electron UI : works&#xA;Using Ffmpeg with command-line command :&#xA;/Users/martinbarker/Documents/projects/digify-new/ffmpeg-mac/ffmpeg -h&#xA;Works

    &#xA;

      &#xA;
    • Build mac mass app with “npm run build-mas“
    • &#xA;

    • When this command finishes it will output two files inside the /dist/mas/ folder : Digify.app and Digify-01.20.pkg (or whatever version number it is)&#xA;Ffmpeg command-line check :&#xA;/Users/martinbarker/Documents/projects/digify-new/dist/mas/Digify.app/Contents/Resources/ffmpeg -h&#xA;Illegal instruction : 4
    • &#xA;

    &#xA;

    This is the first place the error appears, after building my mac mac-apple-store app, ffmpeg fails with this err.

    &#xA;

      &#xA;
    • Sign built app with .sh file : “sh mas-sign-script.sh”&#xA;view .sh file here&#xA;
        &#xA;
      • the .sh file will output Digify-mac.pkg
      • &#xA;

      &#xA;

    • &#xA;

    • Easier command to both build & sign : “sudo rm -rf dist/mas/ && npm run build-mas && sh mas-sign-script.sh”
    • &#xA;

    • Upload the outputted “Digify-mac.pkg” file & submit to apple for review
    • &#xA;

    &#xA;

    Once this app gets published in the store, if you download it and try to run an ffmpeg command with the electron UI, it fails with this error :

    &#xA;

    /Applications/Digify.app/Contents/Resources/app.asar/node_modules/execa/lib/error.js:59 Uncaught (in promise) Error: Command failed with exit code 1: /Applications/Digify.app/Contents/Resources/ffmpeg -i /Users/martinbarker/Downloads/Felix Lebarty - Bobo/01. Bobo.mp3 -y -filter_complex concat=n=1:v=0:a=1 -c:a libmp3lame -b:a 320k /Users/martinbarker/Downloads/Felix Lebarty - Bobo/output-064237.mp3&#xA;ffmpeg version N-101191-g51a9f487ae-ntd_20150128 Copyright (c) 2000-2021 the FFmpeg developers&#xA;  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)&#xA;  configuration: pkg_config=&#x27;pkg-config --static&#x27; --pkg-config-flags=--static --libdir=/usr/local/lib --extra-version=ntd_20150128 --disable-shared --disable-lzma --enable-gpl --enable-pthreads --enable-nonfree --disable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libx264 --enable-static --enable-filters --enable-runtime-cpudetect&#xA;  libavutil      56. 65.100 / 56. 65.100&#xA;  libavcodec     58.125.100 / 58.125.100&#xA;  libavformat    58. 68.100 / 58. 68.100&#xA;  libavdevice    58. 12.100 / 58. 12.100&#xA;  libavfilter     7.107.100 /  7.107.100&#xA;  libswscale      5.  8.100 /  5.  8.100&#xA;  libswresample   3.  8.100 /  3.  8.100&#xA;  libpostproc    55.  8.100 / 55.  8.100&#xA;[mp3 @ 0x7feeae809c00] Estimating duration from bitrate, this may be inaccurate&#xA;Input #0, mp3, from &#x27;/Users/martinbarker/Downloads/Felix Lebarty - Bobo/01. Bobo.mp3&#x27;:&#xA;  Metadata:&#xA;    comment         : &#xA;    album           : Bobo&#xA;    artist          : Felix Lebarty&#xA;    title           : Funkytown Eklablog&#xA;    genre           : Boogie&#xA;    date            : 1984&#xA;  Duration: 00:05:19.53, start: 0.000000, bitrate: 320 kb/s&#xA;  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s&#xA;/Users/martinbarker/Downloads/Felix Lebarty - Bobo/output-064237.mp3: Operation not permitted&#xA;    at makeError (/Applications/Digify.app/Contents/Resources/app.asar/node_modules/execa/lib/error.js:59)&#xA;    at handlePromise (/Applications/Digify.app/Contents/Resources/app.asar/node_modules/execa/index.js:114)&#xA;    at async file:/Applications/Digify.app/Contents/Resources/app.asar/src/js/newindex.js:1162&#xA;

    &#xA;

    Command failed with exit code 1: Operation not permitted

    &#xA;

  • h274 : remove optimization pragma

    25 août 2021, par Lynne
    h274 : remove optimization pragma
    

    This results in warnings on compilers which don't support it,
    objections were raised during the review process about it but went unnoticed,
    and the speed benefit is highly compiler and version specific, and
    also not very critical.

    We generally hand-write assembly to optimize loops like that, rather
    than use compiler magic, and for 40% best case scenario, it's simply
    not worth it.

    Plus, tree vectorization is still problematic with GCC and disabled by default
    for a good reason, so enabling it locally is sketchy.

    • [DH] libavcodec/h274.c