Recherche avancée

Médias (91)

Autres articles (56)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    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 (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 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 (...)

Sur d’autres sites (7708)

  • Piping pi's opencv video to ffmpeg for Youtube streaming

    15 juin, par Mango Plaster

    This is a small python3 script reading off picam using OpenCV :

    


    #picamStream.py

import sys, os
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2
 
# initialize the camera and grab a reference to the raw camera capture
camera = PiCamera()
camera.resolution = (960, 540)
camera.framerate = 30
rawCapture = PiRGBArray(camera, size=(960, 540))
 
# allow the camera to warmup
time.sleep(0.1)
 
# capture frames from the camera
for frame in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True):

    image = frame.array
 
    # ---------------------------------
    # .
    # Opencv image processing goes here
    # .
    # ---------------------------------

    os.write(1, image.tostring())
 
    # clear the stream in preparation for the next frame
    rawCapture.truncate(0)

# end


    


    And I am trying to pipe it to ffmpeg to Youtube stream

    


    My understanding is that I need to reference below two commands to somehow come up with a new ffmpeg command.

    


    


    Piping picam live video to ffmpeg for Youtube streaming.

    


    raspivid -o - -t 0 -vf -hf -w 960 -h 540 -fps 25 -b 1000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/[STREAMKEY]

    


    


    


    Piping OPENCV raw video to ffmpeg for mp4 file.

    


    python3 picamStream.py | ffmpeg -f rawvideo -pixel_format bgr24 -video_size 960x540 -framerate 30 -i - foo.mp4

    


    


    So far I've had no luck. Can anyone help me with this ?

    


  • Downloading videos one by one with youtube-dl

    9 août 2019, par 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 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