Recherche avancée

Médias (91)

Autres articles (89)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (8205)

  • App Intents FFmpeg-iOS operation not permitted

    2 octobre 2023, par apo_p9

    Using latest iOS and Xcode, I have an AppIntent to which Im passing a video file from iOS Shortcuts, Im using an IntentFile parameter to read that in the intent. Then Im using FFmpeg-iOS to generate a single frame from the video.

    


    ...
@Parameter(title: "Media", supportedTypeIdentifiers: ["public.image", "public.video"], inputConnectionBehavior: .connectToPreviousIntentResult)
var media: IntentFile
...
let mediaPath = media.fileURL!.absoluteString;
let posterPath = mediaPath.replacingOccurrences(of: media.filename, with: "poster.jpg")
_ = ffmpeg(["FFmpeg-iOS", "-i", mediaPath, "-frames:v", "1", posterPath])


    


    Here is the output :

    


    ffmpeg(_:) ["FFmpeg-iOS", "-i", "file:///var/mobile/tmp/com.apple.WorkflowKit.BackgroundShortcutRunner/IMG_2751.mov", "-frames:v", "1", "file:///var/mobile/tmp/com.apple.WorkflowKit.BackgroundShortcutRunner/poster.jpg"]
ffmpeg version N-109970-g7dc0944ce2 Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 14.0.0 (clang-1400.0.29.202)
  configuration: --prefix=/Users/changbeomahn/Projects/FFmpeg-iOS/build/install/FFmpeg/arm64 --enable-cross-compile --disable-debug --disable-doc --enable-pic --disable-audiotoolbox --disable-sdl2 --disable-libxcb --target-os=darwin --arch=arm64 --cc='xcrun -sdk iphoneos clang' --as='gas-preprocessor.pl -arch aarch64 -- xcrun -sdk iphoneos clang' --extra-cflags='-arch arm64 -mios-version-min=13.0 -I/Users/changbeomahn/Projects/FFmpeg-iOS/build/install/FFmpeg/arm64/include' --extra-ldflags='-arch arm64 -mios-version-min=13.0 -L/Users/changbeomahn/Projects/FFmpeg-iOS/build/install/FFmpeg/arm64/lib'
HookMain: setjmp=0
FFmpeg_exit=1, will longjmp
HookMain: setjmp=1
  libavutil      58.  3.100 / 58.  3.100
  libavcodec     60.  6.100 / 60.  6.100
  libavformat    60.  4.100 / 60.  4.100
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  4.100 /  9.  4.100
  libswscale      7.  2.100 /  7.  2.100
  libswresample   4. 11.100 /  4. 11.100
file:///var/mobile/tmp/com.apple.WorkflowKit.BackgroundShortcutRunner/IMG_2751.mov: Operation not permitted


    


    The issue is in the last line : Operation not permitted

    


    I also tried just writing a file to the same directory as the media file :

    


    let str = "Super long string here"
let filename = media.fileURL!.absoluteString.replacingOccurrences(of: media.filename, with: "asd.txt")

do {
    try str.write(to: URL(string: filename)!, atomically: true, encoding: String.Encoding.utf8)
} catch {
    print(error)
}


    


    But got the error :

    


    Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “asd.txt” in the folder “com.apple.WorkflowKit.BackgroundShortcutRunner”." UserInfo={NSFilePath=/var/mobile/tmp/com.apple.WorkflowKit.BackgroundShortcutRunner/asd.txt, NSUnderlyingError=0x280f09aa0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}


    


    Apparently there is a permission issue, I tried googling about "AppIntents file permissions"/"shortcut permissions"/etc but found nothing. Im not a mobile developer so Im totally clueless. The same code though works fine in the simulator, it gets the permission issue only on device.

    


  • Ffmpeg HLS conversion error on AWS Lambda - ffmpeg was killed with signal SIGSEGV

    20 octobre 2023, par RtiM0

    I'm trying to convert video files into HLS streams on a AWS Lambda. The ffmpeg configuration I have setup works for normal (Non HLS) transcoding, but in case of HLS it throws the following error :

    


    stderr:
frame=  341 fps= 84 q=34.0 q=32.0 q=28.0 size=N/A time=00:00:12.52 bitrate=N/A speed= 3.1x    
frame=  385 fps= 85 q=34.0 q=31.0 q=27.0 size=N/A time=00:00:13.97 bitrate=N/A speed=3.08x    
frame=  433 fps= 86 q=33.0 q=30.0 q=27.0 size=N/A time=00:00:15.55 bitrate=N/A speed=3.08x    
[hls @ 0x702c480] Cannot use rename on non file protocol, this may lead to races and temporary partial files
[hls @ 0x702c480] Opening '/tmp/stream_0.m3u8' for writing
[hls @ 0x702c480] Opening '/tmp/stream_1.m3u8' for writing
[hls @ 0x702c480] Opening '/tmp/stream_2.m3u8' for writing
[hls @ 0x702c480] Opening '/tmp/master.m3u8' for writing
ffmpeg was killed with signal SIGSEGV


    


    And I error thrown by fluent-ffmpeg is this :

    


    2023-03-06T10:21:44.555Z    15a0a43b-5e24-42ac-ae72-fe04f0c72a3e    ERROR   Invoke Error    &#xA;{&#xA;    "errorType": "Error",&#xA;    "errorMessage": "ffmpeg was killed with signal SIGSEGV",&#xA;    "stack": [&#xA;        "Error: ffmpeg was killed with signal SIGSEGV",&#xA;        "    at ChildProcess.<anonymous> (/var/task/node_modules/fluent-ffmpeg/lib/processor.js:180:22)",&#xA;        "    at ChildProcess.emit (node:events:513:28)",&#xA;        "    at ChildProcess._handle.onexit (node:internal/child_process:291:12)"&#xA;    ]&#xA;}&#xA;</anonymous>

    &#xA;

    This is the code I run on AWS Lambda to convert video files into HLS :

    &#xA;

    export const compressToHLS = (sourcePath, outputFolder) =>&#xA;  new Promise((resolve, reject) => {&#xA;    Ffmpeg(sourcePath)&#xA;      .complexFilter([&#xA;        {&#xA;          filter: "split",&#xA;          options: "3",&#xA;          inputs: "v:0",&#xA;          outputs: ["v1", "v2", "v3"],&#xA;        },&#xA;        {&#xA;          filter: "scale",&#xA;          options: {&#xA;            w: 1280,&#xA;            h: 720,&#xA;          },&#xA;          inputs: "v1",&#xA;          outputs: "v1out",&#xA;        },&#xA;        {&#xA;          filter: "scale",&#xA;          options: {&#xA;            w: 960,&#xA;            h: 540,&#xA;          },&#xA;          inputs: "v2",&#xA;          outputs: "v2out",&#xA;        },&#xA;        {&#xA;          filter: "scale",&#xA;          options: {&#xA;            w: 640,&#xA;            h: 360,&#xA;          },&#xA;          inputs: "v3",&#xA;          outputs: "v3out",&#xA;        },&#xA;      ])&#xA;      .outputOptions([&#xA;        "-map [v1out]",&#xA;        "-c:v:0",&#xA;        "libx264",&#xA;        "-b:v 3000000",&#xA;        "-map [v2out]",&#xA;        "-c:v:1",&#xA;        "libx264",&#xA;        "-b:v 2000000",&#xA;        "-map [v3out]",&#xA;        "-c:v:2",&#xA;        "libx264",&#xA;        "-b:v 1000000",&#xA;      ])&#xA;      .outputOptions([&#xA;        "-map a:0",&#xA;        "-c:a:0 aac",&#xA;        "-b:a:0 96000",&#xA;        "-ar 48000",&#xA;        "-ac 2",&#xA;        "-map a:0",&#xA;        "-c:a:1 aac",&#xA;        "-b:a:1 96000",&#xA;        "-ar 48000",&#xA;        "-ac 2",&#xA;        "-map a:0",&#xA;        "-c:a:2 aac",&#xA;        "-b:a:2 96000",&#xA;        "-ar 48000",&#xA;        "-ac 2",&#xA;      ])&#xA;      .outputOptions([&#xA;        "-f hls",&#xA;        "-hls_time 10",&#xA;        "-hls_playlist_type vod",&#xA;        "-hls_flags independent_segments",&#xA;        "-hls_segment_type mpegts",&#xA;        `-hls_segment_filename ${outputFolder}/%v_%d.ts`,&#xA;        "-master_pl_name master.m3u8",&#xA;      ])&#xA;      .outputOption("-var_stream_map", "v:0,a:0 v:1,a:1 v:2,a:2")&#xA;      .outputOption("-preset veryfast")&#xA;      .output(`${outputFolder}/stream_%v.m3u8`)&#xA;      .on("start", (cmdline) => console.log(cmdline))&#xA;      .on("progress", (progress) => {&#xA;        let prog = Math.floor(progress.percent * 10) / 10;&#xA;        if (Math.round(prog) % 10 == 0) {&#xA;          console.log(`${prog}% complete`);&#xA;        }&#xA;      })&#xA;      .on("error", (err, stdout, stderr) => {&#xA;        if (err) {&#xA;          console.log(err.message);&#xA;          console.log("stdout:\n" &#x2B; stdout);&#xA;          console.log("stderr:\n" &#x2B; stderr);&#xA;          reject(err);&#xA;        }&#xA;      })&#xA;      .on("end", () => resolve())&#xA;      .run();&#xA;  });&#xA;

    &#xA;

    In this code the sourcePath is usually a presigned URL from S3 (But I have also tried to download a file on /tmp and setting sourcePath as the path to the downloaded file) and outputFolder is tmpdir() which is /tmp.

    &#xA;

    I have the lambda settings configured to have 10GB of memory and 10GB of ephemeral storage (the maximum allowed).

    &#xA;

  • ffmpeg is failing to load shared libraries after a ./configure with a prefix inside a conda environment

    30 janvier 2024, par user3133806

    I am using conda and building ffmpeg from source within that environment.

    &#xA;

    I ran the following commands :

    &#xA;

    conda create --name my_conda_env&#xA;conda activate my_conda_env&#xA;# Now I am in the conda environment&#xA;# $CONDA_PREFIX is /home/myuser/.conda/envs/my_conda_env/bin/ffmpeg&#xA;&#xA;# Checkout ffmpeg code&#xA;# git checkout ...&#xA;&#xA;./configure --prefix=$CONDA_PREFIX --enable-shared --disable-static &amp;&amp; make distclean &amp;&amp; make -j 100 &amp;&amp; make install&#xA;&#xA;# The above command does install the newly built ffmpeg into:&#xA;# /home/myuser/.conda/envs/my_conda_env/bin/ffmpeg&#xA;&#xA;# However it fails to execute:&#xA;ffmpeg&#xA;ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory&#xA;&#xA;# When I add the conda lib path to LD_LIBRARY_PATH it works:&#xA;LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH ffmpeg&#xA;ffmpeg version n4.2.9-4-gd7beb0c61f Copyright (c) 2000-2023 the FFmpeg developers&#xA;&#xA;# I thought ./configure with a --prefix will build a binary that will search for libraries relative to itself, but that does not appear to be the case:&#xA;&#xA;strace -o /tmp/strace.out ffmpeg&#xA;tail /tmp/strace.out&#xA;&#xA;openat(AT_FDCWD, "/usr/lib64/haswell/x86_64/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)&#xA;newfstatat(AT_FDCWD, "/usr/lib64/haswell/x86_64", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)&#xA;openat(AT_FDCWD, "/usr/lib64/haswell/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)&#xA;newfstatat(AT_FDCWD, "/usr/lib64/haswell", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)&#xA;openat(AT_FDCWD, "/usr/lib64/avx512_1/x86_64/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)&#xA;newfstatat(AT_FDCWD, "/usr/lib64/avx512_1/x86_64", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)&#xA;openat(AT_FDCWD, "/usr/lib64/avx512_1/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)&#xA;newfstatat(AT_FDCWD, "/usr/lib64/avx512_1", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)&#xA;openat(AT_FDCWD, "/usr/lib64/x86_64/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)&#xA;newfstatat(AT_FDCWD, "/usr/lib64/x86_64", 0x7fff65f56d90, 0) = -1 ENOENT (No such file or directory)&#xA;openat(AT_FDCWD, "/usr/lib64/libavdevice.so.58", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)&#xA;newfstatat(AT_FDCWD, "/usr/lib64", {st_mode=S_IFDIR|0555, st_size=49526, ...}, 0) = 0&#xA;writev(2, [{iov_base="ffmpeg", iov_len=6}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {i&#xA;ov_base=": ", iov_len=2}, {iov_base="libavdevice.so.58", iov_len=17}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="No such file or directory", iov_len=25}, {iov_base="\n", iov_len=1}], 10) = &#xA;123&#xA;

    &#xA;

    Conda documentation says not to use LD_LIBRARY_PATH here :

    &#xA;

    https://docs.conda.io/projects/conda-build/en/stable/resources/use-shared-libraries.html#shared-libraries-in-macos-and-linux

    &#xA;

    How can I build ffmpeg from source in a conda environment and have the binary find the .so file relative to itself ?

    &#xA;