
Recherche avancée
Autres articles (39)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
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.
Sur d’autres sites (4873)
-
Pipe video frames from ffmpeg to canvas without loading the entire video into memory
1er janvier 2024, par AviatoI am working on a project that involves frame manipulation and I decided to choose node canvas API for that. I used to work with OpenCV Python and there was a
cv2.VideoCapture
class that takes a video as input and prepares to read the frames of the video and we can loop through the frames one at a time without having to load all the frames at once in memory.
Now I tried a lot of ways to replicate the same using ffmpeg, i.e. trying to load frames from a video in an ordered, but "on-demand," fashion.

I tried using ffmpeg as a child process to process frames and standout the frames.


const spawnProcess = require('child_process').spawn,
 ffmpeg = spawnProcess('ffmpeg', [
 '-i', 'test.mp4',
 '-vcodec', 'png',
 '-f', 'rawvideo',
 '-s', '1920*1080', // size of one frame
 'pipe:1'
 ]);
ffmpeg.stdout.on('data', (data) => {
 try {
 // console.log(tf.node.decodeImage(data).shape)
 console.log(`${++i} frames read`)
 //context.drawImage(data, 0, 0, width, height)
 
 
 } catch(e) {
 console.log(e)
 } 
})



The value in the console shows something around 4000 + console logs, but the video only had 150 frames, after much investigating and console logging the data, I found that was buffer data, and it's not processing it for each frame. The on-data function returns the buffer data in an unstructured way
I want to read frames from a video and process each one at a time in memory, I don't want to hold all the frames at once in memory or in the filesystem.




I also want to pipe the frames in a format that could be rendered on top of a canvas using drawImage


-
Overlay video with other video in ffmpeg
15 août 2018, par user2212461I have a short and a long mp4 video. In the long video, I would like to replace the visual with a part of the visual of the short video. Additionally, I would like to keep the audio of the long video throughout.
The following set of commands work. However the concat and audio replacing seems to add a slight delay to the video, which makes the audio slightly out of sync from the video.
ffmpeg -ss 0 -i short.mp4 -t 2.0 -vcodec copy -an v1_short.mp4
ffmpeg -ss 0 -i long.mp4 -t 6.0 -vcodec copy -an v1_before.mp4
ffmpeg -ss 8.0 -i v_before.mp4 -vcodec copy -an v1_after.mp4.mp4
ffmpeg -i v1_before.mp4 -i v1_short.mp4 -i v1_after.mp4 -filter_complex "[0:v] [1:v] [2:v] concat=n=3:v=1 [v]" -map "[v]" out_temp.mp4
ffmpeg -i long.mp4 -i out_temp.mp4 -c copy -map 0:v -map 1:a out_final.mp4How can I do this without the audio getting out of sync ?
I am using ffmpeg version 4.0.2.
-
Remove video noise from video with ffmpeg without producing blur / scale down effect
17 avril 2024, par Sucahyo AjiMy videos are 1920x1080 recorded with high ISO (3200) using smartphone (to get bright view, backlight scene mode). It produce a lot of noise. I try many video filter but all of them produce blur similar to when we reduce the resolution in half then increase it back again.


Is there a good video noise filter that only remove noise without producing blur ?


Because if it produce blur, I would prefer to not do any filtering at all.


I have tried video filter :


- 

-
nlmeans=s=30:r=3:p=1


-
vaguedenoiser=threshold=22:percent=100:nsteps=4


-
owdenoise=8:6:6


-
hqdn3d=100:0:50:0


-
bm3d=sigma=30:block=4:bstep=8:group=1:range=8:mstep=64:thmse=0:hdthr=5:estim=basic:planes=1


-
dctdnoiz=sigma=30:n=4


-
fftdnoiz=30:1:6:0.8


















All produce blur, some even worse. I have to use strong setting to make the noise moderately removed. I end up halving the resolution and use remove grain then scale it up again. This is much better for me than all the above method (pp filter is used to reduce size without reducing image detail) :


- 

- scale=960:540,removegrain=3:0:0:0,pp=dr/fq|8,scale=1920:1080




code example


FOR %%G IN (*.jpg) DO "ffmpeg.exe" -y -i "%%G" -vf "nlmeans=s=30:r=3:p=1" -qmin 1 -qmax 1 -q:v 1 "%%G.jpg"


Part of the image

The image:


-