
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (62)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)
Sur d’autres sites (10166)
-
Exceeded GA’s 10M hits data limit, now what ?
21 juin 2019, par Joselyn Khor -
splitting video into shots with ffmpeg from within python
13 juin 2024, par ludogAfter some searching, the following command works to split my input video into shots, and save the first frame from each shot.


ffmpeg -i input_vid.mp4 -filter:v "select='gt(scene,0.1)',showinfo" -vsync 0 frames/%05d.jpg



When run from the terminal, it prints a line to what I think is stderr for each of the extracted frames, like so


Parsed_showinfo_1 @ 0x7f0198003540] n: 884 pts: 132552 pts_time:2209.2 duration: 2 duration_time:0.0333333 fmt:yuv420p cl:left sar:0/1 s:480x360 i:P iskey:0 type:P checksum:F2D8FCAA plane_checksum:[2D2F32C1 6E0164EC 832064FD] mean:[16 128 128] stdev:[0.0 0.0 0.0]



I want to run this from Python, and also capture the output so I can get the timestamps of the extracted frames (e.g. pts_time:2209.2 in the example above). But when try it in a subprocess.run, I get the following error, and no files are written to
frames/
.

>> FFMPEG_PATH = imageio_ffmpeg.get_ffmpeg_exe()
>> x = subprocess.run([FFMEPG_PATH, "-i", "input_vid.mp4", '-filter:v ' "select=" "'gt(scene,0.1)'" ",showinfo", "-vsync", "0", r"frames/%05d.jpg"], capture_output=True)
>> print(x.stderr.decode())
 ffmpeg version 4.2.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
 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
 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 'input_vid.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2013-06-21T09:09:58.000000Z
 Duration: 00:37:10.88, start: 0.000000, bitrate: 394 kb/s
 Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x360, 296 kb/s, 30 fps, 30 tbr, 60 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
 Metadata:
 creation_time : 2013-06-21T09:10:07.000000Z
 handler_name : IsoMedia File Produced by Google, 5-11-2011
[NULL @ 0x58e6e80] Unable to find a suitable output format for '0'
0: Invalid argument



If I remove the filter argument, it does extract frames, but there are too many, it's important to be able to specify a threshold
gt(scene,0.1)
. It also doesn't capture any output that tells me the timestamps :

>> x = subprocess.run([FFMEPG_PATH, "-i", "input_vid.mp4", "-vsync", "0", "frames2/%05d.jpg"], capture_output=True)
>> print(x.stderr.decode())
ffmpeg version 4.2.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
 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
 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 'input_vid.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2013-06-21T09:09:58.000000Z
 Duration: 00:37:10.88, start: 0.000000, bitrate: 394 kb/s
 Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x360, 296 kb/s, 30 fps, 30 tbr, 60 tbn, 60 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
 Metadata:
 creation_time : 2013-06-21T09:10:07.000000Z
 handler_name : IsoMedia File Produced by Google, 5-11-2011
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x6af2200] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'frames2/%05d.jpg':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 encoder : Lavf58.29.100
 Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 480x360, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default)
 Metadata:
 handler_name : VideoHandler
 encoder : Lavc58.54.100 mjpeg
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=66922 fps=1571 q=24.8 Lsize=N/A time=00:37:10.73 bitrate=N/A speed=52.4x 
video:310586kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

>> print(x.stdout.decode())



It seems like there are two problems : something to do with the filter argument, and capturing the output that contains the timestamps. I've tried various ways of writing the nested string quotes in the filter argument : triple quotes, escaping, changing the order of double and single quotes, and concatenating separate strings like shown above.


-
Gracefully closing FFMPEG child processes from node
10 juin 2019, par GordonI am trying to record numerous audio feeds using ffmpeg. Node downloads a config file with the stream URLS (HLS M3U8 playlists), parses it and starts the appropriate number of ffmpeg instances. When I go to shut them down, nothing happens and I have to kill them with task manager, resulting in corrupt files. When I am debugging and hit control-c within a minute or two of starting the program, it works without issue. When I need to record more than 5-10 minutes that I have problems.
I found this related question from 2013, and adapted it to fit my multiple stream situation.
The recorder processes are started with the following code (inside the http request callback) :
config.audio_config.forEach((channel,i)=>{
self.liveChannels++;
console.log(` ${channel.number}`);
self.Channels[i] = spawn('ffmpeg', ['-i', `${channel.base_url + channel.stream_ios}`, '-c:v', 'none', '-c:a', 'copy', `Output\\${config.folder}\\${channel.number}.m4a`]);
self.Channels[i].stdin.setEncoding('utf8');
self.Channels[i].chNum = channel.number;
self.Channels[i].on('exit',(code,sig)=>{
console.log(` Channel ${channel.number} recorder closed.`);
self.liveChannels--;
if(self.liveChannels === 0){
process.exit();
}
});
});
console.log('Press Ctl-C to start Shutdown');My shutdown function (triggered by
SIGINT
to main process) is :function shutdown() {
self.Channels.forEach((chan)=>{
chan.stdin.write('q');
chan.stdin.end(); //I have tried both with and without this line and chan.stdin.end('q')
});
}UPDATE :
Switching to an AAC container file (simply changed the extension on the output) removed the need for a graceful FFMPEG exit. I still would like to know why sending ’q’ to stdin only kills the FFMPEG process for the first 10 minutes.