Recherche avancée

Médias (91)

Autres articles (95)

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

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

Sur d’autres sites (6677)

  • ffmpeg creates empty mpd-file

    1er avril 2021, par Macster

    I'm trying to live stream a webm file using ffmpeg and Dash.js as a Player. Creating chunks with ffmpeg seems to work fine, but when want to create the manifest it says Could not find codec parameters for stream 0 (Video: vp9, none, 640x480): unspecified pixel format Consider increasing the value for the 'analyzeduration' and 'probesize' options and at the end Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used).

    


    Commands I use

    


    ffmpeg -re -r 25 -i Dash/strm.webm
 -map 0:v:0
 -pix_fmt yuv420p
 -c:v libvpx-vp9
 -s 640x480 -keyint_min 25 -g 25 
 -speed 6 -threads 8 -static-thresh 0 -max-intra-rate 300 
 -deadline realtime -lag-in-frames 0 -error-resilient 1
 -f webm_chunk 
 -header "Dash/glass_360.hdr"
 -chunk_start_index 1
 Dash\glass_360_%d.chk


    


    Manifest

    


    ffmpeg ^
 -f webm_dash_manifest -live 1
 -r 25
 -i Dash/glass_360.hdr
 -c copy
 -map 0
 -r 25
 -framerate 25
 -f webm_dash_manifest -live 1
 -adaptation_sets "id=0,streams=0"
 -chunk_start_index 1
 -chunk_duration_ms 1000
 -time_shift_buffer_depth 7200
 -minimum_update_period 7200
 Dash/glass_live_manifest.mpd


    


    Manifest Output

    


     libavutil      56. 49.100 / 56. 49.100
  libavcodec     58. 87.101 / 58. 87.101
  libavformat    58. 43.100 / 58. 43.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 83.100 /  7. 83.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[webm_dash_manifest @ 0000015f19f2ea40] Could not find codec parameters for stream 0 (Video: vp9, none, 640x480): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, webm_dash_manifest, from 'Dash/glass_360.hdr':
  Metadata:
    ENCODER         : Lavf58.43.100
  Duration: N/A, bitrate: N/A
    Stream #0:0(eng): Video: vp9, none, 640x480, SAR 1:1 DAR 4:3, 1k tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ALPHA_MODE      : 1
      ENCODER         : Lavc58.87.101 libvpx-vp9
      webm_dash_manifest_file_name: glass_360.hdr
      webm_dash_manifest_track_number: 1
Output #0, webm_dash_manifest, to 'stream_manifest.mpd':
  Metadata:
    encoder         : Lavf58.43.100
    Stream #0:0(eng): Video: vp9, none, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 1k tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ALPHA_MODE      : 1
      ENCODER         : Lavc58.87.101 libvpx-vp9
      webm_dash_manifest_file_name: glass_360.hdr
      webm_dash_manifest_track_number: 1
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=-1.0 Lsize=       1kB time=00:00:00.00 bitrate=N/A speed=   0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)


    


    glass_live_manifest.mpd

    


    &lt;?xml version="1.0" encoding="UTF-8"?>&#xA;&#xA;<period start="PT0S">&#xA;<adaptationset mimetype="video/webm" codecs="vp9" lang="eng" bitstreamswitching="true" subsegmentalignment="true" subsegmentstartswithsap="1">&#xA;<contentcomponent type="video"></contentcomponent>&#xA;<segmenttemplate timescale="1000" duration="1000" media="glass_$RepresentationID$_$Number$.chk" startnumber="1" initialization="glass_$RepresentationID$.hdr"></segmenttemplate>&#xA;<representation bandwidth="1000000" width="640" height="480" codecs="vp9" mimetype="video/webm" startswithsap="1"></representation>&#xA;</adaptationset>&#xA;</period>&#xA;&#xA;

    &#xA;

    UPDATE

    &#xA;

    I fixed the "warnings" by changing the comands like this :

    &#xA;

    ffmpeg -re -r 25 -i Dash/strm.webm&#xA;-map 0:v:0&#xA;-pix_fmt yuv420p&#xA;-c:v libvpx&#xA;-s 640x480 -keyint_min 60 -g 60 -speed 6 -tile-columns 4 -frame-parallel 1 -threads 8 -static-thresh 0 -max-intra-rate 300 -deadline realtime -lag-in-frames 0 -error-resilient 1&#xA;-b:v 3000k&#xA;-f webm_chunk&#xA;-header "Dash/glass_360.hdr"&#xA;-chunk_start_index 1 Dash/glass_360_%d.chk&#xA;-map 0:a:0&#xA;-c:a libvorbis&#xA;-b:a 128k -ar 44100&#xA;-f webm_chunk&#xA;-audio_chunk_duration 2000&#xA;-header Dash/glass_171.hdr&#xA;-chunk_start_index 1 Dash/glass_171_%d.chk&#xA;&#xA;ffmpeg&#xA;-f webm_dash_manifest -live 1&#xA;-i Dash/glass_360.hdr&#xA;-f webm_dash_manifest -live 1&#xA;-i Dash/glass_171.hdr&#xA;-c copy&#xA;-map 0 -map 1&#xA;-f webm_dash_manifest -live 1&#xA;-adaptation_sets "id=0,streams=0 id=1,streams=1"&#xA;-chunk_start_index 1&#xA;-chunk_duration_ms 2000&#xA;-time_shift_buffer_depth 7200&#xA;-minimum_update_period 7200 Dash/glass_video_manifest.mpd&#xA;

    &#xA;

    However, it's still not working.

    &#xA;

  • How to record from webcam using ffmpeg with precise time information of when it was taken ?

    27 février 2021, par Trac3rZ

    I need to record from my 2 webcams and output each frame recorded into images. An additional requirement is I need the time when the image is captured (it has to be precise up to around 10 milliseconds)

    &#xA;

    Things I've tried :

    &#xA;

    ffmpeg -y -f video4linux2 -r $frame_rate -i /dev/video0 -vframes 100 -strftime 1 cam0_"%H-%M-%S".png &amp;&#xA;ffmpeg -y -f video4linux2 -r $frame_rate -i /dev/video1 -vframes 100 -strftime 1 cam1_"%H-%M-%S".png&#xA;

    &#xA;

    This is only good up to a second, so if 2 images are taken within 1 second, 1 is overwritten.

    &#xA;

    for i in [1..100]&#xA;    ffmpeg -y -f video4linux2 -r $frame_rate -i /dev/video0 -vframes 1 -strftime 1 cam0_%5d.png&#xA;    date &#x2B;%s%3N >> time.txt&#xA;

    &#xA;

    Then 2 scripts are run in parallel. The timing is now precise up to a millisecond but this degrades the performance a lot since ffmpeg has to be initialized again each time I call the script.

    &#xA;

    I also tried this

    &#xA;

    ffmpeg -f video4linux2 -pixel_format yuv420p -timestamps abs -copyts \&#xA;   -i /dev/video0 -vf setpts=PTS-STARTPTS -vsync 0 -vframes 10 \&#xA;   camera0-%5d.jpeg -c copy -vsync 0 -vframes 10 -f mkvtimestamp_v2 timings.txt&#xA;

    &#xA;

    And here's timings.txt

    &#xA;

    1614427227518&#xA;1614427227718&#xA;1614427227818&#xA;1614427227918&#xA;1614427228018&#xA;1614427228118&#xA;1614427228218&#xA;1614427228318&#xA;1614427228418&#xA;1614427228518&#xA;

    &#xA;

    This is good up to 100ms.

    &#xA;

    Is there any better way to do this ?

    &#xA;

  • how to make work opencv with FFMPEG driver

    14 janvier 2021, par user3313834

    I have a camera on my linuxbox it is working well :

    &#xA;

    # $ ls -al /dev/video*&#xA;# crw-rw----&#x2B; 1 root video 81, 0 janv.  8 16:13 /dev/video0&#xA;# crw-rw----&#x2B; 1 root video 81, 1 janv.  8 16:13 /dev/video1&#xA;# $ groups&#xA;# adm cdrom sudo dip video plugdev lpadmin lxd sambashare docker libvirt&#xA;

    &#xA;

    From python with cv2 it work well with the default driver CAP_V4L2

    &#xA;

    >>> from pathlib import Path&#xA;>>> import cv2&#xA;>>> print(cv2.VideoCapture(0, apiPreference=cv2.cv2.CAP_V4L2).isOpened())&#xA;True&#xA;>>>&#xA;

    &#xA;

    I would like to access it with the FFMPEG driver (no success) :

    &#xA;

    >>> print(cv2.VideoCapture(0, apiPreference=cv2.CAP_FFMPEG).isOpened())&#xA;False&#xA;>>>&#xA;

    &#xA;

    From Python side the opencv look like to have the FFMPEG Driver :

    &#xA;

      >>> cv2.__version__&#xA;  &#x27;4.4.0&#x27;&#xA;  >>> info = cv2.getBuildInformation()&#xA;  >>> video, parallel = info.index(&#x27;Video&#x27;), info.index(&#x27;Parallel&#x27;)&#xA;  >>> print(info[video:parallel])&#xA;  Video I/O:&#xA;       DC1394:                      NO&#xA;       FFMPEG:                      YES&#xA;         avcodec:                   YES (58.109.100)&#xA;         avformat:                  YES (58.61.100)&#xA;         avutil:                    YES (56.60.100)&#xA;         swscale:                   YES (5.8.100)&#xA;         avresample:                NO&#xA;       GStreamer:                   NO&#xA;       v4l/v4l2:                    YES (linux/videodev2.h)&#xA;  >>>&#xA;

    &#xA;

    From Linux side look ok too :

    &#xA;

    $ dpkg -l |grep -i opencv&#xA;ii  libopencv-core4.2:amd64                    4.2.0&#x2B;dfsg-5                          amd64        computer vision core library&#xA;ii  libopencv-imgcodecs4.2:amd64               4.2.0&#x2B;dfsg-5                          amd64        computer vision Image Codecs library&#xA;ii  libopencv-imgproc4.2:amd64                 4.2.0&#x2B;dfsg-5                          amd64        computer vision Image Processing library&#xA;ii  libopencv-videoio4.2:amd64                 4.2.0&#x2B;dfsg-5                          amd64        computer vision Video I/O library&#xA;&#xA;$ dpkg -l |grep -i ffm&#xA;ii  ffmpeg                                     7:4.2.4-1ubuntu0.1                    amd64        Tools for transcoding, streaming and playing of multimedia files&#xA;ii  gstreamer1.0-libav:amd64                   1.16.2-2                              amd64        ffmpeg plugin for GStreamer&#xA;ii  libavcodec-extra:amd64                     7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library with extra codecs (metapackage)&#xA;ii  libavcodec-extra58:amd64                   7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library with additional de/encoders for audio/video codecs&#xA;ii  libavdevice58:amd64                        7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library for handling input and output devices - runtime files&#xA;ii  libavfilter7:amd64                         7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library containing media filters - runtime files&#xA;ii  libavformat58:amd64                        7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library with (de)muxers for multimedia containers - runtime files&#xA;ii  libavresample4:amd64                       7:4.2.4-1ubuntu0.1                    amd64        FFmpeg compatibility library for resampling - runtime files&#xA;ii  libavutil56:amd64                          7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library with functions for simplifying programming - runtime files&#xA;ii  libffmpegthumbnailer4v5                    2.1.1-0.2build2                       amd64        shared library for ffmpegthumbnailer&#xA;ii  libpostproc55:amd64                        7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library for post processing - runtime files&#xA;ii  libswresample3:amd64                       7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library for audio resampling, rematrixing etc. - runtime files&#xA;ii  libswscale5:amd64                          7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library for image scaling and various conversions - runtime files&#xA;$&#xA;

    &#xA;