
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (74)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (10987)
-
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>