
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (23)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
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
Sur d’autres sites (5257)
-
RTP Timestamps Are Not Monotonically increasing
25 août 2019, par Fr0styI am finding it a bit difficult trying to understand whether or not the hack around with FFmpeg and OpenCV really provided a RTP timestamp. My last post helped a little bit but got me stuck in trying to validate the timestamps obtained through this work around by modifying ffmpeg and opencv.
FFmpeg version : 4.1.0
OpenCV version : 3.4.1import cv2
import time
from datetime import datetime, date
uri = 'rtsp://admin:password@192.168.1.66:554/Streaming/Channels/101'
cap = cv2.VideoCapture(uri)
'''One is the offset between the two epochs. Unix uses an epoch located at 1/1/1970-00:00h (UTC) and NTP uses 1/1/1900-00:00h.
This leads to an offset equivalent to 70 years in seconds (there are 17 leap years between the two dates so the offset is'''
time_offset = 2208988800 # (70*365 + 17)*86400 = 2208988800 (in seconds)
# offset = 3775484294
days = 43697
pdat = "1900-01-01 00:00:00:00"
mdat = "2019-08-23 22:02:44:00" # str(datetime.now()) + str(datetime.now().time())
pdate = datetime.strptime(pdat, "%Y-%m-%d %H:%M:%S:%f").date()
mdate = datetime.strptime(mdat, "%Y-%m-%d %H:%M:%S:%f").date()
delta = (mdate - pdate).days
offset = delta * 86400
def time_delta(s):
return (s - time_offset)
while True:
frame_exists, curr_frame = cap.read()
if frame_exists:
seconds = cap.getRTPTimeStampSeconds()
fraction = cap.getRTPTimeStampFraction()
timestamp = cap.getRTPTimeStampTs()
unix_offset = seconds - time_offset
msec = int((int(fraction) / 0xFFFFFFFF) * 1000.0)
ts = float(str(unix_offset) + "." + str(msec))
# print("Timestamp per Frame:%i" % timestamp)
print((datetime.fromtimestamp(float(ts) + offset)))
cap.release()My Output :
On August 23, 2019 at 22:02
...
2019-08-23 13:59:52.781000
2019-08-23 13:59:52.726000
2019-08-23 13:59:52.671000
2019-08-23 13:59:52.616000
2019-08-23 13:59:52.561000
2019-08-23 13:59:52.506000
2019-08-23 13:59:52.451000
2019-08-23 13:59:52.396000
2019-08-23 13:59:52.342000
2019-08-23 13:59:52.287000
2019-08-23 13:59:52.232000
2019-08-23 13:59:52.177000
2019-08-23 13:59:52.122000
2019-08-23 13:59:52.067000
2019-08-23 13:59:52.012000
2019-08-23 13:59:53.570000
2019-08-23 13:59:53.020000
2019-08-23 13:59:53.847000
2019-08-23 13:59:53.792000I’ve noticed how the time increments weirdly (that’s not suppose to happen in the real, current time), such as the last two lines and a few others in between in the output. A bit flabbergasted as to what went wrong. Also trying this out on multiple IP cameras, with each showing a different timestamp probably related to when they were turned on.
-
Having trouble obtaining the time from RTP Timestamps obtained through OpenCV
24 août 2019, par Fr0styI am finding it a bit difficult trying to understand whether or not the hack around with FFmpeg and OpenCV really provided a RTP timestamp. My last post helped a little bit but got me stuck in trying to validate the timestamps obtained through this work around by modifying ffmpeg and opencv.
FFmpeg version : 4.1.0
OpenCV version : 3.4.1import cv2
import time
from datetime import datetime, date
uri = 'rtsp://admin:password@192.168.1.66:554/Streaming/Channels/101'
cap = cv2.VideoCapture(uri)
'''One is the offset between the two epochs. Unix uses an epoch located at 1/1/1970-00:00h (UTC) and NTP uses 1/1/1900-00:00h.
This leads to an offset equivalent to 70 years in seconds (there are 17 leap years between the two dates so the offset is'''
time_offset = 2208988800 # (70*365 + 17)*86400 = 2208988800 (in seconds)
# offset = 3775484294
days = 43697
pdat = "1900-01-01 00:00:00:00"
mdat = "2019-08-23 22:02:44:00" # str(datetime.now()) + str(datetime.now().time())
pdate = datetime.strptime(pdat, "%Y-%m-%d %H:%M:%S:%f").date()
mdate = datetime.strptime(mdat, "%Y-%m-%d %H:%M:%S:%f").date()
delta = (mdate - pdate).days
offset = delta * 86400
def time_delta(s):
return (s - time_offset)
while True:
frame_exists, curr_frame = cap.read()
if frame_exists:
seconds = cap.getRTPTimeStampSeconds()
fraction = cap.getRTPTimeStampFraction()
timestamp = cap.getRTPTimeStampTs()
unix_offset = seconds - time_offset
msec = int((int(fraction) / 0xFFFFFFFF) * 1000.0)
ts = float(str(unix_offset) + "." + str(msec))
# print("Timestamp per Frame:%i" % timestamp)
print((datetime.fromtimestamp(float(ts) + offset)))
cap.release()My Output :
On August 23, 2019 at 22:02
...
2019-08-23 13:59:52.781000
2019-08-23 13:59:52.726000
2019-08-23 13:59:52.671000
2019-08-23 13:59:52.616000
2019-08-23 13:59:52.561000
2019-08-23 13:59:52.506000
2019-08-23 13:59:52.451000
2019-08-23 13:59:52.396000
2019-08-23 13:59:52.342000
2019-08-23 13:59:52.287000
2019-08-23 13:59:52.232000
2019-08-23 13:59:52.177000
2019-08-23 13:59:52.122000
2019-08-23 13:59:52.067000
2019-08-23 13:59:52.012000
2019-08-23 13:59:53.570000
2019-08-23 13:59:53.020000
2019-08-23 13:59:53.847000
2019-08-23 13:59:53.792000I’ve noticed how the time increments weirdly (that’s not suppose to happen in the real, current time), such as the last two lines and a few others in between in the output. A bit flabbergasted as to what went wrong. Also trying this out on multiple IP cameras, with each showing a different timestamp probably related to when they were turned on.
-
C# Bitmap to AVI / WMV with Compression
5 juillet 2019, par Digitalsa1ntPrelude :
I’m going to preface this with, I have been learning C# in my spare time at work, and that I have been staring at code for a solid two days trying to wrap my head around this problem. I am developing some software to be used with a visualiser that connects by USB to a standard Desktop PC, the software detects the capture device and loads frames into bitmap using a New Frame Event, this is then displayed in a ’picture box’ as a live video stream. The problem as it sits is trying to encorporate the ability to record the stream and save to file, preferably a WMV or a compressed AVI.
What’s been tried :
I have considered and looked into the following :
SharpAVI - cant seem to get this to compress or save the frames properly as it appears to mainly look at existing AVI files.
AForge.Video.VFW - AVI files can be created but are far too large to be used, due to restrictions on the user areas of the individuals who will be using this software.
AForge.Video.FFMPEG - Again due to considerations of those using this software I can’t have unmanaged DLL’s sat in the output folder with the Executable file, and unfortunately this particular DLL cant be compiled properly using Costura Fody.
AVIFile Library Wrapper (From Code Project) - Again can’t seem to get this to compress a stream correctly from Bitmaps from the New Frame Events.
DirectShow - Appears to use C++ and unfortunately is beyond my skill level at this time.
The Relevant Code Snippets :
Current References :
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Resources;
using System.Drawing.Imaging;
using System.IO;
//Aforge Video DLL's
using AForge.Video;
using AForge.Video.VFW;
using AForge.Video.DirectShow;
//Aforge Image DLL's
using AForge.Imaging;
using AForge.Imaging.Formats;
using AForge.Imaging.Filters;
//AviLibrary
using AviFile;Global Variables :
#region Global Variables
private FilterInfoCollection CaptureDevice; // list of available devices
private VideoCaptureDevice videoSource;
public System.Drawing.Image CapturedImage;
bool toggleMic = false;
bool toggleRec = false;
//aforge
AVIWriter aviWriter;
Bitmap image;
#endregionCode for Displaying Stream
#region Displays the Stream
void videoSource_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
picBoxStream.SizeMode = PictureBoxSizeMode.Zoom;
picBoxStream.Image = (Bitmap)eventArgs.Frame.Clone();// clones the bitmap
if (toggleRec == true)
{
image = (Bitmap)eventArgs.Frame.Clone();
aviWriter.AddFrame(image);
}
}
#endregionCurrent Code for Recording Stream
#region Record Button
private void btnRecord_Click(object sender, EventArgs e)
{
if (toggleRec == false)
{
saveAVI = new SaveFileDialog();
saveAVI.Filter = "AVI Files (*.avi)|*.avi";
if (saveAVI.ShowDialog() == DialogResult.OK)
{
aviWriter = new AVIWriter();
aviWriter.Open(saveAVI.FileName, 1280, 720);
toggleRec = true;
Label lblRec = new Label();
}
}
else if (toggleRec == true)
{
aviWriter.Close();
toggleRec = false;
}
}
#endregionI apoligise if the above code doesn’t look quite right, I have been swapping, changing and recoding those three sections a lot in order to find a working combination. This means that it’s rather untidy but I didn’t see the point in cleaning it all up until I had the code working. That being said really any help that you can provide is greatfully recieved, even if it’s a case of what I want to do just cannot be done.
Thank you in advance.
EDIT : 2019 :
It’s been awhile since I posted this and it still gets the odd bit of interest here and there. Back when I posted this I was teaching myself to code and I had this weird quirk that I didn’t like using 3rd party libraries if I could avoid it, I wanted to do my own work, since then I’ve learnt a lot and one of those things is that the open source world is immense, impressive and kind. So if there is a 3rd party library that does what you want just use it, it’ll save you time.