
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (100)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (8066)
-
Trim with transition/fade using FFMPEG given a list of timestamps
19 janvier 2024, par realsarmI have a video and a list of timestamps that I want to filter.


[
 {
 "timestamp": [10, 20],
 "state": true
 },
 {
 "timestamp": [30, 40],
 "state": false
 },
 {
 "timestamp": [50, 60],
 "state": true
 },
 {
 "timestamp": [70, 80],
 "state": true
 }
]



I have a script like this to trim based on state.


video_path = Path(video_in.name)
 video_file_name = video_path.stem

 timestamps_to_cut = [
 (timestamps_var[i]['timestamp'][0], timestamps_var[i]['timestamp'][1])
 for i in range(len(timestamps_var)) if timestamps_var[i]['state']]

 between_str = '+'.join(
 map(lambda t: f'between(t,{t[0]},{t[1]})', timestamps_to_cut))

 if timestamps_to_cut:
 video_file = ffmpeg.input(video_path)
 video = video_file.video.filter(
 "select", f'({between_str})').filter("setpts", "N/FRAME_RATE/TB")
 audio = video_file.audio.filter(
 "aselect", f'({between_str})').filter("asetpts", "N/SR/TB")

 output_video = f'./videos_out/{video_file_name}.mp4'
 ffmpeg.concat(video, audio, v=1, a=1).output(
 output_video).overwrite_output().global_args('-loglevel', 'quiet').run()



How can I smooth out this trimming like adding a fade or smoothing transition each time state is false ?


-
Révision 22182 : Éviter une notice PHP sur la ligne `list($t,$c,$carr,$and) = $join[$cle] ;` qui, b...
27 mai 2015, par marcimat ☺☮☯♫sont exceptionnellement sur les clés 0,1,2,4 (en sautant le 3, qui a été unset à un moment).
On reforme les numéros de clés avant. -
Merging videos. multiple overlays and audio in one step
3 février 2019, par user14567I have a process that I run hourly to update a 60 sec weather video.
I combine a background video with a generated m4a audio track, scrolling text and separate top and bottom overlays.
I need all of this in an mp4 and in a TLS (m3u8) format.
Right now I do this 3 ffmpeg consecutive sessions and end up with a rendered 720p mp4.
Then I run a 4th ffpmeg session to convert the the mp4 to a TLS version (I need both mp4 and m3u8.)
I am doing this in 4 ffmpeg runs because I haven’t figured out how to combine the filters and do it in less.
When I try an combine this, I lose either the overlays or the text. I can’t get it all to come out in one session. I’ve tried comma separating within the filters but I haven’t found the right combination.
Any assistance in showing me how to combine this work and reduce the number of runs would be greatly appreciated.
This runs on a Centos 7 box with ffmpeg version 3.4.1.
#
# Step 1: Combine background video with audio and scrolling text
#
ffmpeg -i /video/weather/media/sunnybeach.mp4 \
-i /video/weather/prod/currentweather.m4a \
-i /video/weather/media/weather-lower-third1.png \
-map 2:v:0 -map 1:a:0 -strict -2 \
-filter_complex "[0]split[txt][orig];[txt]drawtext=fontfile=/var/www/vhosts/30a.tv/httpdocs/openx/lib/pear/Image/Canvas/Fonts/arial.ttf:fontsize=80:fontcolor=white:x=(w-text_w)/2+20:y=h-70*t:textfile=/video/weather/prod/currentweather.txt:bordercolor=black:borderw=2[txt];[orig]crop=iw:50:0:0[orig];[txt][orig]overlay” \
-t 60 -c:v libx264 -y -s hd720 -loglevel quiet /video/weather/prod/currentweather.mp4 2>&1 >> /dev/null
if [ $? != 0 ]; then echo fail step 1; exit 1;fi
#
# Step 2: now overlay current lowerthird
#
ffmpeg -i /video/weather/prod/currentweather.mp4 \
-i /video/weather/media/weather-lower-third1.png \
-strict -2 -filter_complex "[0:v][1:v]overlay" -c:a copy -y \
-loglevel quiet $FKWI/currentweather1.mp4 2>&1 >> /dev/null
if [ $? != 0 ]; then echo fail step 2; exit 1;fi
#
# Step 3: now overlay current topbanner
#
ffmpeg -i $FKWI/currentweather1.mp4 \
-i /video/weather/media/weather-top-banner.png \
-strict -2 -filter_complex "[0:v][1:v]overlay" -c:a copy -y \
-loglevel quiet $FKWI/currentweather.mp4 2>&1 >> /dev/null
if [ $? != 0 ]; then echo fail step 3; exit 1;fi
#
# Step 4: Now make TLS version
#
cd $FKWI/httpdocs/weather
RES1=`/usr/bin/ffmpeg -i $FKWI/httpdocs/currentweather.mp4 \
-profile:v baseline -level 3.0 -s 1280x720 \
-c:a aac -ar 48000 -g 60 -start_number 0 \
-hls_time 6 -hls_list_size 0 -f hls \
-hls_base_url "http://$URL.com/weather/" \
-hls_segment_filename "video%04d.ts" \
-strict -2 -loglevel quiet "currentweather.m3u8" 2>&1>>/dev/null `
if [ $? != 0 ]; then echo fail step 4; exit 1;fiThis code yields both videos fine, but it takes 4 runs and I need it to happen in less runs.