Recherche avancée

Médias (91)

Autres articles (40)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (4305)

  • Rolling screen capture with ffmpeg on windows

    11 décembre 2020, par gap210

    I have the following code to capture a video stream from my webcam. I use ffmpeg to write to named windows pipe, then read it with python and display with opencv. The thing is that the opencv stream is 'rolling' as shown here https://www.youtube.com/watch?v=H78TRo3DZIo

    


    If I capture the output to a video instead of a pipe, with the command :

    


    ffmpeg -f dshow -video_size 1920x1080 -framerate 60 -i video="USB Video" -c:v copy out.avi

    


    everything looks fine. What should I change to achieve the desired effect ? (non-rolling stream)

    


    My code below :

    


    import cv2
import time
import subprocess
import numpy as np

w, h = 800, 600

# Get frame generator
gen = ffmpegGrab()

# Get start time
start = time.time()

# Read video frames from ffmpeg in loop
nFrames = 0
cmd = 'C:/Users/......./Downloads/ffmpeg-4.3.1-2020-11-19-full_build/bin/ffmpeg.exe -f dshow -framerate 60 -video_size 800x600 -i video="USB Video" -pix_fmt bgr24 -vcodec rawvideo -f image2pipe -'

proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, bufsize=10**9)
while True:
    # Read next frame from ffmpeg

    frame = proc.stdout.read(w * h * 3)
    frame = np.frombuffer(frame, dtype=np.uint8).reshape((h, w, 3))
    cv2.imshow('screenshot', frame)

    if cv2.waitKey(1) == ord("q"):
        break

    fps = nFrames / (time.time() - start)
    print(f'FPS: {fps}')

cv2.destroyAllWindows()


    


  • Problems with ffmpeg input filenames when using bash script

    25 septembre 2020, par Nick Styles

    I'm trying to use ffmpeg to convert some .m4a audio files to .mp3, and have come across something that has me stumped. I'd like to create the .mp3 in the same location and with the same filename as the .m4a, and so I'm using a combination of find/exec and a bash script to do this, as follows :

    


    find /Volumes/Untitled/ -name '[!.]*' -name '*.m4a' -exec ./m4atomp3.sh {} \;


    


    where m4atomp3.sh looks like :

    


    #!/usr/bin/env bash
[[ -f "$1" ]] || { echo "$1 not found" ; exit 1 ; }
P="$1"
echo "$P is the full filename"
filename=${P%.*}
echo "$filename is the stripped filename"
m4afilename=\"$filename.m4a\"
echo "$m4afilename is the input filename"
mp3filename=\"$filename.mp3\"
echo "$mp3filename is the output filename"
mycmd="/Users/nickstyles/Downloads/ffmpeg -i "$m4afilename" -codec:a libmp3lame -qscale:a 2  -nostdin "$mp3filename
echo $mycmd
$mycmd


    


    Whenever I try this, it fails because ffmpeg doesn't find the file, seemingly because of the whitespace in the filename, e.g if the file was called /Volumes/Untitled/My M4As/My M4A.m4a I would see :

    


    ffmpeg version N-99346-g003b5c800f-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)

[configuration details]

"/Volumes/Untitled/My: No such file or directory


    


    However, if I just paste what is returned by echo $mycmd into the command line, e.g :

    


    /Users/nickstyles/Downloads/ffmpeg -i "/Volumes/Untitled/My M4As/My M4A.m4a" -codec:a libmp3lame -qscale:a 2 -nostdin "/Volumes/Untitled/My M4As/My M4A.mp3"


    


    then it works absolutely fine. I'm sure I'm missing something very obvious, which hopefully someone can spot !

    


  • ffmpeg capturing image from rtmp stream

    14 juin 2020, par Lewis Day

    I am passing this command via ssh ;

    



        $rtmp_address = 'rtmp://198.251.69.110/live/';
    $stream_link = "" . $rtmp_address . "" . $stream_key . "";
echo $ssh->exec('ffmpeg -i "' . $stream_link . ' live=1" -f image2 -vcodec png -vframes 1 -s 180x145 -compression_level 100 /var/www/vhosts/flamingocams.net/httpdocs/images/' . $username . '.png -y');


    



    however getting this response ;

    



    


    ffmpeg version N-53084-gd29aaf12f4-static
 https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2020 the FFmpeg
 developers built with gcc 8 (Debian 8.3.0-6) configuration :
 —enable-gpl —enable-version3 —enable-static —disable-debug —disable-ffplay —disable-indev=sndio —disable-outdev=sndio —cc=gcc —enable-fontconfig —enable-frei0r —enable-gnutls —enable-gmp —enable-libgme —enable-gray —enable-libaom —enable-libfribidi —enable-libass —enable-libvmaf —enable-libfreetype —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-librubberband —enable-libsoxr —enable-libspeex —enable-libsrt —enable-libvorbis —enable-libopus —enable-libtheora —enable-libvidstab —enable-libvo-amrwbenc —enable-libvpx —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxml2 —enable-libdav1d —enable-libxvid —enable-libzvbi —enable-libzimg libavutil 56. 50.100 / 56. 50.100 libavcodec 58. 90.100 / 58. 90.100 libavformat 58. 44.100 / 58. 44.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 84.100 / 7. 84.100 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [rtmp @ 0x730fe40] Detected librtmp style URL parameters, these aren't supported by the
 libavformat internal RTMP handler currently enabled. See the
 documentation for the correct way to pass parameters.

    


    



    could anyone help with what is going wrong.