Advanced search

Medias (91)

Other articles (76)

  • MediaSPIP version 0.1 Beta

    16 April 2011, by

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 September 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Mise à jour de la version 0.1 vers 0.2

    24 June 2013, by

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1); Installation des dépendances pour Smush; Installation de MediaInfo et FFprobe pour la récupération des métadonnées; On n’utilise plus ffmpeg2theora; On n’installe plus flvtool2 au profit de flvtool++; On n’installe plus ffmpeg-php qui n’est plus maintenu au profit de (...)

On other websites (8120)

  • Downloading videos one by one with youtube-dl

    9 August 2019, by puter

    Im trying to execute the youtube-dl download command from node which is asynchronous and I have a bunch of videos that gets downloaded each time so I want to execute the downloadClip command as soon as each one finishes. How do I call this function in a chain like fashion so that only one video gets downloaded at a time?

    var downloadClip = function( videoID, channelPath ) {
       var args = [
           '-o', config.fileName,
           '--download-archive', channelPath + '/' + config.archiveFile,
       ];

       var options = {
           cwd: channelPath
       };

       return new Promise( function( resolve, reject ) {
           ytdl.exec( videoID, args, options, function( err, output ) {
               if ( err ) {
                   reject( err );
               } else {
                   resolve( output );
               }
           } );
       } );
    };
  • Creating a PowerShell Streamer Function w/youtube-dl, ffmpeg & ffplay

    11 July 2017, by Adam Chilcott

    My question is in regards to combining youtube-dl, ffmpeg, ffplay and PowerShell to handle video URLs.

    Some examples I’ve seen have piped a binary stream from youtube-dl to an external player using the Windows Command Prompt as demonstrated:

    youtube-dl --output - "https://youtube.com/mygroovycontent" | mpc-hc.exe /play /close -

    This works fine in Command Prompt as it does not mangle the binary stream. If you try and run the same command in PowerShell it doesn’t handle the binary stream so well and modifies the output, making it unreadable to the external player.

    In light of this I’ve written the following PowerShell function to get around this issue. It tries to mirror a similar function I’ve written in Bash (See: https://github.com/adamchilcott/.dotfiles/blob/master/.bash_functions.d/streamer.sh)

    The reason I’ve handled youtube-dl, ffmpeg and ffplay seperately is that defining the ffmpeg binary location in youtube-dl as an external program creates some issues when passing it in PowerShell.

    I was hoping that someone could take a look at my script and provide some feedback on what I have done here and if it can be improved upon or if a better implementation is already available?

    Best,

    Adam.

    BEGIN POWERSHELL

    Function streamer
    {

    Param
    (
    [string] $streamURL
    )

    Begin
    {
    }

    Process
    {
    $streamDir = "$env:TEMP\YTD.d"

    $ytdBin = "Z:\PortableApps\CommandLineApps\youtube-dl\youtube-dl.exe"
    $streamExtractor = &$ytdBin --no-warnings --get-url $streamURL

    $ffmpegBin = "Z:\PortableApps\CommandLineApps\ffmpeg-20170702-c885356-win64-static\bin\ffmpeg.exe"
    $ffplayBin = "Z:\PortableApps\CommandLineApps\ffmpeg-20170702-c885356-win64-static\bin\ffplay.exe"

    if
    (
    -not (Test-Path -Path $streamDir -PathType Any)
    )

    {
    New-Item $streamDir -type directory -ErrorAction SilentlyContinue
    }

    Start-Process -FilePath $ffmpegBin -ArgumentList "-loglevel quiet -i $streamExtractor -c copy $streamDir\streamContainer.m2ts" -NoNewWindow -ErrorAction SilentlyContinue

    Do
    {
    Start-Sleep -Seconds 1
    }

    Until
    (
    (Get-Item $streamDir\streamContainer.m2ts -ErrorAction SilentlyContinue).Length -gt 256kb
    )

    &$ffplayBin -loglevel quiet $streamDir\streamContainer.m2ts

    if
    (
    (Test-Path -Path $streamDir -PathType Any) -eq $true -and (Get-Process -Name ffplay -ErrorAction SilentlyContinue) -eq $null
    )

    {

    Do
    {
    Stop-Process -Name ffmpeg -ErrorAction SilentlyContinue
    }

    Until
    (
    (Get-Process -Name ffmpeg -ErrorAction SilentlyContinue) -eq $null
    )

    Remove-Item $streamDir -Recurse -ErrorAction SilentlyContinue
    }
    }

    End
    {
    }

    }

    streamer -streamURL https://www.youtube.com/watch?v=9uFXw7vKz14

    END POWERSHELL

  • FFMPEG YouTube Live Too Fast

    6 April 2017, by Liam Martens

    So I am streaming video and audio to YouTube as follows

    THE CONTEXT

    1. First I convert a graphic GIF to an MP4 file

    ffmpeg -f gif -i graphic.gif -c:v libx264 -pix_fmt yuv420p -vf scale=1280:-1 temp.mp4

    2. Then I overlay a PNG with text over the MP4

    ffmpeg -i temp.mp4 -i overlay.png -filter_complex "overlay=10:10" '.$graphicsPath.'/graphic.mp4

    3. Then I start the stream the video and combine it with audio using following code (sources.txt is just a concat list *)

    ffmpeg -f concat -i sources.txt -i music.mp3 \
       -c:v libx264 -c:a aac -shortest -deinterlace \
       -pix_fmt yuv420p -preset '.$encoding.' -r 30 -g 60 -b:v 2500k \
       -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 \
       -maxrate 800k -bufsize 1400k \
       -f flv rtmp://a.rtmp.youtube.com/live2/KEY

    4. After the stream ends, the code starts over again with a new song to mimic a 247 stream.

    THE ISSUE

    So the issue I am having is that it appears to be streaming too fast. It’s like the opposite of buffering issues where the buffer is way too long (as in a full song buffered by the time the first one has finished if you open the stream)

    Does anyone know how I could throttle the output? I have tried with maxrate and bufsize but no real result.

    * sources.txt example
    file ’graphic.mp4’
    file ’graphic.mp4’
    file ’graphic.mp4’
    file ’graphic.mp4’
    file ’graphic.mp4’
    file ’graphic.mp4’
    and so on