Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (111)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (12511)

  • Use ffmpeg to create a music video with the cover on a black background

    21 septembre 2020, par user6329530

    I am trying to use this tutorial to create youtube videos with ffmpeg
https://trac.ffmpeg.org/wiki/Encode/YouTube

    


    When using this example, I get a video that works however the background is white

    


    ffmpeg -loop 1 -framerate 2 -i albumcover.png -i audio.wav -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p output.mkv


    


    I tried to add a color filter but that makes the whole video output black :

    


    ffmpeg -loop 1 -framerate 2 -i albumcover.png -filter_complex "color=s=1920x1080:c=black" -i audio.wav -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p output.mkv


    


    I find it very difficult to find something about this on the internet as most ask for just a black video or a transparent background for a gif ect.

    


    So how do I get the albumcover.png on a black background ?

    


    EDIT : I just realized that the video format is of course the image format (square) and therefore it's white on youtube. The question therefore is now how do I create a black background 16:9 and put the albumcover centered on it...

    


  • Problem when adding background music to video without sound

    27 avril 2020, par Nguyễn Trọng

    I am trying to cut a piece of background music and loop them into a video and change the speed of the video with the command below.

    



     String[] cmd = {"-y", "-i", input, "-i", shortsound,
            "-filter_complex",
            "[0:v]trim=0:120,setpts=1/2*(PTS-STARTPTS)[v1]," +
                    "[0:v]trim=120:240,setpts=1/2*(PTS-STARTPTS)[v2];" +
                    "[1:a]atrim=0:6,asetpts=PTS-STARTPTS," +
                    "asetrate=44100,aloop=-1:2e+09," +
                    "aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=1.0[bg];" +
                    "[0:a]atrim=0:120,asetpts=PTS-STARTPTS,atempo=2.0" +
                    ",aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo[a1]," +
                    "[0:a]atrim=120:240,asetpts=PTS-STARTPTS,atempo=2.0," +
                    "aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo[a2];" +
                    "[v1][a1][v2][a2]concat=n=2:v=1:a=1[video][audio];[audio]volume=0.5[avolume];" +
                    "[avolume][bg]amerge=2,pan=stereo|c0code>

    



    Everything was fine until I tried with a video without sound, it didn't work.
How when input is a video without sound ?

    


  • I am streaming mp3 music via ffmpeg to a local rtmp server then converting to hls, but am having difficulties end to end testing

    12 avril 2020, par SquirrelSenpai

    I am streaming mp3 music via ffmpeg to a local rtmp server then converting to hls, but am having difficulties end to end testing. I am know test.m3u8 playlist should be produce, however I am unable to check inside /nginx/hls/ as it is locked by www-data during operation. I have tried multiple permutation of what I thought the output hls stream would be in vlc with no luck. localhost:8080/live/test.m3u8, localhost:8080/hls/test.m3u8

    



    Any tips on effective testing would be much appreciated.

    



    Technologies involved :

    



      

    • FFMPEG
    • 


    • NGINX (This and the below 3 are part of a module)
    • 


    • HLS
    • 


    • RTMP
    • 


    



    Working :

    



    ffmpeg -hide_banner -i http://149.255.59.164:8138 -f mp3 test.mp3


    



    Seemingly working, correctly reads files, shows conversion of some kind
    
size= 362kB time=00:00:23.09 bitrate= 128.3kbits/s speed=3.21x

    



    fmpeg -hide_banner -i http://x.x.x.x:8138 -f mp3 rtmp://localhost:1935/live/test


    



    Nginx.conf

    



    user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

rtmp_auto_push on;

rtmp{

        server{

                listen 1935;

                chunk_size 4000;

                #one publisher, many subscribers

                application live {

                        # enable live streaming
                        live on;
                        record off;

                        # publish only from localhost
                        allow publish 127.0.0.1;
                        deny publish all;

                        # hls - required for web browser consumption
                        hls on;
                        hls_path /tmp/hls;
                        hls_fragment 3;
                        hls_playlist_length 60;

                        # disable consuming the streaming from nginx as rtmp
                        deny play all;

                }

        }

}

# HTTP can be used for accessing RTMP stats
http {

    server {

        listen      8080;

        # This URL provides RTMP statistics in XML
        location /stat {
            rtmp_stat all;

            # Use this stylesheet to view XML as web page
            # in browser
            rtmp_stat_stylesheet stat.xsl;
        }

        location /stat.xsl {
            # XML stylesheet to view RTMP stats.
            # Copy stat.xsl wherever you want
            # and put the full directory path here
            root /path/to/stat.xsl/;
        }

        location /hls {
            # Serve HLS fragments
            types {
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }
            root /tmp;
            add_header Cache-Control no-cache;
        }

        location /dash {
            # Serve DASH fragments
            root /tmp;
            add_header Cache-Control no-cache;
        }
    }
}