Recherche avancée

Médias (1)

Mot : - Tags -/portrait

Autres articles (61)

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

  • Les images

    15 mai 2013
  • Taille des images et des logos définissables

    9 février 2011, par

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

Sur d’autres sites (11819)

  • Automation for Downloading, Encoding, Renaming and Uploading [on hold]

    5 février 2019, par Madara Uchiha

    How do I automate - downloading anime episodes from Torrent > Encode the videos with ffmpeg or gui > rename (with encoder tag) > upload to Google drive ?
    Should work 24/7. Need help !

  • Why doesn't the ffmpeg output display the stream in the browser ? [closed]

    10 mai 2024, par Tebyy

    Why is it that when I create a livestream in Python using ffmpeg, and then I open the browser and visit the page, the page keeps loading continuously, and in PyCharm logs, I see binary data ? There are no errors displayed, and the code seems correct to me. I even tried saving to a file for testing purposes, and when I play the video, everything works fine. Does anyone know what might be wrong here ?

    


    Code :

    


    def generate_frames():
    cap = cv2.VideoCapture(os.path.normpath(app_root_dir().joinpath("data/temp", "video-979257305707693982.mp4")))
    while cap.isOpened():
        ret, frame = cap.read()
        if not ret:
            break

        yield frame


@app.route('/video_feed')
def video_feed():
    ffmpeg_command = [
        'ffmpeg', '-f', 'rawvideo', '-pix_fmt', 'bgr24',
        '-s:v', '1920x1080', '-r', '60',
        '-i', '-', '-vf', 'setpts=2.5*PTS', # Video Speed
        '-c:v', 'libvpx-vp9', '-g', '60', '-keyint_min', '60',
        '-b:v', '6M', '-minrate', '4M', '-maxrate', '12M', '-bufsize', '8M',
        '-crf', '0', '-deadline', 'realtime', '-tune', 'psnr', '-quality', 'good',
        '-tile-columns', '6', '-threads', '8', '-lag-in-frames', '16',
        '-f', 'webm', '-'
    ]
    ffmpeg_process = subprocess.Popen(ffmpeg_command, stdin=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=-1)
    frames_generator = generate_frames()
    for frame in frames_generator:
        ffmpeg_process.stdin.write(frame)
        ffmpeg_process.stdin.flush()

    ffmpeg_process.stdin.close()
    ffmpeg_process.wait()

    def generate_video_stream(process):
        startTime = time.time()
        buffer = []
        sentBurst = False
        for chunk in iter(lambda: process.stderr.read(4096), b''):
            buffer.append(chunk)

            # Minimum buffer time, 3 seconds
            if sentBurst is False and time.time() > startTime + 3 and len(buffer) > 0:
                sentBurst = True
                for i in range(0, len(buffer) - 2):
                    print("Send initial burst #", i)
                    yield buffer.pop(0)

            elif time.time() > startTime + 3 and len(buffer) > 0:
                yield buffer.pop(0)

            process.poll()
            if isinstance(process.returncode, int):
                if process.returncode > 0:
                    print('FFmpeg Error', process.returncode)

                break

    return Response(stream_with_context(generate_video_stream(ffmpeg_process)), mimetype='video/webm', content_type="video/webm; codecs=vp9", headers=Headers([("Connection", "close")]))



    


  • FFMPEG multi livestream - recorded stream send to different services like YT and Twitch at different time (on different button clicks )

    4 octobre 2022, par Ganesh

    Trying for the last 10 days and still no success, I am creating a python application that will accept the URL and visit that URL using chromium, capture that screen and send that real-time screen recording to different live stream acceptors as youtube live, twitch Twitter, Facebook live or some other sources and many of these could be multiple.

    


    There are two challenges (both challenges depend on a user action like different button clicks) -

    


      

    • The time of starting the Livestream we know only one Livestream acceptor and other acceptors could be sent via another API at any time or may not be sent on the whole live stream.
    • 


    • Any of the streams could be stopped at any moment including the first one which started the original live streaming service
    • 


    


    To Solve these challenges I am trying the following process (i took mp4 as a source for simplifying)

    


      

    • create a stream and store it into PIPE.stdout
    • 


    


    ffmpeg_Command_get_stream = 'ffmpeg -re -i test.mp4 -f flv pipe:1'
ffmpeg_Command_get_stream=ffmpeg_Command_get_stream.split()
pipe = sp.Popen(ffmpeg_Command_get_stream,
            stdout=sp.PIPE,
            stderr=sp.PIPE,
            bufsize=8000000,
            shell=True,
            universal_newlines=True
            )
out,err = pipe.communicate()


    


      

    • and send that stream with the help of FFMPEG to the Livestream acceptor with the click of the youtube Livestream button

      


      ffmpeg_Command_send_stream = ['ffmpeg','-i',pipe.stdout,'-f','flv',RTMPURL_YOUTUBE]

      


    • 


    


    Update Trying to Explain it a little more :

    


    step 1 - I need a real-time stream from the first command, so I used -re in FFMPEG

    


    step 2 - Use above stream as an input for other command and send that as an output as a Livestream to youtube (or twitch/Facebook), But the second step would happen only when the user click on the button "YT LiveStream", Here the tricky thing is there are multiple buttons (YT LiveStream, Twitch LiveStream, Facebook LiveStream) and user can click any time on any of button, also can click on all button one by one.

    


    enter image description here

    


    sorry for bad explaination

    


    what I am doing wrong ? , Is this Possible ? or need to go with another process,

    


    any help would be greatly appreciated