Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (101)

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

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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

Sur d’autres sites (8324)

  • How can use ffmpeg in AWS Lambda to clip hls trasnsimision to .mp4

    15 novembre 2024, par Bruno Munné

    The ffmpeg input is through the public url of the bucket, I want to save the output in a tmp.mp4 file and I want to upload this file to the bucket. Locally the ffmpeg command works perfectly, lasting no more than 3 seconds and the output file weighs less than 1MB

    


    export const handler = async (event) => {
    try {
        const { m3u8, offset, duration, signedURL } = event;

        const clipKey = `clip_output.mp4`;
        const clipFilePath = path.join('/tmp', clipKey);

        execSync(`/opt/ffmpeglib/ffmpeg -i ${process.env.URL_CLOUDFLARE}/${m3u8} -ss ${offset} -t ${duration} -c copy -f mp4 ${clipFilePath}`)

        const fileContent = fs.readFileSync(clipFilePath);
        const resSign = await fetch(signedURL, {
            method: "PUT",
            headers: {
                "Content-Type": "application/octet-stream",
            },
            body: fileContent,
        });

        if (!resSign.ok) throw new Error(`Failed to upload file to S3: ${resSign.statusText}`);

        fs.unlinkSync(clipFilePath);

        return {
            statusCode: 200,
            body: JSON.stringify({
                message: 'Clip procesado y subido correctamente',
                clipKey: path.basename(clipFilePath)
            }),
        };
    } catch (error) {
        console.error("Error al procesar el clip:", error);
        return {
            statusCode: 500,
            body: JSON.stringify({ error: error.message }),
        };
    }
};


    


    The error it shows me is the following

    


     at genericNodeError (node:internal/errors:984:15)&#xA;    at wrappedFn (node:internal/errors:538:14)&#xA;    at checkExecSyncError (node:child_process:891:11)&#xA;    at execSync (node:child_process:963:15)&#xA;    at Runtime.handler (file:///var/task/index.js:16:3)&#xA;    at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1173:29) {&#xA;  status: null,&#xA;  signal: &#x27;SIGSEGV&#x27;,&#xA;  output: [&#xA;    null,&#xA;    <buffer>,&#xA;    <buffer 66="66" 6d="6d" 70="70" 65="65" 67="67" 20="20" 76="76" 72="72" 73="73" 69="69" 6f="6f" 6e="6e" 4e="4e" 2d="2d" 37="37" 31="31" 30="30" 36="36" 34="34" 64="64" 35="35" 33="33" 63="63" 74="74" 61="61" 68="68" 3a="3a" 2f="2f" 1194="1194" more="more" bytes="bytes">&#xA;  ],&#xA;  pid: 13,&#xA;  stdout: <buffer>,&#xA;  stderr: <buffer 66="66" 6d="6d" 70="70" 65="65" 67="67" 20="20" 76="76" 72="72" 73="73" 69="69" 6f="6f" 6e="6e" 4e="4e" 2d="2d" 37="37" 31="31" 30="30" 36="36" 34="34" 64="64" 35="35" 33="33" 63="63" 74="74" 61="61" 68="68" 3a="3a" 2f="2f" 1194="1194" more="more" bytes="bytes">&#xA;}&#xA;ffmpeg version N-71064-gd5e603ddc0-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2024 the FFmpeg developers&#xA;built with gcc 8 (Debian 8.3.0-6)&#xA;configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg&#xA;libavutil      59. 27.100 / 59. 27.100&#xA;libavcodec     61.  9.100 / 61.  9.100&#xA;libavformat    61.  4.100 / 61.  4.100&#xA;libavdevice    61.  2.100 / 61.  2.100&#xA;libavfilter    10.  2.102 / 10.  2.102&#xA;libswscale      8.  2.100 /  8.  2.100&#xA;libswresample   5.  2.100 /  5.  2.100&#xA;libpostproc    58.  2.100 / 58.  2.100&#xA;END RequestId: 2fc8c51e-66c6-4c74-aa9c-fa10c11207a0&#xA;REPORT RequestId: 2fc8c51e-66c6-4c74-aa9c-fa10c11207a0  Duration: 164.82 ms Billed Duration: 165 ms Memory Size: 2048 MB    Max Memory Used: 88 MB  Init Duration: 185.19 ms&#xA;</buffer></buffer></buffer></buffer>

    &#xA;

    Help to resolve it please

    &#xA;

  • ffmpeg use gpu to encode mpeg4 to ts/m3u8 [closed]

    14 novembre 2024, par danielRICADO

    using ffmpeg I want to trim and transcode a mpeg4 from ts / m3u8

    &#xA;

    std::string ffmpeg_command = "ffmpeg -hwaccel drm -i " &#x2B; output_dir &#x2B; input_file &#x2B;&#xA;                         " -ss 00:00:00.00 -t 31 -c:v " &#x2B; codec &#x2B; " -b:v " &#x2B; std::to_string(bitrate) &#x2B;&#xA;                         " -vf scale=" &#x2B; std::to_string(width) &#x2B; "x" &#x2B; std::to_string(height) &#x2B;&#xA;                         " -hls_time " &#x2B; std::to_string(30) &#x2B; " -hls_list_size 0 -hls_segment_filename " &#x2B;&#xA;                         ts_file_pattern &#x2B; " -f hls " &#x2B; m3u8_file;&#xA;

    &#xA;

    I wanted to choose between codecs based on the system, if gpu is avaiable I'd like to opt to use it, right now I just check if the codec is available

    &#xA;

    bool is_h264_v4l2m2m_available() {&#xA;    std::string result = exec_command("ffmpeg -encoders 2>&amp;1");&#xA;    return result.find("h264_v4l2m2m") != std::string::npos;&#xA;}&#xA;

    &#xA;

    if it is a I wanted to move that process over to the gpu, not just use libx264. Here is the error log. Studying hard on the solution but wold super apperciate any expert advice.

    &#xA;

    other considerations are - runs in a docker container on a pi5, pibian on the host apline on in the container, container runs in privledged mode

    &#xA;

    2024-11-14 15:18:41 [INFO]: assigned codec: h264_v4l2m2m&#xA;2024-11-14 15:18:41 ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers&#xA;2024-11-14 15:18:41   built with gcc 13.2.1 (Alpine 13.2.1_git20240309) 20240309&#xA;2024-11-14 15:18:41   configuration: --prefix=/usr --disable-librtmp --disable-lzma --disable-static --disable-stripping --enable-avfilter --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librist --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-lto=auto --enable-lv2 --enable-openssl --enable-pic --enable-postproc --enable-pthreads --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan --optflags=-O3 --enable-libjxl --enable-libsvtav1 --enable-libvpl&#xA;2024-11-14 15:18:41   libavutil      58. 29.100 / 58. 29.100&#xA;2024-11-14 15:18:41   libavcodec     60. 31.102 / 60. 31.102&#xA;2024-11-14 15:18:41   libavformat    60. 16.100 / 60. 16.100&#xA;2024-11-14 15:18:41   libavdevice    60.  3.100 / 60.  3.100&#xA;2024-11-14 15:18:41   libavfilter     9. 12.100 /  9. 12.100&#xA;2024-11-14 15:18:41   libswscale      7.  5.100 /  7.  5.100&#xA;2024-11-14 15:18:41   libswresample   4. 12.100 /  4. 12.100&#xA;2024-11-14 15:18:41   libpostproc    57.  3.100 / 57.  3.100&#xA;2024-11-14 15:18:42 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;/app/client-data/camera-output/7ea3cbef-4da0-11ed-bdcc-baf70a43c072/1731550687270.mp4&#x27;:&#xA;2024-11-14 15:18:42   Metadata:&#xA;2024-11-14 15:18:42     major_brand     : isom&#xA;2024-11-14 15:18:42     minor_version   : 512&#xA;2024-11-14 15:18:42     compatible_brands: isomiso2avc1mp41&#xA;2024-11-14 15:18:42     encoder         : Lavf60.16.100&#xA;2024-11-14 15:18:42   Duration: 00:00:31.33, start: 0.000000, bitrate: 678 kb/s&#xA;2024-11-14 15:18:42   Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1024x1024, 677 kb/s, 15 fps, 15 tbr, 15360 tbn (default)&#xA;2024-11-14 15:18:42     Metadata:&#xA;2024-11-14 15:18:42       handler_name    : VideoHandler&#xA;2024-11-14 15:18:42       vendor_id       : [0][0][0][0]&#xA;2024-11-14 15:18:42 [AVFormatContext @ 0x7f9254dcb4c0] Unable to choose an output format for &#x27;678000&#x27;; use a standard extension for the filename or specify the format manually.&#xA;2024-11-14 15:18:42 [out#0 @ 0x7f9254d70700] Error initializing the muxer for 678000: Invalid argument&#xA;2024-11-14 15:18:42 Error opening output file 678000.&#xA;2024-11-14 15:18:42 Error opening output files: Invalid argument&#xA;2024-11-14 15:18:42 [ERROR]: Failed to generate .ts file for: 1731550687270.mp4&#xA;

    &#xA;

  • How to add custom configure option with VCPKG when building FFMPEG ?

    1er novembre 2024, par NickWuzh

    Does anyone know how to enable x11grab format in FFMPEG with VCPKG ?

    &#xA;

    I'm building FFMPEG in vcpkg manifest mode. Here is my vcpkg.json :

    &#xA;

    {&#xA;  "name": "project",&#xA;  "version": "1.0.0",&#xA;  "dependencies": [&#xA;    {&#xA;      "name": "ffmpeg",&#xA;      "features": [&#xA;        "avcodec",&#xA;        "avdevice",&#xA;        "avfilter",&#xA;        "avformat",&#xA;        "bzip2",&#xA;        "ffmpeg",&#xA;        "lzma",&#xA;        "postproc",&#xA;        "swresample",&#xA;        "swscale",&#xA;        "x264",&#xA;        "zlib"&#xA;      ]&#xA;    },&#xA;    "iniparser",&#xA;    "jsoncpp",&#xA;    "spdlog"&#xA;  ]&#xA;}&#xA;&#xA;

    &#xA;

    And I want to enable x11grab configuration in order to capture screen in Linux, but I found no feature was adapted.&#xA;Soon I found that —enable-libxcb was needed in configure and it was autodetect. So I build and install libxcb with source. And pkg-config can find it :

    &#xA;

    $ pkg-config --modversion xcb&#xA;1.17.0&#xA;

    &#xA;

    But it doesn't work because in default it is —disable-autodetect in $VCPKG_ROOT/ports/ffmpeg/portfile.cmake :

    &#xA;

    set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect")&#xA;

    &#xA;

    I try to modify $VCPKG_ROOT/ports/ffmpeg/portfile.cmake —enalbe-autodetect, but it doesn't work either. Here is the short message when appling vcpkg install --triplet x64-linux-release

    &#xA;

    -- Using source at /usr/local/src/cpp/third-party/vcpkg/buildtrees/ffmpeg/src/n7.0.2-8cb3114be3.clean&#xA;-- Getting CMake variables for x64-linux-release&#xA;-- Building Options: --enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect --target-os=linux --enable-pthreads --cc=gcc --host_cc=gcc --cxx=g&#x2B;&#x2B; --nm=nm --ar=&#x27;ar&#x27; --ranlib=ranlib --strip=strip --enable-gpl --enable-ffmpeg --disable-ffplay --disable-ffprobe --enable-avcodec --enable-avdevice --enable-avformat --enable-avfilter --enable-postproc --enable-swresample --enable-swscale --disable-alsa --disable-amf --disable-libaom --disable-libass --disable-avisynth --enable-bzlib --disable-libdav1d --disable-libfdk-aac --disable-libfontconfig --disable-libharfbuzz --disable-libfreetype --disable-libfribidi --disable-iconv --disable-libilbc --enable-lzma --disable-libmp3lame --disable-libmodplug --disable-cuda --disable-nvenc --disable-nvdec  --disable-cuvid --disable-ffnvcodec --disable-opencl --disable-opengl --disable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --disable-openssl --disable-libopus --enable-sdl2 --disable-libsnappy --disable-libsoxr --disable-libspeex --disable-libssh --disable-libtensorflow --disable-libtesseract --disable-libtheora --disable-libvorbis --disable-libvpx --disable-libwebp --enable-libx264 --disable-libx265 --disable-libxml2 --enable-zlib --disable-libsrt --disable-libmfx --enable-cross-compile --pkg-config="/bin/pkg-config" --pkg-config-flags=--static&#xA;-- Building Release Options: --enable-optimizations --extra-ldflags=-L"/usr/local/src/cpp/cmq/build/vcpkg_installed/x64-linux-release/lib"&#xA;-- Building ffmpeg for Release&#xA;

    &#xA;

    $ ffmpeg -devices&#xA;ffmpeg version 7.0.2 Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with gcc 14.2.0 (GCC)&#xA;  configuration: --prefix=/usr/local/src/cpp/third-party/vcpkg/packages/ffmpeg_x64-linux-release --enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect --target-os=linux --enable-pthreads --cc=gcc --host_cc=gcc --cxx=g&#x2B;&#x2B; --nm=nm --ar=ar --ranlib=ranlib --strip=strip --enable-gpl --enable-ffmpeg --disable-ffplay --disable-ffprobe --enable-avcodec --enable-avdevice --enable-avformat --enable-avfilter --enable-postproc --enable-swresample --enable-swscale --disable-alsa --disable-amf --disable-libaom --disable-libass --disable-avisynth --enable-bzlib --disable-libdav1d --disable-libfdk-aac --disable-libfontconfig --disable-libharfbuzz --disable-libfreetype --disable-libfribidi --disable-iconv --disable-libilbc --enable-lzma --disable-libmp3lame --disable-libmodplug --disable-cuda --disable-nvenc --disable-nvdec --disable-cuvid --disable-ffnvcodec --disable-opencl --disable-opengl --disable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --disable-openssl --disable-libopus --disable-sdl2 --disable-libsnappy --disable-libsoxr --disable-libspeex --disable-libssh --disable-libtensorflow --disable-libtesseract --disable-libtheora --disable-libvorbis --disable-libvpx --disable-libwebp --enable-libx264 --disable-libx265 --disable-libxml2 --enable-zlib --disable-libsrt --disable-libmfx --enable-cross-compile --pkg-config=/bin/pkg-config --pkg-config-flags=--static --enable-optimizations --extra-ldflags=-L/usr/local/src/cpp/cmq/vcpkg_installed/x64-linux-release/lib --arch=x86_64 --enable-asm --enable-x86asm&#xA;  libavutil      59.  8.100 / 59.  8.100&#xA;  libavcodec     61.  3.100 / 61.  3.100&#xA;  libavformat    61.  1.100 / 61.  1.100&#xA;  libavdevice    61.  1.100 / 61.  1.100&#xA;  libavfilter    10.  1.100 / 10.  1.100&#xA;  libswscale      8.  1.100 /  8.  1.100&#xA;  libswresample   5.  1.100 /  5.  1.100&#xA;  libpostproc    58.  1.100 / 58.  1.100&#xA;Devices:&#xA; D. = Demuxing supported&#xA; .E = Muxing supported&#xA; ---&#xA; D  lavfi           Libavfilter virtual input device&#xA; DE oss             OSS (Open Sound System) playback&#xA;

    &#xA;