Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (17)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP 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 (6616)

  • Getting ffmpeg error ‘Ignoring unsupported var reason rtmp :// : I/O error’

    6 septembre 2022, par Lectos Lacious

    Same setting worked normally for months, suddenly start to receive ffmpeg errors about ‘unsupported var’ related to rtmp and streaming stop working. Is this error about unavailable server or bad url ? Can someone enlighten me about meaning of unsupported var ?

    


    NOTE : replaced actual url with ‘someurl’

    


    LOG :
Input #0, rtsp, from 'rtsp ://192.168.40.44:554/1' :
    
Metadata :
    
title : 10
    
Duration : N/A, start : 0.000000, bitrate : N/A
    
Stream #0:0 : Video : h264, yuvj420p(pc, bt709), 1280x720, 15 tbr, 90k tbn, 180k tbc
    
Stream #0:1 : Audio : aac, 48000 Hz, stereo, fltp
    
[rtmp @ 0x7f9fdd58c5e0] Ignoring unsupported var reason
    
rtmp ://someurl : I/O error
    
Exiting normally, received signal 2.
    
Input #0, rtsp, from 'rtsp ://192.168.40.44:554/1' :
    
Metadata :
    
title : 10
    
Duration : N/A, start : 0.000000, bitrate : N/A
    
Stream #0:0 : Video : h264, yuvj420p(pc, bt709), 1280x720, 15 fps, 15 tbr, 90k tbn, 180k tbc
    
Stream #0:1 : Audio : aac, 48000 Hz, stereo, fltp
    
[rtmp @ 0x7f62a5869b20] Ignoring unsupported var reason
    
rtmp ://someurl : I/O error
    
Exiting normally, received signal 2.
    
[rtsp @ 0x7f0b4add32a0] max delay reached. need to consume packet
    
[rtsp @ 0x7f0b4add32a0] RTP : missed 2 packets
    
Input #0, rtsp, from 'rtsp ://192.168.40.44:554/1' :
    
Metadata :
    
title : 10
    
Duration : N/A, start : 0.000000, bitrate : N/A
    
Stream #0:0 : Video : h264, yuvj420p(pc, bt709), 1280x720, 15 fps, 15 tbr, 90k tbn, 180k tbc
    
Stream #0:1 : Audio : aac, 48000 Hz, stereo, fltp
    
[rtmp @ 0x7f0b4af13840] Ignoring unsupported var reason
    
rtmp ://someurl : I/O error
    
Exiting normally, received signal 2.
    
Input #0, rtsp, from 'rtsp ://192.168.40.44:554/1' :
    
Metadata :
    
title : 10
    
Duration : N/A, start : 0.000000, bitrate : N/A
    
Stream #0:0 : Video : h264, yuvj420p(pc, bt709), 1280x720, 15 fps, 15 tbr, 90k tbn, 180k tbc
    
Stream #0:1 : Audio : aac, 48000 Hz, stereo, fltp
    
[rtmp @ 0x7fc61ef8b880] Ignoring unsupported var reason

    


  • FFmpeg delay and mix audio streams while keeping overall volume constant

    5 octobre 2020, par unstuck

    I have about 100 audio streams, all with the same intro music/sound, and in some of them the intro is delayed by a few seconds. I want to align and mix all the audio streams such that all the intros play at the same time and the output remains pretty much the same volume throughout. I know in advance how much each stream needs to be delayed by.

    


    Like this in Audacity. Each audio stream is aligned to the intro, and the duration before the intro is arbitrary. (This doesn't solve the volume problem though.)

    


    What I have so far uses adelay and amix. It looks something like this but with more audio streams.

    


    ffmpeg -i 00.oga \
       -i 01.oga \
       -i 02.oga \
       -i 03.oga -filter_complex \
"[0]adelay=delays=     123S:all=1[a0]; \
 [1]adelay=delays=    2718S:all=1[a1]; \
 [2]adelay=delays= 6283185S:all=1[a2]; \
 [3]adelay=delays=11235813S:all=1[a3]; \
 [a0][a1][a2][a3]amix=inputs=4" output.oga


    


    In this example the first stream is delayed by 123 samples, the second by 2 718, the third by 6 283 185, and the by fourth 11 235 813.

    


    This works, except at the beginning of the output it's very quiet. When fed n streams, amix makes each stream 1/nth its original volume, which is a good thing in principle. In this case it's not an entirely good thing, because at the beginning of the output 3 of the 4 audio streams are silent (adelay fills delayed streams with silence), meaning the only audible stream is 1/4 = 25% of its original volume. When the second stream becomes audible, the overall volume is 2/4, with three audible streams 3/4, and with all four streams audible it's 4/4 = 100%.

    


    Instead, I want the the first stream to be at 100% volume when it's the only audible one, 50% volume each when there are two audible streams, etc.

    


    Is there a way to make it so when there are n audio streams but m non-silent audio streams, the volume for each of the audio streams is 1/m not 1/n ? amix does this when streams end ; if one stream ends it changes the volume of the others from 1/n to 1/n-1 over a period of time (dropout_transition : https://ffmpeg.org/ffmpeg-filters.html#amix).

    


    I found a similar question where someone wanted to do something like this but only with 2 audio streams. The answer was to split, trim, and change the volume manually. This would be incredibly complicated with 100 audio streams or more, like in my situation.

    


    Is there any easy way to achieve this, even without FFmpeg ?

    


  • Best way to diagnose VideoCapture not opening the rtmp stream

    8 janvier 2021, par Greg0ry

    I am pulling my hair off for a few days and I'm out of ideas.

    


    I have two rtmp streams

    


      

    • first stream is transcoded directly by myself (I use ffmpeg to transcode) and then I attach to that stream with opencv - VideoCapture can open the stream with no problem
    • 


    • second stream is transcoded by 3rd party system (this system captures video through WebRTC and then encodes to h264) - this stream cannot be opened by VideCapture no matter what I do
    • 


    


    I can attach with pure ffmpeg to that dodgy stream and I can restream - but this is not ideal as introduces extra network traffic and latency.

    


    I was playing with OPENCV_FFMPEG_CAPTURE_OPTIONS environmental variable (I was trying to remove audio stream, change the video codec, playing with rtmp options like this OPENCV_FFMPEG_CAPTURE_OPTIONS="loglevel;debug" python my_script.py) - no joy

    


    So I figured I am trying to solve this problem from wrong end. I should somehow collect underlying ffmpeg logs that should be available when calling VideoCapture. So I tried to set OPENCV_FFMPEG_CAPTURE_OPTIONS="v;debug" but I can see no ffmpeg output when calling VideoCapture.

    


    This is very simple python3 script I was using during tests :

    


    import cv2 as cv
dodgy_cap = cv.VideoCapture()
dodgy_cap.open('rtmp://my_local_ip_address/rtmp/dodgy_stream_name')
print(dodgy_cap.isOpened())  # always returns False
healthy_cap = cv.VideoCapture()
healthy_cap.open('rtmp://my_local_ip_address/rtmp/healthy_stream_name')
print(healthy_cap.isOpened())  # always returns True


    


    I collected information about both streams with ffprobe, but even though they look different I cannot see what would be the difference that prevents opencv from opening VideoCapture for dodgy stream..

    


    This is a fragment from (very) verbose log for healthy stream :

    


    RTMP_ClientPacket, received: notify 254 bytes                                                                                                                                                                                               
(object begin)                                                                                                                                                                                                                              
Property:                                                                                                                                                                                  
Property:                                                                                                                                                                                             
(object begin)                                                                                                                                                                                                                              
Property:                                                                                                                                                                                        
Property:                                                                                                                                                                                     
Property:                                                                                                                                                                                     
Property:                                                                                                                                                                                        
Property:                                                                                                                                                                                        
Property:                                                                                                                                                                                        
Property:                                                                                                                                                               
Property:                                                                                                                                                                         
Property:                                                                                                                                                                               
Property:                                                                                                                                                                                        
(object end)                                                                                                                                                                                                                                
(object end)                                                                                                                                                                                                                                
Metadata:
  duration              0.00
  width                 2048.00
  height                1536.00
  videodatarate         0.00
  framerate             6.00
  videocodecid          7.00
  title                 Session streamed by "preview"
  comment               h264Preview_01_main
  encoder               Lavf58.20.100
  filesize              0.00

(... raw network packets ...)

Input #0, flv, from 'rtmp://my_local_ip_address/rtmp/healthy_stream_name':
  Metadata:
    title           : Session streamed by "preview"
    comment         : h264Preview_01_main
    encoder         : Lavf58.20.100
  Duration: 00:00:00.00, start: 159.743000, bitrate: N/A
    Stream #0:0, 41, 1/1000: Video: h264 (High), 1 reference frame, yuv420p(progressive), 2048x1536, 0/1, 6 fps, 6 tbr, 1k tbn



    


    And this is the fragment for dodgy stream :

    


    RTMP_ClientPacket, received: notify 205 bytes                                                                                                                                                                                               
(object begin)                                                                                                                                                                                                                              
Property:                                                                                                                                                                                                 
(object begin)                                                                                                                                                                                                                              
Property:                                                                                                                                                                                
Property:                                                                                                                                                                            
Property:                                                                                                                                                                                       
Property:                                                                                                                                                                                       
Property:                                                                                                                                                                                       
Property:                                                                                                                                                                                    
Property:                                                                                                                                                                                        
Property:                                                                                                                                                                                      
Property:                                                                                                                                                                                      
(object end)                                                                                                                                                                                                                                
(object end)                                                                                                                                                                                                                                
RTMP_ReadPacket: fd=3                                                                                                                                                                                                                       

(... raw network packets ...)

Input #0, flv, from 'rtmp://my_local_ip_address/rtmp/dodgy_stream_name':
  Duration: N/A, start: 4511.449000, bitrate: N/A
    Stream #0:0, 41, 1/1000: Video: h264 (High), 1 reference frame, yuv420p(progressive, left), 640x480, 0/1, 15.17 fps, 15.08 tbr, 1k tbn, 30 tbc
    Stream #0:1, 124, 1/1000: Audio: aac (LC), 48000 Hz, mono, fltp



    


    Both streams don't require any authentication (they are not exposed to the outside world)

    


    Dodgy stream contains audio but I don't think it is source of problem as I was able to connect to other healthy rtmp streams that contained audio..

    


    I have no more ideas how can I debug this problem, please help..

    



    


    I found in VideoCap documentation that I can enable exception mode, however it did not help much (it says where it failed but it does not say why) :

    


    >>> dodgy_stream = cv.VideoCapture()&#xA;>>> dodgy_stream.setExceptionMode(True)&#xA;>>> dodgy_stream.open("rtmp://my_local_ip_address/rtmp/dodgy_stream_name")&#xA;Traceback (most recent call last):&#xA;  File "<stdin>", line 1, in <module>&#xA;cv2.error: OpenCV(4.5.0) /tmp/pip-req-build-s_nildlw/opencv/modules/videoio/src/cap.cpp:177: error: (-2:Unspecified error) could not open &#x27;rtmp://my_local_ip_address/rtmp/dodgy_stream_name&#x27; in function &#x27;open&#x27;&#xA;</module></stdin>

    &#xA;