
Recherche avancée
Autres articles (62)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
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 (9435)
-
Converting multiple audio files in different subdirectories using ffmpeg
4 avril 2022, par Amartya Roy ChoudhuryI am trying to convert multiple .mp3 files stored in different folders to .wav file using ffmpeg. The .wav files will be stored in the folder where the .mp3 file is located


import os
folder = r'D:\S2ST_DataCollection-main\public\recordings' ##### root folder


count = 0
for dirname, dirs, files in os.walk(folder):
 for filename in files:
 filename_without_extension, extension = os.path.splitext(filename)
 if extension == '.mp3': ######## get all the mp3 files
 count +=1
 os.system(r"C:\Users\amart\Downloads\Compressed\S2ST_DataCollection-main\public\music.bat") ###### use the mp3 to wav conversion stored as batch file



My music.bat file


for %%a in ("*.mp3") do ffmpeg -i "%%a" -vn -c:a pcm_s16le -ar 44100 "%%~na.wav"



Note : I have used pydub but it is not working


If i use the batch command only in a folder it is working fine but my .mp3 files are located in multiple folder


Any kind of help would be greatly appreciated


-
Recording RTSP steam with Python
6 mai 2022, par ロジャーCurrently I am using MediaPipe with Python to monitor RTSP steam from my camera, working as a security camera. Whenever the MediaPipe holistic model detects humans, the script writes the frame to a file.


i.e.


# cv2.VideoCapture(RTSP)
# read frame
# while mediapipe detect
# cv2.VideoWriter write frame
# store file



Recently I want to add audio recording support. I have done some research that it is not possible to record audio with OpenCV. It has to be done with FFMPEG or PyAudio.


I am facing these difficulities.


- 

-
When a person walk through in front of the camera, it takes maybe less than 2 seconds. For the RTSP stream being read by OpenCV, human is detected with MediaPipe, and start FFMPEG for recording, that human should have walked far far away already. So FFMPEG method seems not working for me.


-
For PyAudio method I am currently studying, I need to create 2 threads establishing individual RTSP connections. One thread is for video to be read by OpenCV and MediaPipe. The other thread is for audio to be recorded when the OpenCV thread notice human is detected. I have tried using several devices to read the RTSP streams. The devices are showing timestamps (watermark on the video) with several seconds in difference. So I doubt if I can get video from OpenCV and audio from PyAudio in sync when merging them into one single video.








Is there any suggestion how to solve this problem ?


Thanks.


-
-
Can't scrub frame by frame through .mp4 files in VLC created using FFmpeg command line, but changing container to .avi can scrub frame by frame in VLC
16 juin 2022, par ICBanMII wrote a really simple demonstration of the issue. I create a 4k video that is 150 frames, and output it to mp4. When I open that in VLC(Vent 3.0.17.4), I can scrub forward a few frames at the beginning(e key) before it stops entirely. If I move it towards the end of the file( 4 secs), it can't scrub forward at all.


What I found out through testing. I can scrub forward/backward 3 seconds normal in vlc. I can scrub forward frame by frame using quicktime's latest version(2016). If I mux it to .avi file format, scrubbing using the e key works as expected in VLC. Copying the meta data from an mp4 that can scrub forward frame by frame doesn't change anything. Renaming the .mp4 file to .avi doesn't fix the issue... only muxing out to an avi does. Using a build of version 5.0.1 of ffmpeg.


I included both VLC commands in code. I'd be more than happy to walk way from this with just muxing everything to avi... but .mp4 is a requirement along with being able to scrub forward frame by frame in VLC. Not sure if code or command line is where the issue is... as sample mp4s from the net used in VLC don't appear to have this issue.


#include <iostream>
#include 

int main()
{
 FILE *m_pFFmpeg;

 // Working - Can scrub forward frame by frame in latest version of vlc
 //const char *cmdOutput = "ffmpeg -hide_banner -y -r 30 -s 3840x2160 -f rawvideo -pix_fmt rgb24 -i - -framerate 30 -an -vcodec libx264 -pix_fmt yuv420p -video_track_timescale 30 -vf vflip -preset veryslow -qp 0 output.avi";
 
 // Not working - Can't scrub forward frame by frame in latest version of vlc. Only difference is the .mp4 at the end
 const char *cmdOutput = "ffmpeg -hide_banner -y -r 30 -s 3840x2160 -f rawvideo -pix_fmt rgb24 -i - -framerate 30 -an -vcodec libx264 -pix_fmt yuv420p -video_track_timescale 30 -vf vflip -preset veryslow -qp 0 output.mp4";
 
 int g_x_dis_res = 3840;
 int g_y_dis_res = 2160;

 m_pFFmpeg = _popen(cmdOutput, "wb");

 uint8_t *export_buffer = new uint8_t[g_x_dis_res * g_y_dis_res * 3];

 for (int i = 0; i < (g_x_dis_res * g_y_dis_res * 3); i++) {
 export_buffer[i] = 127;
 }

 for (int j = 0; j < 150; j++) {
 fwrite(export_buffer, 3 * g_x_dis_res * g_y_dis_res, 1, m_pFFmpeg);

 printf("Export Frame %d\n", j + 1);
 }

 delete[] export_buffer;

 fflush(m_pFFmpeg);
 _pclose(m_pFFmpeg);

 return 0;
}
</iostream>