
Recherche avancée
Autres articles (82)
-
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 (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)
Sur d’autres sites (4841)
-
Using ffmpeg Silencedetect in C#
11 septembre 2018, par jayjayI want to build a programm which splitts a long audio file into small peaces.
I like to use ffmpeg silencedetect. From the console it works fine and returns the detected silence etc.
Now i want to count many resulting tracks there are an gave the user the possibiliy to change the time parameter of the silencedetect function.
I want to call the silencedetect function from C# code.
But i don´t know how to work with the output in C#.Thank you for your help.
Greetings Jan
-
avcodec/omx : Fix handling of fragmented buffers
17 janvier 2019, par Dave Stevensonavcodec/omx : Fix handling of fragmented buffers
See https://trac.ffmpeg.org/ticket/7687
If an encoded frame is returned split over two or more
IL buffers due to the size, then there is a race between
whether get_buffer will fail, return NULL, and a truncated
frame is passed on, or IL will return the remaining part
of the encoded frame.
If get_buffer returns NULL, part of the frame is left behind
in the codec, and will be collected on the next call. That
then leaves a frame stuck in the codec. Repeat enough times
and the codec FIFO is full, and the pipeline stalls.A performance improvement in the Raspberry Pi firmware means
that the timing has changed, and now frequently drops into the
case where get_buffer returns NULL.Add code such that should a buffer be received without
OMX_BUFFERFLAG_ENDOFFRAME that get_buffer is called with wait
set, so we wait for the remainder of the frame.
This code has been made conditional on the Pi build in case
other IL implementations don't handle ENDOFFRAME correctly.Signed-off-by : Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by : Aman Gupta <aman@tmm1.net>
Signed-off-by : Martin Storsjö <martin@martin.st> -
Create Panorama from Non-Sequential Video Frames
6 mai 2021, par M.InnatThere is a similar question (not that detailed and no exact solution).



I want to create a single panorama image from video frames. And for that, I need to get minimum non-sequential video frames at first. A demo video file is uploaded here.


What I Need


A mechanism that can produce not-only non-sequential video frames but also in such a way that can be used to create a panorama image. A sample is given below. As we can see to create a panorama image, all the input samples must contain minimum overlap regions to each other otherwise it can not be done.




So, if I have the following video frame's order


A, A, A, B, B, B, B, C, C, A, A, C, C, C, B, B, B ...



To create a panorama image, I need to get something as follows - reduced sequential frames (or adjacent frames) but with minimum overlapping.


[overlap] [overlap] [overlap] [overlap] [overlap]
 A, A,B, B,C, C,A, A,C, C,B, ...



What I've Tried and Stuck


A demo video clip is given above. To get non-sequential video frames, I primarily rely on
ffmpeg
software.

Trial 1 Ref.


ffmpeg -i check.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB -map 0:v out.mp4



After that, on the
out.mp4
, I applied slice the video frames usingopencv


import cv2, os 
from pathlib import Path

vframe_dir = Path("vid_frames/")
vframe_dir.mkdir(parents=True, exist_ok=True)

vidcap = cv2.VideoCapture('out.mp4')
success,image = vidcap.read()
count = 0

while success:
 cv2.imwrite(f"{vframe_dir}/frame%d.jpg" % count, image) 
 success,image = vidcap.read()
 count += 1



Next, I rotated these saved images horizontally (as my video is a vertical view).


vframe_dir = Path("out/")
vframe_dir.mkdir(parents=True, exist_ok=True)

vframe_dir_rot = Path("vframe_dir_rot/")
vframe_dir_rot.mkdir(parents=True, exist_ok=True)

for i, each_img in tqdm(enumerate(os.listdir(vframe_dir))):
 image = cv2.imread(f"{vframe_dir}/{each_img}")[:, :, ::-1] # Read (with BGRtoRGB)
 
 image = cv2.rotate(image,cv2.cv2.ROTATE_180)
 image = cv2.rotate(image,cv2.ROTATE_90_CLOCKWISE)

 cv2.imwrite(f"{vframe_dir_rot}/{each_img}", image[:, :, ::-1]) # Save (with RGBtoBGR)



The output is ok for this method (with
ffmpeg
) but inappropriate for creating the panorama image. Because it didn't give some overlapping frames sequentially in the results. Thus panorama can't be generated.



Trail 2 - Ref


ffmpeg -i check.mp4 -vf decimate=cycle=2,setpts=N/FRAME_RATE/TB -map 0:v out.mp4



didn't work at all.


Trail 3


ffmpeg -i check.mp4 -ss 0 -qscale 0 -f image2 -r 1 out/images%5d.png



No luck either. However, I've found this last
ffmpeg
command was close by far but wasn't enough. Comparatively to others, this gave me a small amount of non-duplicate frames (good) but the bad thing is stilldo not need
frames, and I kinda manually pick some desired frames, and then theopecv
stitching algorithm works. So, after picking some frames and rotating (as mentioned before) :

stitcher = cv2.Stitcher.create()
status, pano = stitcher.stitch(images) # images: manually picked video frames -_- 





Update


After some trials, I am kinda adopting the non-programming solution. But would love to see an efficient programmatic approach.


On the given demo video, I used
Adobe
products (premiere pro
andphotoshop
) to do this task, video instruction. But the issue was, I kind of took all video frames at first (without dropping to any frames and that will computationally cost further) viapremier
and usephotoshop
to stitching them (according to the youtube video instruction). It was too heavy for these editor tools and didn't look better way but the output was better than anything until now. Though I took few (400+ frames) video frames only out of 1200+.




Here are some big challenges. The original video clips have some conditions though, and it's too serious. Unlike the given demo video clips :


- 

- It's not straight forward, i.e. camera shaking
- Lighting condition, i.e. causes different visual look at the same spot
- Cameral flickering or banding








This scenario is not included in the given demo video. And this brings additional and heavy challenges to create panorama images from such videos. Even with the non-programming way (using
adobe
tools) I couldn't make it any good.


However, for now, all I'm interest to get a panorama image from the given demo video which is without the above condition. But I would love to know any comment or suggestion on that.