Recherche avancée

Médias (0)

Mot : - Tags -/performance

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (39)

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

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (5720)

  • Extracting Thumbnail URL from Video URL

    29 août 2023, par Deepak Sangle

    So, I have a video URL in an Amazon S3 bucket. I must extract the thumbnail image (preview image) from the video URL. The catch is that I do not have the luxury to download or upload the complete video since it takes time. My approach is something like this.
I first created a blob object containing the first few seconds of that video using something like this.

    


      const chunkSize = 1024*1024; // 1MB
  const start = 0;
  const end = chunkSize - 1;
  const rangeHeader = `bytes=${start}-${end}`;
  
  const VideoResponse = await axios.get(url, { 
    responseType: 'arraybuffer',
    headers: { Range: rangeHeader }
  });

  const chunkData = VideoResponse.data; 
  
  const videoBlob = new Blob([chunkData], { type: 'video/mp4' });
  const videoUrl = URL.createObjectURL(videoBlob);
  console.log({chunkData, videoBlob, videoUrl});


    


    Console gives me something like this

    


    {&#xA;  chunkData: <buffer 00="00" 1c="1c" 66="66" 74="74" 79="79" 70="70" 6d="6d" 34="34" 32="32" 69="69" 73="73" 6f="6f" 61="61" 76="76" 63="63" 31="31" 02="02" bd="bd" ab="ab" 6c="6c" 68="68" 64="64" c7="c7" 1048526="1048526" more="more" bytes="bytes">,&#xA;  videoBlob: Blob { size: 1048576, type: &#x27;video/mp4&#x27; },&#xA;  videoUrl: &#x27;blob:nodedata:764fce87-792f-47e8-bc3e-15921ee5787f&#x27;&#xA;}&#xA;</buffer>

    &#xA;

    Now, there are many options after this. I am trying to download this blob object by converting it into a file. After I successfully convert it into an mp4 file, I can easily take a screenshot of it using fluent-ffmpeg package. However, I couldn't convert it into a file. If I try to do something like this

    &#xA;

      const BlobResponse = await axios({&#xA;    method: &#x27;GET&#x27;,&#xA;    url: videoUrl,&#xA;    responseType: &#x27;stream&#x27;&#xA;  });&#xA;&#xA;  const file = fs.createWriteStream(`video.mp4`);&#xA;  BlobResponse.data.pipe(file);&#xA;  &#xA;  file.on("error", (error) => {&#xA;    console.log(`There was an error writing the file. Details: $ {error}`);&#xA;  });&#xA;&#xA;  file.on(&#x27;finish&#x27;, () => {&#xA;    file.close();&#xA;    console.log("File downloaded successfully");&#xA;  });&#xA;

    &#xA;

    But it throws me the error AxiosError: Unsupported protocol blob:

    &#xA;

    I also tried to directly convert the blob object to a jpeg object but to no avail.

    &#xA;

    I have searched complete StackOverflow, and I have not found a single solution working so please let me know why those are not working or if there is any new solution to do this.

    &#xA;

  • xdotool to tab to a button on a web page and use the mouse to disable a drop down menu option

    25 juin 2023, par Mash

    I have a Bash script that open a Amazon chime meeting URL in firefox, uses XDOtool to enter a meetig participant name, and tab and mouse click functions. and next uses ffmpeg to stream the video and audio output of the Amazon chime meeting to an RTMP destination.

    &#xA;

    When this is streamed, the Amazon chime web app has "More" drop down Menu. Within the Menu it has a option to disable the self view. I want to add xdotool commands to disable this self view option from the more drop down menu on the amazon chime web app page.

    &#xA;

    the Amazon chime meeting URL is - https://app.chime.aws/meetings/

    &#xA;

    Here is the Bash Script

    &#xA;

    #!/bin/bash&#xA;BROWSER_URL=${MEETING_URL}&#xA;SCREEN_WIDTH=1920&#xA;SCREEN_HEIGHT=1080&#xA;SCREEN_RESOLUTION=${SCREEN_WIDTH}x${SCREEN_HEIGHT}&#xA;CAPTURE_SCREEN_RESOLUTION=1920x1080&#xA;COLOR_DEPTH=24&#xA;X_SERVER_NUM=2&#xA;VIDEO_BITRATE=6000&#xA;VIDEO_FRAMERATE=30&#xA;VIDEO_GOP=$((VIDEO_FRAMERATE * 2))&#xA;AUDIO_BITRATE=160k&#xA;AUDIO_SAMPLERATE=44100&#xA;AUDIO_CHANNELS=2&#xA;&#xA;# Start PulseAudio server so Firefox will have somewhere to which to send audio&#xA;pulseaudio -D --exit-idle-time=-1&#xA;pacmd load-module module-virtual-sink sink_name=v1  # Load a virtual sink as `v1`&#xA;pacmd set-default-sink v1  # Set the `v1` as the default sink device&#xA;pacmd set-default-source v1.monitor  # Set the monitor of the v1 sink to be the default source&#xA;&#xA;# Start X11 virtual framebuffer so Firefox will have somewhere to draw&#xA;Xvfb :${X_SERVER_NUM} -ac -screen 0 ${SCREEN_RESOLUTION}x${COLOR_DEPTH} > /dev/null 2>&amp;1 &amp;&#xA;export DISPLAY=:${X_SERVER_NUM}.0&#xA;sleep 0.5  # Ensure this has started before moving on&#xA;&#xA;# Create a new Firefox profile for capturing preferences for this&#xA;firefox --no-remote --new-instance --createprofile "foo4 /tmp/foo4"&#xA;&#xA;# Install the OpenH264 plugin for Firefox&#xA;mkdir -p /tmp/foo4/gmp-gmpopenh264/1.8.1.1/&#xA;pushd /tmp/foo4/gmp-gmpopenh264/1.8.1.1 >&amp; /dev/null&#xA;curl -s -O http://ciscobinary.openh264.org/openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip&#xA;unzip openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip&#xA;rm -f openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip&#xA;popd >&amp; /dev/null&#xA;&#xA;# Set the Firefox preferences to enable automatic media playing with no user&#xA;# interaction and the use of the OpenH264 plugin.&#xA;cat &lt;<eof>> /tmp/foo4/prefs.js&#xA;user_pref("media.autoplay.default", 0);&#xA;user_pref("media.autoplay.enabled.user-gestures-needed", false);&#xA;user_pref("media.navigator.permission.disabled", true);&#xA;user_pref("media.gmp-gmpopenh264.abi", "x86_64-gcc3");&#xA;user_pref("media.gmp-gmpopenh264.lastUpdate", 1571534329);&#xA;user_pref("media.gmp-gmpopenh264.version", "1.8.1.1");&#xA;user_pref("doh-rollout.doorhanger-shown", true);&#xA;EOF&#xA;&#xA;# Start Firefox browser and point it at the URL we want to capture&#xA;#&#xA;# NB: The `--width` and `--height` arguments have to be very early in the&#xA;# argument list or else only a white screen will result in the capture for some&#xA;# reason.&#xA;firefox \&#xA;  -P foo4 \&#xA;  --width ${SCREEN_WIDTH} \&#xA;  --height ${SCREEN_HEIGHT} \&#xA;  --new-instance \&#xA;  --first-startup \&#xA;  --foreground \&#xA;  --kiosk \&#xA;  --ssb \&#xA;  "${BROWSER_URL}" \&#xA;  &amp;&#xA;sleep 10  # Ensure this has started before moving on, waiting for loading the Chime web app&#xA;xdotool key Return #Select yes for the pop-up window of "Would you like to open this link with Chime app?"&#xA;sleep 3&#xA;xdotool key Escape #Close the pop-up window&#xA;sleep 3&#xA;xdotool type Livestream #Type "Livestream" on the name input field&#xA;sleep 3&#xA;xdotool key Tab #Move to "join the meeting" button&#xA;sleep 3&#xA;xdotool key Return #Click "join the meeting" button&#xA;sleep 3&#xA;xdotool key Return #Close the pop-up window once again&#xA;sleep 3&#xA;xdotool key Escape #Close the pop-up window once again&#xA;sleep 3&#xA;xdotool key Return #Click "Use system audio" setting&#xA;sleep 3&#xA;xdotool key Escape #Close warning message&#xA;sleep 3&#xA;xdotool mousemove 1 1 click 1  # Move mouse out of the way so it doesn&#x27;t trigger the "pause" overlay on the video tile  &#xA;&#xA;# Start ffmpeg to transcode the capture from the X11 framebuffer and the&#xA;# PulseAudio virtual sound device we created earlier and send that to the RTMP&#xA;# endpoint in H.264/AAC format using a FLV container format.&#xA;#&#xA;# NB: These arguments have a very specific order. Seemingly inocuous changes in&#xA;# argument order can have pretty drastic effects, so be careful when&#xA;# adding/removing/reordering arguments here.&#xA;ffmpeg \&#xA;  -hide_banner -loglevel error \&#xA;  -nostdin \&#xA;  -s ${CAPTURE_SCREEN_RESOLUTION} \&#xA;  -r ${VIDEO_FRAMERATE} \&#xA;  -draw_mouse 0 \&#xA;  -f x11grab \&#xA;    -i ${DISPLAY} \&#xA;  -f pulse \&#xA;    -ac 2 \&#xA;    -i default \&#xA;    -vf "crop=1600:980:0:1080" \&#xA;  -c:v libx264 \&#xA;    -pix_fmt yuv420p \&#xA;    -profile:v main \&#xA;    -preset slow \&#xA;    -x264opts "nal-hrd=cbr:no-scenecut" \&#xA;    -minrate ${VIDEO_BITRATE} \&#xA;    -maxrate ${VIDEO_BITRATE} \&#xA;    -g ${VIDEO_GOP} \&#xA;  -filter_complex "aresample=async=1000:min_hard_comp=0.100000:first_pts=1" \&#xA;  -async 1 \&#xA;  -c:a aac \&#xA;    -b:a ${AUDIO_BITRATE} \&#xA;    -ac ${AUDIO_CHANNELS} \&#xA;    -ar ${AUDIO_SAMPLERATE} \&#xA;  -f flv ${RTMP_URL}``&#xA;&#xA;</eof>

    &#xA;

    what i have tried so far in in the bash script

    &#xA;

  • Installing FFMPEG on my EC2 instance takes too long ; what am I doing wrong ? [closed]

    24 août 2023, par Shaban Khawar

    I found a good article on how to download onto my EC2 instance : link&#xA;Here's the issue. It takes forever ! It takes around 15 minutes to install.

    &#xA;

    I'm running my EC2 instance on Amazon Linux 2023, so no apt-get for me.&#xA;Also my EC2 instance is created by my EB environment, so if auto-scaling occurs, my instance will be terminated and a new one will be created. I can set .ebextensions to run all the commands to install FFMPEG again but as mentioned above, it takes forever ! That means for 15-20 minutes, my server is down because of one dependancy. I feel like I'm going about this the wrong way, so any advice is appreciated.

    &#xA;