
Recherche avancée
Autres articles (92)
-
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer -
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (7277)
-
Trouble with CoCCA Registry
7 octobre 2012, par Multimedia Mike — GeneralI’ve been rather despondent all week. People who see me daily could readily identify this fact. Unfortunately, the exact reason was difficult to adequately explain. The problems that nerds deal with…
When A Domain Expires
As a few people noticed, the multimedia.cx domain and all of it’s subdomains didn’t work this last week. The problem started on Monday, October 1. Whose fault ? Well, fundamentally, I neglected to renew the domain name in time. However, I prefer to place the blame on the .cx domain registrar, CoCCA Registry. You see, they have never developed the technology to email a domain holder with a notice that their domain is about to expire or has already expired.This domain is the only one I have ever held so I don’t have a lot of experience in this matter. I wondered if I was crazy for thinking it would be normal for a registrar to send an email or 2 with status updates about your domain. I get the impression from speaking with others that this is indeed normal. I have 3 different email addresses listed under my account at the registrar– 2 at multimedia.cx and a backup gmail account. I checked spam folders after this incident. Then I remembered that I have never received any email notifications from them (although password reset emails show up, so that part thankfully works). Also, their support emails are black holes.
So, I guess the moral is : be wary of dealing with CoCCA Registry. However, they seem to be the only way to register domains under a wide variety of uncommon country codes.
By Friday, the domain appeared to have been reinstated, even through the status was officially listed as “renewal-pending” according to the web-based management console. Eventually, as cached DNS results started to time out throughout the day, I started seeing subdomains come back. I excitedly used the ‘dig’ command to count down the seconds until gamemusic.multimedia.cx was accessible on the network I was on (the number after the domain name is the time-to-live or ‘TTL’ value) :
$ dig +nocmd gamemusic.multimedia.cx +noall +answer gamemusic.multimedia.cx. 3 IN A 174.143.152.251 $ dig +nocmd gamemusic.multimedia.cx +noall +answer gamemusic.multimedia.cx. 2 IN A 174.143.152.251 $ dig +nocmd gamemusic.multimedia.cx +noall +answer gamemusic.multimedia.cx. 1 IN A 174.143.152.251 $ dig +nocmd gamemusic.multimedia.cx +noall +answer gamemusic.multimedia.cx. 12962 IN A 207.45.186.114
Finally, today (Saturday), I received a receipt confirming that the domain has been renewed.
8 Years Old
Incidentally, happy eighth birthday to multimedia.cx. It was September, 2004 when I decided to branch out from a simple ISP-based web presence.People often ask why I went with the .cx TLD. When I decided I wanted a proper domain name 8 years ago, I found that multimedia.X was already taken for just about every TLD value of X. .cx was a notable exception and was distinctive enough (speaking of .X, though, I see that multimedia.xxx is still up for grabs as of this writing ; I imagine that would come with a whole other set of problems).
It’s funny that tech nerds often rail against outsourcing too much — email, storage, computing power, web hosting — all to some type of cloud provider under the premise that it could easily be taken away. But this episode teaches me that even having your own domain name is no guarantee of a solid online presence.
Meanwhile, I have taken proactive steps to avert this same situation from arising again :
Barring a lack of automated emails from the registrar, I hope a Google Calendar reminder set up a month ahead of expiration will do the trick.
-
Desperately looking for a RTSP server that can stream from a live source (not from a file)
7 janvier 2020, par Joseph MatanI need a RTSP-server that can listen on a configured port (8554 for example), and then, for example, if I run FFmpeg with :
ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -intra -an -f rtsp -rtsp_transport tcp rtsp://192.168.1.10:8554/test
Then the RTSP-server will RECORD the video, and to play it, I just need to run it with :
ffplay -i rtsp://192.168.1.10:8554/test
I need the RTSP-server to support TCP transport and H264 video encoder and OPUS audio encoder and stream from a live-video (not from a file) + the program should be unlicensed.
-
This server works great, but don’t support OPUS.
-
Live555 support H264 and OPUS, but only streams from files (VOD).
-
I’ve have found some other servers that can stream directly from /dev/video0, but it’s also not a good solution for me.
-
Wowza and Red5Pro does answer all the above requirements, except that they are licenced programs.
Any suggestions for a RTSP-server that support all the above requirements ?
EDIT :
I’ve tried Gstreamer and it looks promising, but I still didn’t success.
However, I’m quite sure I’m on the right way (perhaps I don’t know how to use yet the pipelines).- I’ve built gst-rtsp-server, version 1.13.91.
- Then, I ran
./test-record "( decodebin name=depay0 ! videoconvert ! rtspsink )"
- I ran
netstat -anp
and I can see clearly, the server is listening on tcp port 8554. - Now it’s time to stream to server. I’ve tried it once with Gstreamer and once with FFmpeg.
Gstreamer
gst-launch-1.0 videotestsrc ! x264enc ! rtspclientsink location=rtsp://127.0.0.1:8554/test
FFmpeg
ffmpeg -f v4l2 -video_size 640x480 -i /dev/video0 -c:v libx264 -qp 10 -an -f rtsp -rtsp_transport tcp rtsp://127.0.0.1:8554/test
In both cases, I can see the RTP packets in wireshark,
and by calling again tonetstat -anp
, I see :tcp 0 0 0.0.0.0:8554 0.0.0.0:* LISTEN 14386/test-record
tcp 0 0 127.0.0.1:8554 127.0.0.1:46754 ESTABLISHED 14386/test-record
tcp 0 0 127.0.0.1:46754 127.0.0.1:8554 ESTABLISHED 19479/ffmpegSo I can surly understand that I’m streaming (or streaming something...). However, when I’m trying to play the video, I’m getting failure (I’ve tried to play with Gstreamer, FFplay and VLC - all fails...) :
Gstreamer
gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test latency=300 ! decodebin ! autovideoconvert ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://127.0.0.1:8554/test
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not get/set settings from/on resource.
Additional debug info:
gstrtspsrc.c(7507): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Server can not provide an SDP.
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...FFplay
ffplay -i rtsp://127.0.0.1:8554/test
[rtsp @ 0x7fb140000b80] method DESCRIBE failed: 405 Method Not Allowed
rtsp://127.0.0.1:8554/test: Server returned 4XX Client Error, but not one of 40{0,1,3,4}VLC
vlc rtsp://127.0.0.1:8554/test
VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b)
[0000000000857f10] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Qt: Session management error: None of the authentication protocols specified are supported
[00007f9fdc000ea0] live555 demux error: Failed to connect with rtsp://127.0.0.1:8554/test
[00007f9fdc001d10] satip stream error: Failed to setup RTSP sessionAny ideas what I’m doing wrong ?
-
-
Popen subprocess giving wrong ffmpeg process ID when trying to close
28 octobre 2023, par GokuI'm trying to create a Video Management System application using
Python
andDjango
, that displays live camera stream and do video recording. For this, I add cameras using POST request and everything works fine.

But when I am required to update a camera's details, like IP address or password, then first I delete the camera and then create a new instance with same camera name. The problem I'm facing is that the process ID of the camera (
ffmpeg
instance here) is not updating, e.g. if initially the process ID was 10, then it remains 10 (in terminate() function in the code) even when I re-create the camera with new details but I do get new process ID in start() function.

Below is the code :


import subprocess
from subprocess import Popen
import os, sys
import threading
import time
from datetime import datetime
import pytz
import os, signal


"""This class is used to create camera objects to display live stream and recordings,
 it is also used to manage recordings files by deleting them at the given time"""
class CameraStream:
 
 def __init__(self, device_name, username, password, ip_address, storage_days):

 self.cam_name = device_name
 self.username = username
 self.password = password
 self.cam_ip = ip_address
 self.storage_days = storage_days
 self.p1 = None
 self.p2 = None
 self.p1_id = None
 self.p2_id = None

 self.recordings_list = []

 folder_name = f"videos/Recordings/{self.cam_name}"
 folder_name2 = f"videos/LiveStreams/{self.cam_name}"

 if not os.path.exists(folder_name):
 os.mkdir(folder_name)
 if not os.path.exists(folder_name2):
 os.mkdir(folder_name2)

 self.directory = folder_name

 t = threading.Thread(target=self.maintain_recordings, args=())
 t.start()

 self.live_stream = f"ffmpeg -fflags nobuffer -rtsp_transport tcp -i rtsp://{self.username}:{self.password}@{self.cam_ip}:554/stream1 -copyts -vcodec copy -acodec copy -hls_flags delete_segments+append_list -f hls -hls_time 6 -hls_list_size 5 -hls_segment_type mpegts -hls_segment_filename videos/LiveStreams/{self.cam_name}/%d.ts videos/LiveStreams/{self.cam_name}/index.m3u8".split(" ")
 self.recording = f"ffmpeg -use_wallclock_as_timestamps 1 -rtsp_transport tcp -i rtsp://{self.username}:{self.password}@{self.cam_ip}:554/stream1 -vcodec copy -acodec copy -f segment -reset_timestamps 1 -segment_time 1800 -segment_format mp4 -segment_atclocktime 1 -strftime 1 videos/Recordings/{self.cam_name}/%Y%m%dT%H%M%S.mp4".split(" ")

 self.start()


 def start(self):
 self.p1 = Popen(self.live_stream)
 self.p2 = Popen(self.recording)
 # self.p1.wait() # wait() is not letting the POST request to complete. Hence, using time.sleep() to get process id
 # self.p2.wait()
 time.sleep(2)
 self.p1_id = self.p1.pid
 self.p2_id = self.p2.pid
 print("In start func: ", self.p1_id, self.p2_id) # gives new process ID here

 def terminate_process(self):
 print("you have awakened me!")
 try:
 try:
 print("In terminate func: ", self.p1_id, self.p2_id) # gives older process ID here
 os.kill(int(self.p1_id), signal.SIGKILL)
 os.kill(int(self.p2_id), signal.SIGKILL)
 print("terminated by process id!")
 except:
 print("could not delete by process id!")
 try:
 self.p1.terminate()
 self.p2.terminate()
 print("terminated by terminate()")
 except:
 print("could not delete by terminate()")
 try:
 self.p1.kill()
 self.p2.kill()
 print("terminated by kill()")
 except:
 print("could not delete by kill()")
 except Exception as e:
 print("Failed to stop ffmpeg: ", e)



I think I'm making a mistake when deleting the
ffmpeg
subprocess but can't figure out what it is. Have tried many methods to stop/kill the subprocess but I'm still facing the problem.
I believe there is a problem with the terminate_process() function.

I'm deleting the object by using the
del
keyword, e.g.del
, maybe it's keeping the object in the memory but only destroying the reference to that object.