Recherche avancée

Médias (91)

Autres articles (68)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (2519)

  • How to insert bullet screen comments into a video by using ffmpeg ?

    7 septembre 2019, par Saeron Meng

    I would like to add some real-time comments in my video but I do not know how to use ffmpeg to realize this. The comments are like screen bullets through the screen, scrolling from right to left.

    My thought is to count the length of the comments and define speeds for them to move. Don’t worry about the source of the comments, I have already gotten them saved as an xml file. Also, I can transfer it into srt. For instance :

    <chat timestamp="671.195">
       <ems utctime="1562584080" sender="Bill">
           <richtext></richtext>
       </ems>
    </chat>
    <chat timestamp="677.798">
       <ems utctime="1562584086" sender="Jack">
           <richtext></richtext>
       </ems>
    </chat>

    The final result is like this (I did not find an example displayed in English), these fancy characters can move horizontally :

    example

    I have searched some solutions on the Internet, most of which talk about how to write ass/srt files and add motionless subtitles. Like this :

    3
    00:00:39,770 --> 00:00:41,880
    When I was lying there in the VA hospital ...

    4
    00:00:42,550 --> 00:00:44,690
    ... with a big hole blown through the middle of my life,

    5
    00:00:45,590 --> 00:00:48,120
    ... I started having these dreams of flying.

    ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4

    But I need another kind of "subtitles" which can move.

    So my question is, how to modify the ffmpeg command and the template of srt file so as to arrange the subtitles from the top to the bottom and let them move from right to left ?

  • Frequency response of ffmpeg filters

    13 novembre 2020, par Dr_Click

    I'm using ffmpeg to decode and encode signal. It works perfectly and I added filters. For example, I'm using such a command :

    &#xA;

    ffmpeg -re -i /home/dr_click/live.wav -af "anequalizer=c0 f=200 w=100 g=-5 t=0|c1 f=200 w=100 g=-5 t=0, anequalizer=c0 f=1000 w=100 g=3 t=0|c1 f=1000 w=100 g=3 t=0" -acodec pcm_s16be -ar 44100 -ac 2 -f rtp rtp://127.0.0.1:1234&#xA;

    &#xA;

    I'm streaming my file, adding 2 filters with 200 Hz and 1000 Hz as central frequency and 100 Hz width and it works.

    &#xA;

    With such a filter, I know my gain will be -5db at 200Hz. But what is the gain for frequencies at 250 Hz ? Still -5db ? -4.5db ? -3db ? And same question at 350Hz or any other frequency.

    &#xA;

    What I'm looking for and didn't found is the way to get the frequency response of such a filter for a bandwith from 20Hz to 20kHz. In other words, what I'd like to know for any frequency is : gain = f (frequency) with a given ffmpeg filter

    &#xA;

    Thank you for your help,

    &#xA;

    Dr_Click

    &#xA;

  • AWS Lambda failed to resolve hostname in child_process spawn

    28 mars 2024, 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 :)&#xA;I sticked to the tutorial from InPlainEnglish : https://plainenglish.io/community/automated-video-processing-with-aws-lambda-and-ffmpeg-2834b7

    &#xA;

    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

    &#xA;

    export const handler = async (event) => {&#xA;    const s3 = new S3Client({});&#xA;    const bucket = event.Records[0].s3.bucket.name;&#xA;    const sourceKey = event.Records[0].s3.object.key;&#xA;    const sourceURL = await getSignedUrl(s3, new GetObjectCommand({&#xA;        Bucket: bucket,&#xA;        Key: sourceKey,&#xA;    }), {&#xA;        expiresIn: 900,&#xA;    });&#xA;&#xA;    const tmpFilePath = &#x27;tmp/video.mp4&#x27;;&#xA;    const { convertOut } = await commander(`/opt/ffmpeg -i "${sourceURL}" -vf scale=1080:-2,format=yuv420p ${tmpFilePath}`);&#xA;&#xA;    return {&#xA;        statusCode: 200,&#xA;        body: {&#xA;            result: JSON.stringify(convertOut),&#xA;        },&#xA;    };&#xA;};&#xA;

    &#xA;

    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.

    &#xA;

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

    &#xA;

    Full error message :

    &#xA;

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

    &#xA;

    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.

    &#xA;