Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (90)

  • À propos des documents

    21 juin 2013, par

    Que faire quand un document ne passe pas en traitement, dont le rendu ne correspond pas aux attentes ?
    Document bloqué en file d’attente ?
    Voici une liste d’actions ordonnée et empirique possible pour tenter de débloquer la situation : Relancer le traitement du document qui ne passe pas Retenter l’insertion du document sur le site MédiaSPIP Dans le cas d’un média de type video ou audio, retravailler le média produit à l’aide d’un éditeur ou un transcodeur. Convertir le document dans un format (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (14093)

  • How to create a video out of frames without saving it to disk using python ?

    6 septembre 2022, par brenodacosta

    I have a function that returns a frame as result. I wanted to know how to make a video out of a for-loop with this function without saving every frame and then creating the video.

    


    What I have from now is something similar to :

    


    import cv2
out = cv2.VideoWriter('video.mp4',cv2.VideoWriter_fourcc(*'DIVX'), 14.25,(500,258))
for frame in frames:
    img_result = MyImageTreatmentFunction(frame) # returns a numpy array image
    out.write(img_result)
out.release()


    


    Then the video will be created as video.mp4 and I can access it on memory. I'm asking myself if there's a way to have this video in a variable that I can easily convert to bytes later. My purpose for that is to send the video via HTTP post.

    


    I've looked on ffmpeg-python and opencv but I didn't find anything that applies to my case.

    


  • Issues Streaming FLV Video from RTSP using FFmpeg and Python to flv.js

    14 juin 2024, par yternal

    I am currently working on a project where I need to stream video from an RTSP source, convert it to FLV format using FFmpeg, and then send the FLV stream to clients upon request. The code I have written to achieve this is as follows :

    


    import subprocess
from flask import Flask, Response, stream_with_context

app = Flask(__name__)

flv_header = b''

def update_stream(ffmpeg_path="ffmpeg", rtsp_url='rtsp://192.168.1.168/0', rtsp_id="rtsp01"):
    global flv_header

    command = [
        ffmpeg_path,
        '-i', rtsp_url,
        '-c:v', 'libx264',
        '-c:a', 'aac',
        '-b:v', '1M',
        '-g', '30',
        '-preset', 'ultrafast',
        '-bsf:v', 'dump_extra',
        '-f', 'flv',
        '-'
    ]
    process = subprocess.Popen(
        command,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE
    )
    flv_header = process.stdout.read(1024)
    while True:
        data = process.stdout.read(1024)
        if not data:
            break
        producer.notify(rtsp_id, data)

@app.route('/flv//')
def flv_stream(user_id, rtsp_id):
    try:
        consumer_queue = producer.register(user_id, rtsp_id)

        @stream_with_context
        def generate():
            yield flv_header
            while True:
                yield consumer_queue.get()

        response = Response(generate(), mimetype='video/x-flv')
        response.headers.add('Access-Control-Allow-Origin', '*')  # Allow all origins
        response.headers.add('Access-Control-Allow-Methods', '*')  # Allow all HTTP methods
        response.headers.add('Access-Control-Allow-Headers', 'Content-Type')  # Allow specific headers
        return response
    except Exception as e:
        print(f'{e}')


    


    In order to handle initial playback issues in FFplay and VLC, I save the first 1024 bytes of the FLV stream and send this header before streaming the actual data. This workaround allows playback in FFplay and VLC, but it does not work with flv.js.

    


    When attempting to play the stream using flv.js, the stream keeps loading indefinitely, and the console outputs warnings like :

    


    flv.min.js:9 [FLVDemuxer] > Invalid PrevTagSize 3491417133
[FLVDemuxer] > Unsupported tag type 204, skipped


    


    I have tried several modifications to the FFmpeg command, including adding parameters such as -bsf:v dump_extra, but none of these changes have resolved the issue. My expectation is that the FLV stream would play smoothly in flv.js just as it does in FFplay and VLC.

    


  • Revision 3c5256d572 : VP9_LPF_VERTICAL_16_DUAL_SSE2 optimization The vp9_lpf_vertical_16_dual functio

    29 avril 2015, par levytamar82

    Changed Paths :
     Modify /vp9/common/x86/vp9_loopfilter_intrin_sse2.c



    VP9_LPF_VERTICAL_16_DUAL_SSE2 optimization

    The vp9_lpf_vertical_16_dual function optimized for x86 32bit target. The hot
    code in that function was caused by the call to the transpose8x16.
    The gcc generated assembly created uneeded fills and spills to the stack. By
    interleaving 2 loads and unpack instructions, in addition to hoisting the
    consumer
    instruction closer to the producer instructions, we eliminated most of the fills
    and spills and improve the function-level performance by 17%.
    credit for writing the function as well as finding the root cause goes to Erik
    Niemeyer (erik.a.niemeyer@intel.com)

    Change-Id : I6173cf53956d52918a047d1c53d9a673f952ec46