
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (73)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (5111)
-
QOpenGLWidget video rendering perfomance in multiple processes
24 novembre 2018, par MasterAlerMy problem may seem vague without code, but it actually isn’t.
So, there I’ve got an almost properly-working widget, which renders video frames.
Qt 5.10 and QOpenGLWidget subclassing worked fine, I didn’t make any sophisticated optimizations — there are two textures and a couple of shaders, converting YUV pixel format to RGB —
glTexImage2D()
+ shaders, no buffers.Video frames are obtained from FFMPEG, it shows great performance due to hardware acceleration... when there is only one video window.
The piece of software is a "video wall" — multiple independent video windows on the same screen. Of course, multi-threading would be the preferred solution, but legacy holds for now, I can’t change it.
So, 1 window with Full HD video consumes 2% CPU & 8-10% GPU regardless of the size of the window. But 7-10 similar windows, launched from the same executable at the same time consume almost all the CPU. My math says that 2 x 8 != 100...
My best guesses are :
- This is a ffmpeg decoder issue, hardware acceleration still is not magic, some hardware pipeline stalls
- 7-8-9 independent OpenGL contexts cost a lot more than 1 cost x N
- I’m not using PUBO or some other complex techniques to improve OpenGL rendering. It still explains nothing, but at least it is a guess
The behavior is the same on Ubuntu, where decoding uses different codec (I mean that using GPU accelerated or CPU accelerated codecs makes no difference !), so, it makes more probable that I’m missing something about OpenGL... or not, because launching 6-7 Qt examples with dynamic textures shows normal growth of CPU usages — it is approximately a sum for the number of windows.
Anyway, it becomes quite tricky for me to profile the case, so I hope someone could have been solving the similar problem before and could share his experience with me. I’d be appreciated for any ideas, how to deal with the described riddle.
I can add any pieces of code if that helps.
-
for loop from two values in list of dicts with python and ffmpeg
30 décembre 2019, par Brendon RathboneI’m having an issue figuring out how to do the last for loop in my first really useful python program. I am trying to split a video with ffmpeg based on a bunch of logic to figure out edit points.
I have a list of dictionaries ’cut_list’ that I have sorting figured out like this
[{'Cutstart': '01:00:00:00', 'CutEnd': '01:00:05:00'}, {'Cutstart': '01:00:10:01', 'CutEnd': '01:00:15:00'}, {'Cutstart': '01:00:20:01', 'CutEnd': '01:00:25:01'}]
I then am trying to feed these values to ffmpeg, iterating over the list of dicts like so :
cutcounter=1
for Cutstart & CutEnd in cut_list:
for k in Cutstart.items() & v in CutEnd.items() :
print(k)
print(v)
intime=Timecode(fps_real, k)
intime.set_fractional(True)
outtime=Timecode(fps_real, v)
outtime.set_fractional(True)
cutfile=str(cutcounter)+".mxf"
print(k)
print(v)
subprocess.call(['ffmpeg', '-i', "C:\\path\\to\\file\\BaseFile.mxf", '-ss', k, '-to', v, '-c:v', 'copy', '-c:a', 'copy', cutfile])
cutcounter=cutcounter+1My expected output is to iterate over the list and have chunks of the video split off at those specific timecodes and numbered 1.mxf and count up for every for loop to be recombined with inserted fixes to those timespans. I think after I figure out the for loop I will need to also feed the timecode values as HH:mm:ss:mss instead of HH:mm:ss:ff but that’s not the part that I’m having trouble figuring out yet. Right now I just can’t grok the logic of getting the cutstart and cutend for each timecode to feed into the ffmpeg script.
Current error as I bash my head against the wall trying to get smarter is :
Syntax Error: cannot assign to operator
I’m definitely inexperienced and have hacked this together from a lot of other helpful posts, but am struggling with sorting and lists vs list of dicts vs tuples etc. and where and when to use each one.
-
Remove black frames and sync audio with ffmpeg
24 janvier 2020, par rahim123I’m trying to figure out a way to automatically process .mp4 or .mkv videos that have been manually edited to remove a bunch of segments, leaving many blank spaces (black frames with no audio). I want to remove all but one black frame (although I would settle for removing all of them if it’s much simpler) and then also sync the audio after the video timings change.
I found this question and tried the three main suggestions :
ffmpeg -i in.mkv -vf mpdecimate,setpts=N/FRAME_RATE/TB out.mkv
ffmpeg -i in.mkv -vf [mpdecimate][] out.mkv
ffmpeg -i in.mkv -vf [decimate][]=cycle=6,[setpts][]=N/25/TB out.mkv
The first one does eliminate the black segments, but it doesn’t sync the audio. The other two commands don’t work :
> ffmpeg -i in.mp4 -vf [decimate][]=cycle=6,[setpts][]=N/25/TB out.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9 (SUSE Linux)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --optflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libssh --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lto --enable-lv2 --enable-libmfx --enable-vaapi --enable-vdpau --enable-libfdk-aac-dlopen --enable-nonfree --enable-libvo-amrwbenc --enable-version3 --enable-libx264 --enable-libx265 --enable-librtmp --enable-libxvid
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:34:23.62, start: 0.000000, bitrate: 506 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 640x480 [SAR 1:1 DAR 4:3], 412 kb/s, 29.97 fps, 29.97 tbr, 1867500000.00 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 86 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[AVFilterGraph @ 0x55ece8def080] Bad (empty?) label found in the following: "[]=cycle=6,[setpts][]=N/25/TB".
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[aac @ 0x55ece8c5be80] Qavg: 222.643
[aac @ 0x55ece8c5be80] 2 frames left in the queue on closing
Conversion failed!> ffmpeg -i in.mp4 -vf [decimate][]=cycle=6,[setpts][]=N/25/TB out.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9 (SUSE Linux)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --optflags='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcelt --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libdc1394 --enable-libdrm --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libssh --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lto --enable-lv2 --enable-libmfx --enable-vaapi --enable-vdpau --enable-libfdk-aac-dlopen --enable-nonfree --enable-libvo-amrwbenc --enable-version3 --enable-libx264 --enable-libx265 --enable-librtmp --enable-libxvid
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:34:23.62, start: 0.000000, bitrate: 506 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/unknown/smpte170m), 640x480 [SAR 1:1 DAR 4:3], 412 kb/s, 29.97 fps, 29.97 tbr, 1867500000.00 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 86 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[AVFilterGraph @ 0x558b0d48af80] Bad (empty?) label found in the following: "[]=cycle=6,[setpts][]=N/25/TB".
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[aac @ 0x558b0d2f7e80] Qavg: 222.643
[aac @ 0x558b0d2f7e80] 2 frames left in the queue on closing
Conversion failed!I also tried this script, but it also fails to sync the audio. I tried with both .mp4 and .mkv source files. Thanks for the help.