Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (36)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (6509)

  • Giving Thanks For VP8

    25 novembre 2010, par Multimedia Mike — VP8

    It’s the Thanksgiving holiday here in the United States. I guess that’s as good a reason as any to release a first cut of my VP8 encoder. In order to remind people that they shouldn’t expect phenomenal quality from it — and to discourage inexperienced people from trying to create useful videos with it — I have hardcoded the quantizers to their maximum settings. For those not skilled in the art, this is the setting that yields maximum compression and worst quality. When compressing the Big Buck Bunny logo image, the resulting file is only 2839 bytes but observe the reconstructed quality :



    It really just looks like a particularly stormy day in the forest.

    First VP8 File From An Independent Encoder
    I found a happy medium on the quantizer scale and encoded the first 30 seconds of Big Buck Bunny for your inspection. I guess this makes it the first VP8/WebM file from an independent encoder (using FFmpeg’s Matroska muxer as well).

    Download : bbb-360p-30sec-q40.webm ( 13 MBytes)

    I think the quality makes it look like it was digitized from an old VHS tape.

    For fun, here’s the version with the quantizer cranked to the max : bbb-360p-30sec-q127.webm ( 1.3 MBytes)

    Aside : I was going to encapsulate the video in this post using a bare HTML5 <video> tag for the benefit of the small browsing population who could view that (indeed, it works fine in Chrome). But that would be insane due to the fact that supporting browsers preload the video with no easy (read : without the help of JavaScript) method for overriding this unacceptable default.

    The Code
    I’m still trying to get over my fear of git. To that end, I have posted the code on Github :

    https://github.com/multimediamike/ffvp8enc

    I still don’t like you, git. But I’m sure we’ll find some way to make this work.

    Other required code changes in the basic FFmpeg tree :

    • Of course, copy vp8enc.c into libavcodec/
    • In libavcodec/allcodecs.c, ’REGISTER_DECODER (VP8, vp8);’ turns into ’REGISTER_ENCDEC (VP8, vp8);
    • Add ’OBJS-$(CONFIG_VP8_ENCODER) += vp8enc.o’ to libavcodec/Makefile

    Further Work
    About the limitations and work yet to do :

    • it’s still intra-only, no interframes (which is where a lot of compression occurs)
    • no rate control or distortion optimization, obviously
    • no intra 4x4 coding (that’s close to working but didn’t my little T-day deadline)
    • no quantization control ; this should really be hooked up to the FFmpeg command line but I’m not sure how
    • encoder writes into a static-sized, 1/2 MB memory buffer ; this can overflow
    • code is a mess (what did you expect at this stage of the game ?)
    • lots and lots of other things, surely
  • FFMPEG Screen Flashing Green

    18 novembre 2022, par Devin Dixon

    I have this problem where my ffmpeg videos are flicking green. Example of the video is here :&#xA;https://www.glitch.fun/streams/31fea7e0-7523-4365-9780-31deee9e472c/watchrecording/efb841c0-4b87-4482-b165-990880a66f63

    &#xA;

    My ffmpeg command is this :

    &#xA;

    /usr/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -y -v info -f x11grab -draw_mouse 0 -r 60 -s 1920x1080 -thread_queue_size 14000 -i :0.0&#x2B;0,0 -f alsa -thread_queue_size 14000 -i plug:bsnoop -acodec aac -strict -2 -ar 44100 -b:a 128k -af aresample=async=1 -c:v h264_vaapi -vf format=nv12|vaapi,hwupload -preset medium -maxrate 14000k -bufsize 14000k -pix_fmt yuv420p -r 60 -crf 25 -g 120 -tune zerolatency -f flv rtmp://ingest.bingewave.com/live/[output_to_livestream] -pix_fmt yuv420p -r 60 -b:v 15000k -maxrate 15000k -bufsize 15000k -c:v h264_vaapi -vf format=nv12|vaapi,hwupload -preset medium -keyint_min 24 -level 3.0 -g 120 -tune zerolatency -f flv rtmp://127.0.0.1:1935/live/[output_to_recording]&#xA;

    &#xA;

    The reason why my fps and bitrate is so high and preset is so medium is because Glitch is an open source esports platform, and those kinds of settings are required for streaming of game graphics&#xA;The command has two outputs :

    &#xA;

      &#xA;
    • rtmp ://[output_to_livestream] goes to a livestream where users watch live
    • &#xA;

    • rtmp ://127.0.0.1:1935/live/[output to recording] goes a goes to a file
    • &#xA;

    &#xA;

    And the output to the recording is captured by nginx and saved to a file as such :

    &#xA;

    rtmp {&#xA;    server {&#xA;        listen 1935;&#xA;        chunk_size 4096;&#xA;&#xA;        application live {&#xA;            live on;&#xA;            #Set this to "record off" if you don&#x27;t want to save a copy of your broadcasts&#xA;            record all;&#xA;            # The directory in which the recordings will be stored.&#xA;            record_path /var/www/html/recordings;&#xA;            record_unique on;&#xA;            record_suffix -%d-%b-%y-%T.flv;&#xA;            on_record_done http://127.0.0.1:3000/recorded;&#xA;            # Turn on HLS&#xA;            exec /usr/bin/ffmpeg -vaapi_device /dev/dri/renderD128 -i rtmp://127.0.0.1:1935/live/$name -c:v copy -c:a copy -f flv rtmp://127.0.0.1/show/$name;&#xA;        }&#xA;&#xA;        application show {&#xA;            live on;&#xA;            # Turn on HLS&#xA;            hls on;&#xA;            hls_path /mnt/hls/;&#xA;            hls_fragment 3;&#xA;            hls_playlist_length 60;&#xA;            # disable consuming the stream from nginx as rtmp&#xA;            deny play all;&#xA;        }&#xA;    }&#xA;}&#xA;

    &#xA;

    So the part that goes to the live is fine, no green flickering at all. But the part that goes to the recording is one that goes the above issue :

    &#xA;

    -pix_fmt yuv420p -r 60 -b:v 15000k -maxrate 15000k -bufsize 15000k -c:v h264_vaapi -vf format=nv12|vaapi,hwupload -preset medium -keyint_min 24 -level 3.0 -g 120 -tune zerolatency -f flv rtmp://127.0.0.1:1935/live/[output_to_recording]&#xA;

    &#xA;

    I&#xA;s there something I need to be changing here ?

    &#xA;

  • Python and ffmpeg audio sync and screen recording issues

    9 août 2020, par odddollar

    I'm using ffmpeg and python to record my desktop screen. When the program is run, it starts recording, then when I press a key-combo it cuts off the last x amount of seconds and saves it then starts recording again ; similar to the "record that" functionality of windows game bar.

    &#xA;

    I have it working so it records video just fine, but then I change the ffmpeg command to record audio from my desktop and I get an error saying ValueError: could not convert string to float: &#x27;N/A&#x27; occurring when I try to calculate the length of the recorded video. It appears as though the recording isn't being stopped until after I try to calculate the video length, even though this exact same code works fine when not recording audio.

    &#xA;

    Additionally, I also have an issue when recording audio in that the audio is a couple hundred milliseconds in front of the video. It's not a lot but it's enough to be noticeable.

    &#xA;

    What I'm overall asking, is there a way I can modify the ffmpeg command to prevent the audio desync issues, and what might be causing the problems I'm getting when attempting to find the length of the video with audio ?

    &#xA;

    import keyboard, signal&#xA;from os import remove&#xA;from os.path import isfile&#xA;from subprocess import Popen, getoutput&#xA;from datetime import datetime&#xA;import configparser&#xA;&#xA;class Main:&#xA;    def __init__(self, save_location, framerate, duration):&#xA;        self.save_location = save_location&#xA;        self.framerate = int(framerate)&#xA;        self.duration = int(duration)&#xA;        self.working = self.save_location &#x2B; &#x27;\\&#x27; &#x2B; &#x27;working.avi&#x27;&#xA;        self.start_recording()&#xA;&#xA;    def start_recording(self):&#xA;        if isfile(self.working):&#xA;            remove(self.working)&#xA;&#xA;        # start recording to working file at set framerate&#xA;        self.process = Popen(f&#x27;ffmpeg -thread_queue_size 578 -f gdigrab -video_size 1920x1080 -i desktop -f dshow -i audio="Stereo Mix (Realtek High Definition Audio)" -b:v 7M -minrate 4M -framerate {self.framerate} {self.working}&#x27;)&#xA;        #self.process = Popen(f&#x27;ffmpeg -f gdigrab -framerate {self.framerate} -video_size 1920x1080 -i desktop -b:v 7M -minrate 2M {self.working}&#x27;)&#xA;&#xA;    def trim_video(self):&#xA;        # stop recording working file&#xA;        self.process.send_signal(signal.CTRL_C_EVENT)&#xA;&#xA;        # call &#x27;cause I have to&#xA;        getoutput(f"ffprobe -i {self.working}")&#xA;&#xA;        # get length of working video&#xA;        length = getoutput(f&#x27;ffprobe -i {self.working} -show_entries format=duration -v quiet -of csv="p=0"&#x27;)&#xA;&#xA;        # get time before desired recording time&#xA;        start = float(length) - self.duration&#xA;&#xA;        # get save location and title&#xA;        title = self.save_location&#x2B;&#x27;\\&#x27;&#x2B;self.get_time()&#x2B;&#x27;.avi&#x27;&#xA;&#xA;        # cut to last amount of desired time&#xA;        Popen(f"ffmpeg -ss {start} -i {self.working} -c copy -t {self.duration} {title}")&#xA;        getoutput(f"ffprobe -i {self.working}")&#xA;&#xA;        self.start_recording()&#xA;&#xA;    def get_time(self):&#xA;        now = datetime.now()&#xA;        return now.strftime("%Y_%m_%d#%H-%M-%S")&#xA;&#xA;&#xA;if __name__ == "__main__":&#xA;    config = configparser.ConfigParser()&#xA;    config.read("settings.ini")&#xA;    config = config["DEFAULT"]&#xA;&#xA;    run = Main(config["savelocation"].replace("\\", "\\\\"), config["framerate"], config["recordlast"])&#xA;    keyboard.add_hotkey("ctrl&#x2B;shift&#x2B;alt&#x2B;g", lambda:run.trim_video())&#xA;&#xA;    while True:&#xA;        try:&#xA;            keyboard.wait()&#xA;        except KeyboardInterrupt:&#xA;            pass&#xA;

    &#xA;

    The contents of the settings.ini file are listed below

    &#xA;

    [DEFAULT]&#xA;savelocation = C:\&#xA;framerate = 30&#xA;recordlast = 10&#xA;

    &#xA;

    In the code block, the first line with self.process = Popen is the one that records audio and has the issues, the second line (the commented out one below) is the one that works fine.

    &#xA;