
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (97)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-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 (7966)
-
AWS Lambda : "Unzipped size must be smaller than 106534017 bytes" after adding single file
17 septembre 2023, par leonWhen trying to deploy my lambdas using AWS through the serverless framework I had no problems until I tried adding the ffmpeg binary.


Now the ffmpeg binaries I have tried to add have ranged from 26 mb to 50 mb. Whichever I add, I get the following error :


UPDATE_FAILED: WhatsappDocumentHandlerLambdaFunction (AWS::Lambda::Function)
Resource handler returned message: "Unzipped size must be smaller than 106534017 bytes (Service: Lambda, Status Code: 400, Request ID: ...)" (RequestToken: ..., HandlerErrorCode: InvalidRequest)



The problem is that I did not add the file to this function. I added it to a completely different one.


I have tried the following things :


- 

- Creating an "empty" function that only contains the ffmpeg binary and a function handler
- Creating a layer that only contains the ffmpeg binary
- Deleting the ffmpeg binary (the error goes away and deployment succeeds
- Varying sizes of ffmpeg binaries between 26 and 50mb
- Getting the ffmpeg-lambda-layer (https://github.com/serverlesspub/ffmpeg-aws-lambda-layer ; https://serverlessrepo.aws.amazon.com/applications/us-east-1/145266761615/ffmpeg-lambda-layer) and deploying it myself












When trying every single one of these options I get the UPDATE_FAILED error in a different function that surely is not too big.


I know I can deploy using a docker image but why complicate things with docker images when it should work ?


I am very thankful for any ideas.


-
Extracting Thumbnail URL from Video URL
29 août 2023, par Deepak SangleSo, 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


{
 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">,
 videoBlob: Blob { size: 1048576, type: 'video/mp4' },
 videoUrl: 'blob:nodedata:764fce87-792f-47e8-bc3e-15921ee5787f'
}
</buffer>


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

const BlobResponse = await axios({
 method: 'GET',
 url: videoUrl,
 responseType: 'stream'
 });

 const file = fs.createWriteStream(`video.mp4`);
 BlobResponse.data.pipe(file);
 
 file.on("error", (error) => {
 console.log(`There was an error writing the file. Details: $ {error}`);
 });

 file.on('finish', () => {
 file.close();
 console.log("File downloaded successfully");
 });



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


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


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.


-
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 MashI 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.


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.


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


Here is the Bash Script


#!/bin/bash
BROWSER_URL=${MEETING_URL}
SCREEN_WIDTH=1920
SCREEN_HEIGHT=1080
SCREEN_RESOLUTION=${SCREEN_WIDTH}x${SCREEN_HEIGHT}
CAPTURE_SCREEN_RESOLUTION=1920x1080
COLOR_DEPTH=24
X_SERVER_NUM=2
VIDEO_BITRATE=6000
VIDEO_FRAMERATE=30
VIDEO_GOP=$((VIDEO_FRAMERATE * 2))
AUDIO_BITRATE=160k
AUDIO_SAMPLERATE=44100
AUDIO_CHANNELS=2

# Start PulseAudio server so Firefox will have somewhere to which to send audio
pulseaudio -D --exit-idle-time=-1
pacmd load-module module-virtual-sink sink_name=v1 # Load a virtual sink as `v1`
pacmd set-default-sink v1 # Set the `v1` as the default sink device
pacmd set-default-source v1.monitor # Set the monitor of the v1 sink to be the default source

# Start X11 virtual framebuffer so Firefox will have somewhere to draw
Xvfb :${X_SERVER_NUM} -ac -screen 0 ${SCREEN_RESOLUTION}x${COLOR_DEPTH} > /dev/null 2>&1 &
export DISPLAY=:${X_SERVER_NUM}.0
sleep 0.5 # Ensure this has started before moving on

# Create a new Firefox profile for capturing preferences for this
firefox --no-remote --new-instance --createprofile "foo4 /tmp/foo4"

# Install the OpenH264 plugin for Firefox
mkdir -p /tmp/foo4/gmp-gmpopenh264/1.8.1.1/
pushd /tmp/foo4/gmp-gmpopenh264/1.8.1.1 >& /dev/null
curl -s -O http://ciscobinary.openh264.org/openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip
unzip openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip
rm -f openh264-linux64-2e1774ab6dc6c43debb0b5b628bdf122a391d521.zip
popd >& /dev/null

# Set the Firefox preferences to enable automatic media playing with no user
# interaction and the use of the OpenH264 plugin.
cat <<eof>> /tmp/foo4/prefs.js
user_pref("media.autoplay.default", 0);
user_pref("media.autoplay.enabled.user-gestures-needed", false);
user_pref("media.navigator.permission.disabled", true);
user_pref("media.gmp-gmpopenh264.abi", "x86_64-gcc3");
user_pref("media.gmp-gmpopenh264.lastUpdate", 1571534329);
user_pref("media.gmp-gmpopenh264.version", "1.8.1.1");
user_pref("doh-rollout.doorhanger-shown", true);
EOF

# Start Firefox browser and point it at the URL we want to capture
#
# NB: The `--width` and `--height` arguments have to be very early in the
# argument list or else only a white screen will result in the capture for some
# reason.
firefox \
 -P foo4 \
 --width ${SCREEN_WIDTH} \
 --height ${SCREEN_HEIGHT} \
 --new-instance \
 --first-startup \
 --foreground \
 --kiosk \
 --ssb \
 "${BROWSER_URL}" \
 &
sleep 10 # Ensure this has started before moving on, waiting for loading the Chime web app
xdotool key Return #Select yes for the pop-up window of "Would you like to open this link with Chime app?"
sleep 3
xdotool key Escape #Close the pop-up window
sleep 3
xdotool type Livestream #Type "Livestream" on the name input field
sleep 3
xdotool key Tab #Move to "join the meeting" button
sleep 3
xdotool key Return #Click "join the meeting" button
sleep 3
xdotool key Return #Close the pop-up window once again
sleep 3
xdotool key Escape #Close the pop-up window once again
sleep 3
xdotool key Return #Click "Use system audio" setting
sleep 3
xdotool key Escape #Close warning message
sleep 3
xdotool mousemove 1 1 click 1 # Move mouse out of the way so it doesn't trigger the "pause" overlay on the video tile 

# Start ffmpeg to transcode the capture from the X11 framebuffer and the
# PulseAudio virtual sound device we created earlier and send that to the RTMP
# endpoint in H.264/AAC format using a FLV container format.
#
# NB: These arguments have a very specific order. Seemingly inocuous changes in
# argument order can have pretty drastic effects, so be careful when
# adding/removing/reordering arguments here.
ffmpeg \
 -hide_banner -loglevel error \
 -nostdin \
 -s ${CAPTURE_SCREEN_RESOLUTION} \
 -r ${VIDEO_FRAMERATE} \
 -draw_mouse 0 \
 -f x11grab \
 -i ${DISPLAY} \
 -f pulse \
 -ac 2 \
 -i default \
 -vf "crop=1600:980:0:1080" \
 -c:v libx264 \
 -pix_fmt yuv420p \
 -profile:v main \
 -preset slow \
 -x264opts "nal-hrd=cbr:no-scenecut" \
 -minrate ${VIDEO_BITRATE} \
 -maxrate ${VIDEO_BITRATE} \
 -g ${VIDEO_GOP} \
 -filter_complex "aresample=async=1000:min_hard_comp=0.100000:first_pts=1" \
 -async 1 \
 -c:a aac \
 -b:a ${AUDIO_BITRATE} \
 -ac ${AUDIO_CHANNELS} \
 -ar ${AUDIO_SAMPLERATE} \
 -f flv ${RTMP_URL}``

</eof>


what i have tried so far in in the bash script