Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (31)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (6389)

  • receive a ffmpeg live streaming with a golang server and echo to a websocket conn

    28 juillet 2017, par Lucas Carvalho

    I’m writing a server in go and need to get a cam video in a ffmpeg client and passes the streaming to websocket users.

    But in my code, the http body received from the ffmpeg client is loaded by a ioutil.ReadAll and cannot make a live broadcast because the body is receiving new values with the video capture.
    How i can take the last frame of the video, send to the websockets, clean the variable and receive the new frame correctly (or i’m doing in the wrong way) ?

    Here is my code to this function :

    //StartClientStream needs a email$clientName$streamName
    func StartClientStream(w http.ResponseWriter, r *http.Request) {

       values := strings.Split(string(mux.Vars(r)["rest"]), "$")

       if len(values) != 3 {
           w.Write([]byte(`{"err":"the passed value does not match with necessary fields"}`))
           return
       }
       //Get user ID
       id, _ := getID(values[0])
       //Take the streaming ClientName
       clientName := id + " - " + values[1]
       //Take the passed Body
       body, _ := ioutil.ReadAll(r.Body)
       //Watch for websockets requests for this video
       for user := range Streaming.User[clientName] {
           conexoes := strings.Split(Streaming.User[clientName][user], "-")
           for c := range conexoes {
               if strings.EqualFold(conexoes[c], values[2]) {
                   //Send the video
                   user.send <- body
               }
           }
       }

    }
  • Streaming from Icecast to Facebook Live with ffmpeg on Ubuntu 16.04

    24 juillet 2017, par Matthieu

    I have a webradio streamed by Liquidsoap+Icecast on a DigitalOcean droplet (Ubuntu 16.04), and I want to combine this audio stream with a simple jpeg image with ffmpeg, transform it to a video stream and send it to Facebook live.

    Facebook Live specifications :

    Video Format :

    We accept video in maximum 720p (1280 x 720) resolution, at 30 frames
    per second. (or 1 key frame every 2 seconds). You must send an I-frame
    (keyframe) at least once every two seconds throughout the stream..
    Recommended max bit rate is 4000 Kbps. Titles must be less than 255
    characters otherwise the stream will fail. The Live API accepts H264
    encoded video and AAC encoded audio only.

    Video Length :

    240 minute maximum length, with the exception of continuous live (see
    above). 240 minute maximum length for preview streams (either through
    Live dialog or publisher tools). After 240 minutes, a new stream key
    must be generated.

    Advanced Settings :

    Pixel Aspect Ratio : Square. Frame Types : Progressive Scan. Audio
    Sample Rate : 44.1 KHz. Audio Bitrate : 128 Kbps stereo. Bitrate
    Encoding : CBR.

    And the ffmpeg command I tried :

    ffmpeg -loop 1 -i radio-background.jpg -thread_queue_size 20480 -i http://localhost:8000/radio -framerate 30 -r 30 -acodec aac -strict -2 -c:v libx264 -strict experimental -b:a 128k -pix_fmt yuvj444p -x264-params keyint=60 -b:v 256k -minrate 128k -maxrate 512k -bufsize 768k -f flv 'rtmp://rtmp-api.facebook.com:80/rtmp/'

    This is actually working, as Facebook receives the live video and allows me to publish it. But I can’t figured out why there is a lag almost every 2 or 3 seconds. I asked different people to watch the test video, and everyone gets the same problem : every 2 or 3 seconds the playing "freezes" for half a second and seems to load the video, I even can see the loading icon spinning on the screen.

    I tried different combinations of values for the following options : -thread_queue_size / -b:v / -minrate / -maxrate / -bufsize. Nothing seems to produce any change.

    Video streaming is new for me, I’m not really confortable with the options listed before, so I think I’m missing something here...

    Also, note that the icecast audio stream perfectly works, and according to DigitalOcean graphs, the server is not overloaded. So I think my ffmpeg command is wrong.

    What ffmpeg parameters would be working for that case ?

  • Creating a PowerShell Streamer Function w/youtube-dl, ffmpeg & ffplay

    11 juillet 2017, par 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