
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (39)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5286)
-
OpenCV reading from live camera creates a short video that moves quickly
17 novembre 2022, par user19019404I am reading in a live vide stream from a CCTV camera. The camera is set to 5 fps, another is set to 25fps and another to 30fps. Irrespective of the FPS that the camera is set, I can record 5 minutes but end up with a 30 second recorded clip where everyone is running around the scene.


My code is the 'typical' read in video and write video code that you would find online such as (code below simplified for readability) :


import cv2

video = cv2.VideoCapture(live RTSP address of camera)

if (video.isOpened() == False):
 print("Error reading video file")
else:
 frame_width = video.get(cv2.CAP_PROP_FRAME_WIDTH)
 frame_height = video.get(cv2.CAP_PROP_FRAME_HEIGHT)
 frame_fps = video.get(cv2.CAP_PROP_FPS)
 size = (frame_width, frame_height)
 result = cv2.VideoWriter('filename.avi',cv2.VideoWriter_fourcc(*'MJPG'),frame_fps , size)

 while(True):
 ret, frame = video.read()
 if ret == True:
 result.write(frame)
 cv2.imshow('Frame', frame)
 if cv2.waitKey(1) & 0xFF == ord('s'):
 break
 else:
 break
 video.release()
 result.release()
 cv2.destroyAllWindows()
print("The video was successfully saved with new fps")



I have tried playing with the FPS by reading in the FPS from the live camera and using the same FPS in the video write, but all that results is a video that is a fraction of the real time and with people zooming around the scene. So watching a 5 minute smooth video results in a 20 second recorded video with everyone zooming around.


Is this something that I need to fix in the writing of the video or do I need a second pass with ffmpeg to readjust the video ?


Much appreciated


Update, corrected the code above and :
When printing the frames read and the frame written the numbers are the same, showing that each frame that is read is being written (so I am not losing frames along the way thereby writing half the amount of frames).


-
avutil/opt : Print out numeric values of option constants
17 septembre 2019, par Soft Worksavutil/opt : Print out numeric values of option constants
It's often not obvious how option constants relate to numerical values.
Defaults are sometimes printed as numbers and from/to are always printed as numbers.
Printing the numeric values of options constants avoids this confusion.
It also allows to see which constants are equivalent.Before this patch :
-segment_list_type <int> E........ set the segment list type (from -1 to 4) (default -1)
flat E........ flat format
csv E........ csv format
ext E........ extended format
ffconcat E........ ffconcat format
m3u8 E........ M3U8 format
hls E........ Apple HTTP Live Streaming compatibleAfterwards :
-segment_list_type <int> E........ set the segment list type (from -1 to 4) (default -1)
flat 0 E........ flat format
csv 1 E........ csv format
ext 3 E........ extended format
ffconcat 4 E........ ffconcat format
m3u8 2 E........ M3U8 format
hls 2 E........ Apple HTTP Live Streaming compatibleSigned-off-by : softworkz <softworkz@hotmail.com>
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
pyglet's video example application not working
3 octobre 2020, par C. E.I'm trying to get the pyglet video player example to work, but I'm getting the following error :




pyglet.media.codecs.ffmpeg.FFmpegException : avformat_open_input in
ffmpeg_open_filename returned an error opening file
/home/ce/Downloads/sample-mp4-file.mp4 Error code : -1094995529




I decoded this number, and it turns out that it corresponds to the "INDA" error code in FFMPEG's error.h, which means




Invalid data found when processing input




The example video that I used can be downloaded here. I tried the mp4 one, the avi one and the webm one. I also tried other files that I have locally. They all work in other video players, and in fact some were created using FFMPEG.


Finally, I used
pyglet.media.have_ffmpeg()
to make sure that pyglet agrees with me that I haveffmpeg
installed.

Originally, I had ffmpeg 3.4 installed globally, i.e.
which ffmpeg
pointed to a 3.4 binary. I then replaced that binary with a ffmpeg 4.1 binary. However, when I runpyglet.info.dump_ffmpeg()
it still say3.4.8
so I may not have suceeded in trying 4.1. I tried settingos.environ["LD_LIBRARY_PATH"]
but it is still printing3.4.8
.

Operating system : Ubuntu 18.04. I have gotten it to work on Ubuntu 20.04. It uses a newer FFMPEG which I suspect is important.


What can I do ?