Recherche avancée

Médias (1)

Mot : - Tags -/framasoft

Autres articles (110)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

Sur d’autres sites (10545)

  • AWS Lambda failed to resolve hostname in child_process spawn

    14 juin, par warly

    i'm trying to get ffmpeg working in AWS Lambda reading from and writing to S3. I crawled through dozens of aws documentations, stackoverflow questions and blog posts. All do it slightly different, but in the end none of them worked for me. So I hope to find help here :)
I sticked to the tutorial from InPlainEnglish : https://plainenglish.io/community/automated-video-processing-with-aws-lambda-and-ffmpeg-2834b7

    


    The ffprobe command does work, so ffmpeg is callable. But when calling ffmpeg within a child_process.spawn command i get the error Failed to resolve hostname my-bucket.s3.eu-central-1.amazonaws.com: System error

    


    export const handler = async (event) => {
    const s3 = new S3Client({});
    const bucket = event.Records[0].s3.bucket.name;
    const sourceKey = event.Records[0].s3.object.key;
    const sourceURL = await getSignedUrl(s3, new GetObjectCommand({
        Bucket: bucket,
        Key: sourceKey,
    }), {
        expiresIn: 900,
    });

    const tmpFilePath = 'tmp/video.mp4';
    const { convertOut } = await commander(`/opt/ffmpeg -i "${sourceURL}" -vf scale=1080:-2,format=yuv420p ${tmpFilePath}`);

    return {
        statusCode: 200,
        body: {
            result: JSON.stringify(convertOut),
        },
    };
};


    


    the signed url is fine. I've tested it with vanilla js await fetch(sourceURL) and it returned the file. The problem is that for some reason the child_process has no internet access.

    


    if anyone is able to point me in the right direction i would appreciate it :D

    


    Full error message :

    


    {
  "errorType": "Error",
  "errorMessage": "Command failed: /opt/ffmpeg -i \"https://my-bucket.s3.eu-central-1.amazonaws.com/original/Testvideo.MOV?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential={redacted}&X-Amz-Date=20240209T212255Z&X-Amz-Expires=900&X-Amz-Security-Token={redacted}&X-Amz-Signature={redacted}&X-Amz-SignedHeaders=host&x-id=GetObject\" -vf scale=1080:-2,crop=1080:1350,format=yuv420p tmp/video.mp4\nffmpeg version 6.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2023 the FFmpeg developers\n  built with gcc 8 (Debian 8.3.0-6)\n  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-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-libzimg\n  libavutil      58. 29.100 / 58. 29.100\n  libavcodec     60. 31.102 / 60. 31.102\n  libavformat    60. 16.100 / 60. 16.100\n  libavdevice    60.  3.100 / 60.  3.100\n  libavfilter     9. 12.100 /  9. 12.100\n  libswscale      7.  5.100 /  7.  5.100\n  libswresample   4. 12.100 /  4. 12.100\n  libpostproc    57.  3.100 / 57.  3.100\n[tcp @ 0x141950d0] Failed to resolve hostname my-bucket.s3.eu-central-1.amazonaws.com: System error\n[in#0 @ 0x14190900] Error opening input: Input/output error\nError opening input file https://my-bucket.s3.eu-central-1.amazonaws.com/original/Testvideo.MOV?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential={redacted}&X-Amz-Date=20240209T212255Z&X-Amz-Expires=900&X-Amz-Security-Token={redacted}&X-Amz-Signature={redacted}&X-Amz-SignedHeaders=host&x-id=GetObject.\nError opening input files: Input/output error\n",
  "trace": [
    "Error: Command failed: /opt/ffmpeg -i \"https://my-bucket.s3.eu-central-1.amazonaws.com/original/Testvideo.MOV?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential={redacted}&X-Amz-Date=20240209T212255Z&X-Amz-Expires=900&X-Amz-Security-Token={redacted}&X-Amz-Signature={redacted}&X-Amz-SignedHeaders=host&x-id=GetObject\" -vf scale=1080:-2,crop=1080:1350,format=yuv420p tmp/video.mp4",
    "ffmpeg version 6.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2023 the FFmpeg developers",
    "  built with gcc 8 (Debian 8.3.0-6)",
    "  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-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-libzimg",
    "  libavutil      58. 29.100 / 58. 29.100",
    "  libavcodec     60. 31.102 / 60. 31.102",
    "  libavformat    60. 16.100 / 60. 16.100",
    "  libavdevice    60.  3.100 / 60.  3.100",
    "  libavfilter     9. 12.100 /  9. 12.100",
    "  libswscale      7.  5.100 /  7.  5.100",
    "  libswresample   4. 12.100 /  4. 12.100",
    "  libpostproc    57.  3.100 / 57.  3.100",
    "[tcp @ 0x141950d0] Failed to resolve hostname my-bucket.s3.eu-central-1.amazonaws.com: System error",
    "[in#0 @ 0x14190900] Error opening input: Input/output error",
    "Error opening input file https://my-bucket.s3.eu-central-1.amazonaws.com/original/Testvideo.MOV?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential={redacted}&X-Amz-Date=20240209T212255Z&X-Amz-Expires=900&X-Amz-Security-Token={redacted}&X-Amz-Signature={redacted}&X-Amz-SignedHeaders=host&x-id=GetObject.",
    "Error opening input files: Input/output error",
    "",
    "    at ChildProcess.exithandler (node:child_process:422:12)",
    "    at ChildProcess.emit (node:events:518:28)",
    "    at maybeClose (node:internal/child_process:1105:16)",
    "    at ChildProcess._handle.onexit (node:internal/child_process:305:5)"
  ]
}
enter code here


    


    Update : Turns out it is not S3 or internet, but the child_process which does not seem to have internet access. I've update my description above.

    


  • FFmpeg : Trying to fade out first and later fade back in doesn't work [duplicate]

    6 septembre 2023, par Paul S

    While I just became a registered user on the site, I've been utilizing Stack Overflow for years, virtually always being able to find solutions to problems I've encountered. Unfortunately, not this time ; I have encountered a problem with the ffmpeg video fade filter. There are lots of previously proposed issues along with their solutions, but none (that I can find) that address a twist that I have.

    


    Most questions ask, "how do I fade in", or "how do I fade out", and "how do I fade in at the beginning and fade out at the end." If I want to fade in and later fade out, my below code works just fine.

    


    ffmpeg -ss 00.0 -accurate_seek -to 15.0 -i My.Test.File.mkv -c:v h264 -vf fade=t=in:st=0:d=2,fade=t=out:st=13:d=2 -b:v 825k -s 1280x720 -r 29.97 -c:a aac -ar 44100 -ac 2 -b:a 96k output.mp4


    


    However, I actually want to fade out somewhere in the middle, and then fade back in shortly after, and that doesn't seem to work. I structured the ffmpeg command as so :

    


    ffmpeg -ss 00.0 -accurate_seek -to 15.0 -i My.Test.File.mkv -c:v h264 -vf fade=t=out:st=6:d=2,fade=t=in:st=9:d=2 -b:v 825k -s 1280x720 -r 29.97 -c:a aac -ar 44100 -ac 2 -b:a 96k output.mp4


    


    This fails and yields a completely blank video. I've also tried some -filter_complex variations, but get similar results ; fading in and later fading out works, but fading out and later fading in does not.

    


    I'm using the latest ffmpeg windows version on Windows 10. I would have attached a sample video file but I'm seeing how to do that. It is not the original video file that started my issue, but it does duplicate the issue. Not sure what other info might help in coming up with a solution. Thoughts ?

    


  • ffmpeg built on mac 10.13 fails when ran on other computer (dyld : Library not loaded libmp3lame.0.dylib)

    15 mars 2023, par Martin

    I have a shell script called buildffmpeg.sh which I call with the command $ sh buildffmpeg.sh on my mac os high sierra 10.13 machine :

    


    #!/bin/bash

# If you get error `c compiler failed` run `sudo apt install libglfw3-dev libglew-dev`
# apt-get install build-essential
# apt-get build-dep ffmpeg
# when running this on mac, you need to install some libraries such as 'brew install opus'

set -e

CWD=$(pwd)
PACKAGES="$CWD/packages"
WORKSPACE="$CWD/workspace"
ADDITIONAL_CONFIGURE_OPTIONS=""


mkdir -p "$PACKAGES"
mkdir -p "$WORKSPACE"

FFMPEG_TAG="$1"
FFMPEG_URL="http://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/74c4c539538e36d8df02de2484b045010d292f2c.tar.gz"

FFMPEG_ARCHIVE="$PACKAGES/ffmpeg.tar.gz"

if [ ! -f "$FFMPEG_ARCHIVE" ]; then
    echo "Downloading tag ${FFMPEG_TAG}..."
    curl -L -o "$FFMPEG_ARCHIVE" "$FFMPEG_URL"
fi

EXTRACTED_DIR="$PACKAGES/extracted"

mkdir -p "$EXTRACTED_DIR"

echo "Extracting..."
tar -xf "$FFMPEG_ARCHIVE" --strip-components=1 -C "$EXTRACTED_DIR"

cd "$EXTRACTED_DIR"

echo "Building..."

# Min electron supported version
MACOS_MIN="10.10"

./configure $ADDITIONAL_CONFIGURE_OPTIONS \
    --pkgconfigdir="$WORKSPACE/lib/pkgconfig" \
    --prefix=${WORKSPACE} \
    --pkg-config-flags="--static" \
    --extra-cflags="-I$WORKSPACE/include -mmacosx-version-min=${MACOS_MIN}" \
    --extra-ldflags="-L$WORKSPACE/lib -mmacosx-version-min=${MACOS_MIN} -L/usr/local/opt/lame/lib -Wl,-rpath,/usr/local/opt/lame/lib" \
    --extra-libs="-lpthread -lm" \
    --enable-static \
    --disable-securetransport \
    --disable-debug \
    --disable-shared \
    --disable-ffplay \
    --disable-lzma \
    --disable-doc \
    --enable-version3 \
    --enable-pthreads \
    --enable-runtime-cpudetect \
    --enable-avfilter \
    --enable-filters \
    --disable-libxcb \
    --enable-gpl \
    --disable-libass \
    --enable-libmp3lame \
    --enable-libx264 \
    --enable-libopus

make -j 4
make install

otool -L "$WORKSPACE/bin/ffmpeg"
otool -L "$WORKSPACE/bin/ffprobe"

echo "Building done. The binaries can be found here: $WORKSPACE/bin/ffmpeg $WORKSPACE/bin/ffprobe"

mkdir ffmpeg-mac/ 
cp -r "$WORKSPACE/bin/" "$CWD/ffmpeg-mac/"

rm -rf "$PACKAGES"
rm -rf "$WORKSPACE"

exit 0



    


    When it finishes, I have a folder ffmpeg-mac/ which contains two built executables ffmpeg and ffprobe.

    


    but if I try to move the ffmpeg-mac folder onto my other macbook, running 11.2.3 big sur, and if i try to call my built ffmpeg file with ./ffmpeg-mac/ffmpeg, it fails with this error :

    


    $ ./ffmpeg-mac/ffmpeg 
dyld: Library not loaded: /usr/local/opt/lame/lib/libmp3lame.0.dylib
  Referenced from: /Users/martinbarker/Documents/projects/rendertunev1.1.2/./ffmpeg-mac/ffmpeg
  Reason: image not found
Abort trap: 6



    


    So I think when I run the script to build ffmpeg on my mac 10.13 high sierra machine, it for some reason is not including the file libmp3lame.0.dylib. I've tried using brew to uninstall, install, unlink, and link lame, but no luck. I've tried manually editing my shell script to include the file but no luck.

    


    Can anyone help me fix my build script so that when I build ffmpeg on high sierra, I can use the finished built file on other mac computers ?