Recherche avancée

Médias (91)

Autres articles (50)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • 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 (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La 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.

Sur d’autres sites (9463)

  • Nginx can't record live streaming results for medium resolution

    1er juillet 2021, par firman alislami

    when i finished live streaming, the live streaming result file was not recorded for medium resolution...

    


       rtmp {
server {
    listen 1935;
    chunk_size 4096;            
application live {
    live on;
    exec_push /usr/bin/ffmpeg -re -i rtmp://localhost/live/$name 
   -async 1 -vsync -1
    -c:v libx264 -c:a aac -b:v 200k  -b:a 34k  -vf "scale=240:trunc(ow/a/2)*2"  -tune zerolatency -preset superfast -crf 23 -f flv rtmp://localhost/hls/$name_low
    -c:v libx264 -c:a aac -b:v 300k  -b:a 64k  -vf "scale=360:trunc(ow/a/2)*2"  -tune zerolatency -preset superfast -crf 23 -f flv rtmp://localhost/hls/$name_low360
    -c:v libx264 -c:a aac -b:v 800k  -b:a 64k  -vf "scale=480:trunc(ow/a/2)*2"  -tune zerolatency -preset superfast -crf 23 -f flv rtmp://localhost/hls/$name_low480
    -c:v libx264 -c:a aac -b:v 1800k  -b:a 128k -vf "scale=720:trunc(ow/a/2)*2"  -tune zerolat#-acodec  copy -vcodec copy -f flv rtmp://localhost/hls/$name;
}
application hls {
    live on;
    deny play all;
    hls on;
    hls_fragment 4;
    hls_playlist_length 20;
    hls_path /mnt/hls;
    hls_variant _mid BANDWIDTH=1800000,RESOLUTION=1280x720; 
    hls_variant _low480 BANDWIDTH=80000,RESOLUTION=858x480;
    hls_variant _low360 BANDWIDTH=300000,RESOLUTION=480x360;
    hls_variant _low BANDWIDTH=200000,RESOLUTION=352x240; 
    hls_nested on;
        record all;
        record_path /mnt/record/;
        record_unique on;
            exec_record_done ffmpeg -y -i $path -acodec libmp3lame -ar 44100 -ac 1 -vcodec libx264 $dirname/$basename.mp4;
            }
    }
    


    


    }ency -preset superfast -crf 23 -f flv rtmp ://localhost/hls/$name_mid ;
#-c:v libx264 -c:a aac -b:v 1024k -b:a 128k -vf "scale=1080:trunc(ow/a/2)*2" -tune zerolatency -preset superfast -crf 23 -f flv rtmp ://localhost/hls/$name_high
#-c copy -f flv rtmp ://localhost/hls/$name_src ;

    


  • add watermark to video with FFMPEG and convert to HLS for all resolution

    25 juin 2021, par sina

    I'm using this package : aminyazdanpanah/PHP-FFmpeg-video-streaming. I try to add a watermark to a video and I am using "hls" after adding a watermark method. The problem is the watermark is apply just for one resolution and the other representations does not work.

    


    For example, I use this method :

    


    $video ->filters() ->watermark('sample.png', [ 'position' => 'relative', 'bottom' => 50, 'right' => 50, ]);

$video->hls() ->setFormat($format) ->autoGenerateRepresentations([144,360,480]) ->save('sample.m3u8');


    


    In this case only the default representation is save (depend on video resolution) and other quality not generate.

    


    Is there a way to add watermark to hls (all quality) ?

    


  • Is there any way to switch the resolution on the fly when streaming with RTMP ?

    25 mai 2021, par wwd

    I built nginx with nginx-http-flv-module as the RTMP server. And I used ffmpeg-python to upload the stream. I have searched a lot about "how to switch the resolution on the fly". However, it seems like that nobody do something like that.

    


    So, I did a test by periodically rerunning a new ffmpeg uploading process while the client(opencv-python) keeps receiving the data.
I found that the resolution was switched successfully, but the frame near the switch was often broken. And opencv sometimes exits without any logs.

    


    Is there any way to achieve this ?

    


    Here is the test code of my streamer :

    


    import cv2
import ffmpeg


if __name__ == "__main__":
    cap1 = cv2.VideoCapture("videos/1944x960/video.mp4")
    cap2 = cv2.VideoCapture("videos/972x480/video.mp4")

    pushing_process = None
    count = 0
    hr = True

    while True:
        ret1, frame1 = cap1.read()
        ret2, frame2 = cap2.read()
        if not ret1 or not ret2:
            break

        if hr:
            if pushing_process is None:
                pushing_process = ffmpeg.input("pipe:", format="rawvideo", pix_fmt="bgr24",
                                               s=f"{1944}x{960}") \
                    .output("rtmp://127.0.0.1:1935/myapp/s", pix_fmt="yuv420p", f="flv", vcodec="h264",
                            loglevel="error") \
                    .global_args("-re").run_async(pipe_stdin=True)

            frame = frame1
        else:
            if pushing_process is None:
                pushing_process = ffmpeg.input("pipe:", format="rawvideo", pix_fmt="bgr24",
                                               s=f"{972}x{480}") \
                    .output("rtmp://127.0.0.1:1935/myapp/s", pix_fmt="yuv420p", f="flv", vcodec="h264",
                            loglevel="error") \
                    .global_args("-re").run_async(pipe_stdin=True)
            frame = frame2
        pushing_process.stdin.write(frame.tobytes())
        count += 1
        if count == 60:
            hr = not hr
            pushing_process.stdin.close()
            pushing_process.wait()
            pushing_process = None
            count = 0

    pushing_process.stdin.close()
    pushing_process.wait()



    


    And the client :

    


    import cv2

if __name__ == "__main__":
    cap = cv2.VideoCapture("http://127.0.0.1/live?app=myapp&stream=s")
    while True:
        ret, frame = cap.read()
        if not ret:
            break
        cv2.imshow("frame", cv2.resize(frame, (1944, 960), interpolation=cv2.INTER_CUBIC))
        cv2.waitKey(0)