Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (97)

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

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

Sur d’autres sites (8112)

  • error when I try to seek on a streaming with ffmpeg and flask

    29 juillet 2021, par Martin Oller Exposito

    I want to get a seekable stream from a google drive file but
When calling 127.0.0.1:500/, it works and it returns the video stream but it does not show me the duration of the video nor does it allow me to advance or rewind it

    


    img of stream in vlc

    


    I have also done tests using an html player and it gives me an error in the content length and it seems that after 8 seconds it starts to upload the duration of the file up to 10 seconds (the total duration of the file is 10s)

    


    img of stream in player web

    


    import threading&#xA;from flask import Flask, request&#xA;from flask.helpers import stream_with_context&#xA;import requests&#xA;import subprocess&#xA;from requests import Response&#xA;&#xA;from flask import request, make_response, Response, stream_with_context, send_file&#xA;&#xA;&#xA;&#xA;app = Flask(__name__)&#xA;&#xA;@app.route(&#x27;/<id>&#x27;)&#xA;def index(id):&#xA;   &#xA;    range = request.headers.get(&#x27;Range&#x27;)&#xA;   &#xA;    &#xA;    token = "ya29.a0ARrdaM8vW_pKmGhIRleJiZ9fuoprk2-zS0bgJPaslD3V4idJ6wK52_iwJE8MOYnj7kCOWl5m2oHlEWc3LEWcPt5-b4nemoC7SKy7l-4QO1DviJnPBfVeHruAU27I_UE3gMPRV4H-Tk1ZLrNp56UfxyR-ObAx"&#xA;&#xA;    headers = {&#xA;        "Authorization":"Bearer "&#x2B;token&#xA;    }&#xA;    if (range != None):&#xA;        headers = {&#xA;            "Authorization": "Bearer " &#x2B; token,&#xA;            "Range":range&#xA;        }&#xA;&#xA;    url = "https://www.googleapis.com/drive/v3/files/"&#x2B;id&#x2B;"?alt=media"&#xA;    r = requests.get(url, headers=headers, stream=True)&#xA;    &#xA;    &#xA;    def getVideoStreaming():&#xA;        for chunck in r.iter_content(1024):&#xA;            if chunck:&#xA;                process.stdin.write(chunck)&#xA;        process.stdin.close()&#xA;&#xA;    thread = threading.Thread(target=getVideoStreaming)&#xA;    &#xA;&#xA;&#xA;    command = ("ffmpeg","-i", "-","-y","-vcodec","copy","-movflags", "frag_keyframe&#x2B;empty_moov","-f","mp4","pipe:1")&#xA;    process = subprocess.Popen(command,shell=True,stdout = subprocess.PIPE,stdin=subprocess.PIPE)&#xA;&#xA;    thread.start()&#xA;    &#xA;  &#xA;    def readingFfmpeg():&#xA;        &#xA;        for data in iter(process.stdout.readline, b&#x27;&#x27;):&#xA;            if not data:&#xA;                break&#xA;            yield data&#xA;        &#xA;      &#xA;    &#xA;    response =  Response(stream_with_context(readingFfmpeg()),mimetype=r.headers.get(&#x27;Content-Type&#x27;))&#xA;    &#xA;    response.headers.set(&#x27;Content-Range&#x27;,r.headers.get(&#x27;Content-Range&#x27;))&#xA;    response.headers.set(&#x27;Cache-Control&#x27;, r.headers.get(&#x27;Cache-Control&#x27;))&#xA;    response.headers.set(&#x27;Content-Length&#x27;, r.headers.get(&#x27;Content-Length&#x27;))&#xA;    &#xA;    &#xA;  &#xA;    if(range != None):&#xA;        return response,200&#xA;    else:&#xA;        return response,206&#xA;    &#xA;</id>

    &#xA;

  • Is there a way to extract a video frame, encode a sentence behind it, put it back, and then decode it ?

    29 juillet 2021, par Jesse Hix

    I am trying to do stenography on an MP4 video where I am pulling a frame out at a certain time, 5.52 sec, saving that frame as a jpg or jpeg using any image stenography tool, in this case stegosuite, to encode a sentence behind the image and then reinsert that image back into the video at the same time and then extract it again with the same command and using the same steno tool read the message.

    &#xA;

    Up until decoding the message everything runs without issue.&#xA;I know that it is not working because the videos are not the same in size meaning that the frankenstein video is not the same as the original and thus messing up the frame extraction.

    &#xA;

    Question :
    Is there a way to extract a frame encode a sentence behind it put it back and then decode it ?

    &#xA;

    What I tried :
    &#xA;Used to extract the frame both times :

    &#xA;

    ffmpeg -ss 5.52 -i original.mp4 -vframes 1 frames_%d.jpg&#xA;

    &#xA;

    Used to combine the image back into the video :

    &#xA;

    ffmpeg -i original.mp4 -i frames_1_embed.jpg -filter_complex "[1]setpts=5.52/TB[im];[0][im]overlay=eof_action=pass" -c:a copy out_1.mp4&#xA;

    &#xA;

  • Frame seek inconsistency between Chrome and ffmpeg : example videos

    17 avril 2021, par OlgaPp

    There is a known issue where Chrome doesn't do an accurate frame seek via <video></video> element's currentTime. (I.e. if one sets video's currentTime to desired_frame_number/fps, it may be off by a few frames, as compared to "canonical" ffmpeg frames. Typically, chrome inserts stale frames in the beginning).

    &#xA;

    This seems to be explained by b-frames. Another reason could be varying frame rates, but let's assume a constant frame rate for now.

    &#xA;

    I am looking for some sample videos or an ffmpeg command to generate one. I have tried the -bf flag when converting a well-behaved video to have some b-frames, but it still produced a well behaved video.

    &#xA;