Recherche avancée

Médias (91)

Autres articles (9)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (2422)

  • Distube (Unbuntu) - DiscordAPIERROR : Invalid Form Body Content : Must be 2000 or fewer in length

    25 mai 2021, par Bombo43453

    I recently transferred my discord bot to a VPS that is unbuntu based. The issue is that it will not play any sort of music. It starts to process it and then it says the error below.

    


    (node:5252) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
content: Must be 2000 or fewer in length.
    at RequestHandler.execute (/home/lanthonylal/EA-BOT/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async RequestHandler.push (/home/lanthonylal/EA-BOT/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
(node:5252) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by re
jecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see http
s://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:5252) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js proces
s with a non-zero exit code.


    


    My Play.js File :

    


    module.exports = {
    name: `play`,
    description: `Play A Song`,
    hidden: false,
    aliases: [`p`],
    usage: `(song)`,

async execute(client, message, args, Discord, errorlog, botlog, msglog, profileData, guildProfile){
    const music = args.join(' ');
    if (!message.member.voice.channel) return message.channel.send(`Uh Oh - You're not in a voice channel !`);

        if (message.guild.me.voice.channel && message.member.voice.channel.id !== message.guild.me.voice.channel.id) return message.channel.send(` You Are Not In The Same Voice Channel The Bot Is Currently In!`);

        if (!args[0]) return message.channel.send(`Uh Oh - Please indicate the title of a song !`);
    client.distube.play(message, args.join(' '))
}
}


    


    I can confirm that this works when I use windows powershell. Do you think this can possibly be due to it being unbuntu or does distube have no support for this ?

    


  • Feeding content of an X-Window to a virtual camera

    11 mai 2022, par Ingo

    I want to feed a virtual webcam device from an application window (under Linux/Xorg). I have so far just maximised the window and then used ffmpeg to grab the whole screen like this :

    


    ffmpeg \
    -f x11grab -framerate 15 -video_size 1280x1024 -i :0+0,0 \
    -f v4l2 -vcodec rawvideo -pix_fmt yuv420p /dev/video6


    


    where /dev/video6 is my v4l2loopback device. This works and I can use the virtual camera in video calls in chrome. This also indicates that the v4l2loopback module is correctly loaded into the kernel.

    


    Unfortunately, it seems that ffmpeg can only read the whole screen, but not an application window. gstreamer on the other hand can. Playing around with gst-launch-1.0, I was hoping that I could get away with something like this :

    


    gst-launch-1.0 ximagesrc xid=XID_OF_MY_WINDOW \
    ! "video/x-raw" \
    ! v4l2sink device=/dev/video6


    


    However, that complains that Device '/dev/video6' is not an output device.

    


    Given that ffmpeg seems happy to write to /dev/video6 I also tried piping the gst output to ffmpeg like this :

    


    gst-launch-1.0 ximagesrc xid=XID_OF_MY_WINDOW \
    ! "video/x-raw" \
    ! filesink location=/dev/stdout \
    | ffmpeg -i - -codec copy -f v4l2 -vcodec rawvideo -pix_fmt yuv420p /dev/video6


    


    But then ffmpeg complains about Invalid data found when processing input.

    


    This is running inside an xvfb headless environment, so mouse interactions will not work. This rules out obs as far as I can see.

    


    I'm adding the chrome tag, because I see that chrome in principle would also provide a virtual camera via the --use-fake-device-for-media-stream switch. However, it seems that this switch only supports a static file rather than a stream.

    


    Although I don't see why, it might be relevant that the other "application window" window is simply a second browser window. So the setup is google meet (or similar) in one browser window and the virtual camera gets fed vrom a second browser window.

    


  • FFMPEG on AWS Lambda Only outputs half a second of video when converting video from mobile safari

    18 août 2023, par user1825257

    I am running FFMPEG on AWS Lambda using nodejs and fluent-ffmpeg. I am able to convert videos recorded on most devices / browsers, but when I attempt to convert videos recorded on Mobile Safari, the length of the output video is 1/2 a second regardless of the input length.

    


    My Typescript code is :

    


        import * as ffmpeg from &#x27;fluent-ffmpeg&#x27;;&#xA;    public static StandardizeVideoFormat(&#xA;      inputSignedUrl: string,&#xA;      filename: string,&#xA;    ): Promise<string> {&#xA;      const localFilePath = `/tmp/${Date.now()}_${filename}.mp4`;&#xA;    &#xA;      return new Promise((resolve, reject) => {&#xA;        ffmpeg(inputSignedUrl)&#xA;          .outputOptions([&#xA;            &#x27;-crf&#x27;,&#xA;            &#x27;18&#x27;,&#xA;            &#x27;-vcodec&#x27;,&#xA;            &#x27;libx264&#x27;,&#xA;            &#x27;-codec:a&#x27;,&#xA;            &#x27;aac&#x27;,&#xA;            &#x27;-preset&#x27;,&#xA;            &#x27;medium&#x27;,&#xA;          ])&#xA;          .output(localFilePath)&#xA;          .on(&#x27;start&#x27;, function (commandLine) {&#xA;            console.log(&#x27;Spawned Ffmpeg with command: &#x27; &#x2B; commandLine);&#xA;          })&#xA;          .on(&#x27;error&#x27;, function (err) {&#xA;            reject(err);&#xA;          })&#xA;          .on(&#x27;progress&#x27;, function (progress) {&#xA;            console.log(&#x27;progress&#x27;, progress);&#xA;          })&#xA;          .on(&#x27;end&#x27;, function () {&#xA;            resolve(localFilePath);&#xA;          })&#xA;          .run();&#xA;      });&#xA;    }&#xA;</string>

    &#xA;

    Using FFprobe, The metadata of the input file is :

    &#xA;

    {&#xA;  streams: [&#xA;    {&#xA;      index: 0,&#xA;      codec_name: &#x27;h264&#x27;,&#xA;      codec_long_name: &#x27;H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10&#x27;,&#xA;      profile: &#x27;Baseline&#x27;,&#xA;      codec_type: &#x27;video&#x27;,&#xA;      codec_tag_string: &#x27;avc1&#x27;,&#xA;      codec_tag: &#x27;0x31637661&#x27;,&#xA;      width: 1920,&#xA;      height: 1080,&#xA;      coded_width: 1920,&#xA;      coded_height: 1080,&#xA;      closed_captions: 0,&#xA;      film_grain: 0,&#xA;      has_b_frames: 0,&#xA;      sample_aspect_ratio: &#x27;N/A&#x27;,&#xA;      display_aspect_ratio: &#x27;N/A&#x27;,&#xA;      pix_fmt: &#x27;yuvj420p&#x27;,&#xA;      level: 40,&#xA;      color_range: &#x27;pc&#x27;,&#xA;      color_space: &#x27;unknown&#x27;,&#xA;      color_transfer: &#x27;unknown&#x27;,&#xA;      color_primaries: &#x27;unknown&#x27;,&#xA;      chroma_location: &#x27;left&#x27;,&#xA;      field_order: &#x27;progressive&#x27;,&#xA;      refs: 1,&#xA;      is_avc: &#x27;true&#x27;,&#xA;      nal_length_size: 4,&#xA;      id: &#x27;0x1&#x27;,&#xA;      r_frame_rate: &#x27;30000/1001&#x27;,&#xA;      avg_frame_rate: &#x27;60000/1991&#x27;,&#xA;      time_base: &#x27;1/600&#x27;,&#xA;      start_pts: 26,&#xA;      start_time: 0.043333,&#xA;      duration_ts: 4008,&#xA;      duration: 6.68,&#xA;      bit_rate: 10175170,&#xA;      max_bit_rate: &#x27;N/A&#x27;,&#xA;      bits_per_raw_sample: 8,&#xA;      nb_frames: &#x27;N/A&#x27;,&#xA;      nb_read_frames: &#x27;N/A&#x27;,&#xA;      nb_read_packets: &#x27;N/A&#x27;,&#xA;      extradata_size: 31,&#xA;      side_data_type: &#x27;Display Matrix&#x27;,&#xA;      displaymatrix: &#x27;&#x27;,&#xA;      rotation: &#x27;-90&#x27;,&#xA;      tags: [Object],&#xA;      disposition: [Object]&#xA;    },&#xA;    {&#xA;      index: 1,&#xA;      codec_name: &#x27;aac&#x27;,&#xA;      codec_long_name: &#x27;AAC (Advanced Audio Coding)&#x27;,&#xA;      profile: &#x27;LC&#x27;,&#xA;      codec_type: &#x27;audio&#x27;,&#xA;      codec_tag_string: &#x27;mp4a&#x27;,&#xA;      codec_tag: &#x27;0x6134706d&#x27;,&#xA;      sample_fmt: &#x27;fltp&#x27;,&#xA;      sample_rate: 48000,&#xA;      channels: 1,&#xA;      channel_layout: &#x27;mono&#x27;,&#xA;      bits_per_sample: 0,&#xA;      initial_padding: 0,&#xA;      id: &#x27;0x2&#x27;,&#xA;      r_frame_rate: &#x27;0/0&#x27;,&#xA;      avg_frame_rate: &#x27;0/0&#x27;,&#xA;      time_base: &#x27;1/48000&#x27;,&#xA;      start_pts: 0,&#xA;      start_time: 0,&#xA;      duration_ts: 319488,&#xA;      duration: 6.656,&#xA;      bit_rate: 181302,&#xA;      max_bit_rate: &#x27;N/A&#x27;,&#xA;      bits_per_raw_sample: &#x27;N/A&#x27;,&#xA;      nb_frames: &#x27;N/A&#x27;,&#xA;      nb_read_frames: &#x27;N/A&#x27;,&#xA;      nb_read_packets: &#x27;N/A&#x27;,&#xA;      extradata_size: 2,&#xA;      tags: [Object],&#xA;      disposition: [Object]&#xA;    }&#xA;  ],&#xA;  format: {&#xA;    filename: &#x27;input.mp4&#x27;,&#xA;    nb_streams: 2,&#xA;    nb_programs: 0,&#xA;    format_name: &#x27;mov,mp4,m4a,3gp,3g2,mj2&#x27;,&#xA;    format_long_name: &#x27;QuickTime / MOV&#x27;,&#xA;    start_time: 0,&#xA;    duration: 6.723333,&#xA;    size: 8651792,&#xA;    bit_rate: 10294646,&#xA;    probe_score: 100,&#xA;    tags: {&#xA;      major_brand: &#x27;iso5&#x27;,&#xA;      minor_version: &#x27;1&#x27;,&#xA;      compatible_brands: &#x27;isomiso5hlsf&#x27;,&#xA;      creation_time: &#x27;2023-08-05T19:03:15.000000Z&#x27;&#xA;    }&#xA;  },&#xA;  chapters: []&#xA;}&#xA;

    &#xA;

    Any ideas on why the output of my command on this file always results in a 0.5 second long output ?

    &#xA;