
Recherche avancée
Autres articles (95)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...)
Sur d’autres sites (9370)
-
Playback / recording problems
3 novembre 2024, par WessiezThe code I'm working on gives me some errors. This results in frame lost when recording.


The overview : A video is paused in the first frame. When the motion sensor is detected the video is playing a scary scene. After that it pauses again on the first frame.
At the same time when motion is detected the camera starts recording the reaction of the poeple watching the scary scene.


This is my code :


from gpiozero import MotionSensor
from time import sleep
from picamera2 import Picamera2
from picamera2.encoders import H264Encoder
from picamera2.outputs import FfmpegOutput
import vlc
import datetime

# Creating Instance class object
vlc_instance = vlc.Instance()
player = vlc_instance.media_player_new()
player.set_fullscreen(True)
 
# Define Motion Sensor
pir = MotionSensor(4)

# Camera
camera = Picamera2()
video_config = camera.create_video_configuration()
camera.configure(video_config)
camera.rotation = 180
encoder = H264Encoder(bitrate=10000000)
output = FfmpegOutput('/home/wessie/Halloween/Recordings/' + datetime.datetime.now().strftime('%Y-%m-%d_%H.%M.%S.h264'))

print("Sensor loading")
pir.wait_for_no_motion()
sleep(.1)
player.set_mrl("/home/wessie/Halloween/ScareMedia/FemaleScare.mp4")
player.play()
sleep(.1)

while True:
 try:
 print("Ready")
 pir.wait_for_motion()
 sleep(.1)
 print("Motion detected")
 sleep(.1)
 player.set_mrl("/home/wessie/Halloween/ScareMedia/FemaleScare.mp4")
 player.play()
 sleep(.1)
 camera.start_recording(encoder, output)
 sleep(12)
 camera.stop_recording()
 while player.get_state() in playing:
 sleep(.1)
 continue 
 print("Finished")
 sleep(.1)
 except KeyboardInterrupt:
 break
 except:
 continue



After "Motion detected" the message is :
"Application provided invalid non monotonically increasing dts to muxer in stream 0 :"


I've tried to cleanup this code, but everything I do results in other errors.


Is the code in the right order ? The scary scene seems to work, but the recording is not 100%


-
HEVC/H.265 interlaced format support in ffmpeg or VLC
30 décembre 2020, par Ernestas Gruodis"Music Box Russia" channel over satellite transmits in HEVC 1920x1080 25fps interlaced - and after recording VLC recognizes file as 50 fps, and resolution 1920x540 - half a height. But on satellite tuner the player works fine - it plays a file as 1920x1080 25fps... When we can expect support for HEVC/H.265 interlaced ? Here is recorded file (Garry Grey & Eva Miller - wtf). Also - a lot of lost frames in VLC player statistics..


EDIT :


I found some interesting info how in HEVC the interlace video content can be indicated here :




Unlike to H.264/AVC, interlace-dedicated coding in HEVC is not exist :


- 

- No mixed frame-field interaction (like PAFF in H.264/AVC)
- No interlace scanning of transform coefficients
- No correction MVX[1] (or y-component of MV) if current and reference pictures are in different polarity (top-bottom or
bottom-top).








However, in HEVC the interlace video content can be indicated
(signaled in VPS/SPS and
pic_timing
SEI messages the latter are
transmitted for every picture in the sequence). Interlace-related
setting :

- 

-
in VPS/SPS set
general_interlaced_source_flag=1
andgeneral_progressive_source_flag=0
. Indeed, the HEVC standard says :

if
general_progressive_source_flag
is equal to0
and
general_interlaced_source_flag
is equal to1
, the source scan type of
the pictures in the CVS should be interpreted as interlaced only.

-
in VPS/SPS set
general_frame_only_constraint_flag=0


-
in SPS VUI set
field_seq_flag=1
andframe_field_info_present_flag=1
. Notice that if these flags are ON
then picture timing SEIs shall be present for each picture.

-
transmission of Picture Timing SEI per picture with the following parameters :


source_scan_type = 0
to indicate interlace mode
for top field picture signalpict_struct=1
and for bottom field picturepict_struct=2














Perhaps it is possible to pass these parameters to ffmpeg/vlc before playing a file ?


-
Receive RTSP stream within docker container
12 août 2021, par WayneI am trying to decode a camera rtsp stream using ffmpeg_libs within a ubuntu docker container. The ffmpeg debug output seems to show that it successfully negotiates the rtsp-digest authentication (ie. RTSP/1.0 200 OK), and receives an SPS (nalu 7) and PPS (nalu 8), but nothing after that. It times out, retries, etc. That doesn’t really make sense to me.



The same code compiled and run locally (not in docker) works fully.



Also, if I decode a file, the code works fine both locally and in docker container. So, the basic ffmpeg_lib decode is working. The difficulty is with the stream interface running in docker.



Is there additional authentication through the docker interface, or maybe port access, or something ? I’m not much of a networking guy, so I’m really lost at this point.



The ffmpeg logs is below, and my docker run command is :



docker run -it --name VideoRx videorx:latest (also tried with -p 554)




Any help will be very much appreciated.

Thanks,
Wayne


avformat_version(): 3756900 Build: 3756900 Ident: Lavf57.83.100
avformat_open_input(): rtsp://admin:public_pwd@192.168.1.237
Probing rtsp score:100 size:0
[tcp @ 0x56263b430a20] No default whitelist set
[rtsp @ 0xaddr1] Sending:
OPTIONS rtsp://192.168.1.237:554 RTSP/1.0

... [snipped]
Initial authentication handshake (OPTIONS, DESCRIBE, SETUP).
All success, server replies: 'RTSP/1.0 200 OK'
....

[rtsp @ 0xaddr1] Sending:
PLAY rtsp://192.168.1.237:554/ RTSP/1.0
Range: npt=0.000-
CSeq: 5
User-Agent: Lavf57.83.100
Session: 420467284
Authorization: Digest username="admin", realm="IP Camera(C1003)", nonce="129b254c8da4e0ffb530f64f79938bcd", uri="rtsp://192.168.1.237:554/", response="82c6c0f1fadea3739846866e8e50e855"

--
[rtsp @ 0xaddr1] line='RTSP/1.0 200 OK' 
[rtsp @ 0xaddr1] line='CSeq: 5'
[rtsp @ 0xaddr1] line='Session: 420467284'
[rtsp @ 0xaddr1] line='RTP-Info: url=rtsp://192.168.1.237:554/trackID=1;seq=43938;rtptime=4022155312'
[rtsp @ 0xaddr1] line='Date: Thu, Aug 02 2018 15:53:00 GMT'
[rtsp @ 0xaddr1] line=''
avformat_open_input(): Success erc: 0
avformat_find_stream_info()
[h264 @ 0xaddr2] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0xaddr2] nal_unit_type: 8, nal_ref_idc: 3
[rtsp @ 0xaddr1] UDP timeout, retrying with TCP 
[rtsp @ 0xaddr1] ...
... Stalls waiting for additional packets