
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (71)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (9357)
-
Recording of Full HD 60 FPS videos in C#
17 mars 2021, par Alexander NaumovMy application works with a high-speed camera. I am trying to record a videofile using C#.


The task is pretty "simple" : to record the video from the camera. We need to record medium (higher-better) quality videos to save as many details as possible.


- 

- Resolution : 1920 x 1080 (FullHD)
- Frames per second (FPS) : 60
- Bitrate : I've started from 10000*1000 (but now I don't know)
- Mediacontainer : MP4, AVI (does not really matter, we just need to
solve our task)
- Codec : also does not matter, we just need speed and quality.
- Maximum size of videofile : 10 GB/hour














Framerate of the camera can be changed during the recording by the camera itself (not by user), so it's necessary to have something like timestamps for every frame or anything else.


The problem is not fast enough recording.
Example : using AForge libs, generated pictures ("white" noise), duration of test videos is 20 seconds.


Duration of video creating using different codecs (provided by AForge) :


- 

- Codec : MPEG4, Time : 33,703
- Codec : WMV1, Time : 45,338
- Codec : WMV2, Time : 45,530
- Codec : MSMPEG4v2, Time : 43,775
- Codec : MSMPEG4v3, Time : 44,390
- Codec : H263P, Time : 38,894
- Codec : FLV1, Time : 39,151
- Codec : MPEG2, Time : 35,561
- Codec : Raw, Time : 61,456




















Another libs we've tried is not satisfied us.
Accord.FFMPEG is slow because of strange inner exceptions.
EmguCV.FFMPEG has no timestamps, therefore it creates corrupted video.


Recording the video to the SSD drive did not give us any visible acceleration.


Google search gives no clear examples or modern solutions to solve this task. That's the main reason to write here.


There is a code sample of our test :


private static void AForge_test()
 {
 Console.WriteLine("AForge test started...");
 unsafe
 {
 Stopwatch watch = new Stopwatch();

 Console.WriteLine("FPS: {0}, W:{1}, H:{2}, T:{3}", fps, w, h, time);

 AForge.Video.FFMPEG.VideoCodec[] codecs = (AForge.Video.FFMPEG.VideoCodec[]) Enum.GetValues(typeof(AForge.Video.FFMPEG.VideoCodec));

 for(int k = 0; k < codecs.Length; k++)
 {
 /* if (codecs[k] != VideoCodec.MPEG4)
 continue;*/
 try
 {
 watch.Restart();

 Random r2 = new Random(200);
 AForge.Video.FFMPEG.VideoFileWriter vw = new AForge.Video.FFMPEG.VideoFileWriter();
 string name = String.Format("E:\\VideosHDD\\AForge_test_{0}_mid.avi", Enum.GetName(typeof(AForge.Video.FFMPEG.VideoCodec), codecs[k]));
 vw.Open(name, w, h, fps, codecs[k], 10000 * 1000);

 for (int i = 0; i < frames; i++)
 {
 vw.WriteVideoFrame(bmps[i%N]);
 }

 vw.Close();
 vw.Dispose();

 watch.Stop();

 Console.WriteLine("Codec: {0}, Time: {1:F3}", Enum.GetName(typeof(AForge.Video.FFMPEG.VideoCodec), codecs[k]), watch.ElapsedMilliseconds / 1000d);
 }
 catch(Exception ex)
 {
 Console.WriteLine("Error " + codecs[k].ToString());
 }

 }
 
 }

 Console.ReadKey();
 }



Additional :


- 

- We are ready to use not-for-free solutions, but free is preferable.
- One of the supposed reasons for low recording speed : (x86) building of applications. I tried so hard to find x64 Aforge building but failed in this. We really don't know is there any influence of application architecture on recording speed.






I am ensured that I don't know all the background of video recording and another "little" thing, so I would be very pleased to solutions with clear explanations.


-
what is the meaning of the v4l2-ctl —list-device ?
26 janvier 2021, par mcgregor94086The High level Problem :


I have a custom multi-camera array that I have attached to a Raspberry Pi via some USB hubs, and I need a way to quickly identify which camera needs attention when any camera fails to respond to an image capture request.


Can "v4l2-ctl —list_devices" help me ?


I am trying to determine if
"v4l2-ctl —list_devices" can help me more quickly identify which one is missing. My thought was to look at which cameras are reporting, and then notice which one is NOT reporting, and investigate the missing one.


My question is can I identify each reporting camera either for the v4l2-ctl output, or from "FFmpeg -list_formats"


Here is the output I get from v4l2-ctl :


$ v4l2-ctl --list-device 
bcm2835-codec-decode (platform:bcm2835-codec):
 /dev/video10
 /dev/video11
 /dev/video12

bcm2835-isp (platform:bcm2835-isp):
 /dev/video13
 /dev/video14
 /dev/video15
 /dev/video16

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.1.1):
 /dev/video4
 /dev/video5

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.1.2):
 /dev/video6
 /dev/video7

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.1.3):
 /dev/video8
 /dev/video9

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.1.4):
 /dev/video17
 /dev/video18

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.2):
 /dev/video0
 /dev/video1

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.3):
 /dev/video2
 /dev/video3

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.1.1):
 /dev/video21
 /dev/video22

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.1.2):
 /dev/video25
 /dev/video26

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.1.4):
 /dev/video29
 /dev/video30

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.2):
 /dev/video19
 /dev/video20

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.3):
 /dev/video23
 /dev/video24

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.4):
 /dev/video27
 /dev/video28

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.1.2):
 /dev/video35
 /dev/video36

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.1.3):
 /dev/video39
 /dev/video40

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.1.4):
 /dev/video41
 /dev/video42

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.2):
 /dev/video31
 /dev/video32

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.3):
 /dev/video33
 /dev/video34

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.4):
 /dev/video37
 /dev/video38

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.4.2):
 /dev/video43
 /dev/video44



All the USB cameras in my array each report the same first field (in this case "FHD Camera") so I can't use the name as a unique identifier.


Each "FHD Camera" is assigned two different /dev/videoNN ids (one will be assigned for the mpeg format, and the other for the UYV format). However these /dev/videoNN assignments change each time the computer reboots.


The sequence that cameras are listed in the output also changes each time the v4l2-ctl command runs. So that also is of no help


v4l2-ctl also reports another field, beginning "usb-0000 :" followed by a series numbers (e.g. "01:00.0-1.2.2.4").


I am wondering if this number string ties in any way to the physical USB bus, and would remain permanent across reboots.


The v4l2-ctl help documentation merely says that the —list-devices flag will list the video devices, but these additional fields and their meaning is not explained.


Alternatively, for each camera that is responding, I can query the device with
"ffmpeg -hide_banner -f v4l2 -list_formats all -i /dev/videoNN", yielding a response like this :


$ ffmpeg -hide_banner -f v4l2 -list_formats all -i /dev/video8
[video4linux2,v4l2 @ 0x1a391c0] Compressed: mjpeg : Motion-JPEG : 640x480 1280x720 640x360 320x240 1920x1080
[video4linux2,v4l2 @ 0x1a391c0] Raw : yuyv422 : YUYV 4:2:2 : 640x480 1280x720 640x360 320x240 1920x1080
/dev/video8: Immediate exit requested



This ffmpeg query shows me that the device is also registered as "0x1a391c0". I am not yet sure whether these identifiers are stable across reboots, and if they are, whether they are stable with the physical camera, or if they are just a stable identifier to the USB Hub location of the camera.


My request :


Can someone explain to me how the "device name", /dev/videoNN identifier, usb-0000:01:00.0-1.2.2.4 identifier, and 0x1a391c0 are assigned ?


The responding order of the items listed in v4l2-ctl changes each time it runs.


Is this reflecting that all cameras are polled simultaneously, but acquisition of the bus for response transmission is random ?


Addendum


Further investigation shows me that the "0x-------" identifiers do not seem to be stable across reboots either.


The "usb-0000:01:00.0-1.2.2.2" identifier DOES seem to have a somewhat stable meaning. I have (5) 7-port usb hubs attached to my RPi 400. 4 of these are branch hubs that feed into a master hub, and the master hub feeds into the RPi.


After the 0-1. in the identifier there is either 3 or 4 digits. If there are only 3, the last digit is a port identifier 2, 3, or 4.


If there are 4 digits, then the 2nd to last digit will be a 1, and 1.1, 1.2, 1.3, and 1.4 will represent the last 4 physical ports on that hub.


Ironically, while the same port identifiers are always used in the same order on each of my (identical brand/model) hubs, they are NOT in ascending or descending sequence in terms of their physical sequence on the hubs.


I have deduced from this that each of my hubs actually uses two USB 4 port chips. So the first chip is getting the single digits, while the 1st port on that 1st chip is feeding the 2nd chip.


The 2nd digit in my identifiers is identifying which branch hub the device is on, 1,2,3 or 4. The first digit is 1, which seems to be identifying that all the branches are children of the master hub.


These addresses seem to be stable across reboots as long as all of the USB hubs are already connected at boot up. If not all are connected, those that are connected first will get the lowest hub number identifiers.


I don't know if this tree address identifier behavior would be the same on other hubs, but perhaps these observations will be of some use to anyone else trying to find stable identifiers in their own multi hub and multi-device architecture.


-
How to assign variable to different extension of files in same directory in bash
3 mai 2021, par Yacer AzeemI have a task to :


- 

- Watch a folder for video files (mp4,mov,mkv etc.)
- Transform the video files to HLS (480p, 720p, 1080p) using ffmpeg
- Move these files to a different folder
- Delete the original files from the watch folder
- Send an email stating that the following video file was transcoded












I want to deal with every .mp4 .mov and .mkv as a variable in bash so that I can perform the above-mentioned tasks.
The folder containing these files are in


/mnt/volume1/videos



directory architecture


/mnt/volum1/videos/sample.mp4
/mnt/volum1/videos/sample.mov
/mnt/volum1/videos/sample.mkv