Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (53)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (3440)

  • how to make work opencv with FFMPEG driver

    14 janvier 2021, par user3313834

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

    


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


    


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

    


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


    


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

    


    >>> print(cv2.VideoCapture(0, apiPreference=cv2.CAP_FFMPEG).isOpened())
False
>>>


    


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

    


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


    


    From Linux side look ok too :

    


    $ dpkg -l |grep -i opencv
ii  libopencv-core4.2:amd64                    4.2.0+dfsg-5                          amd64        computer vision core library
ii  libopencv-imgcodecs4.2:amd64               4.2.0+dfsg-5                          amd64        computer vision Image Codecs library
ii  libopencv-imgproc4.2:amd64                 4.2.0+dfsg-5                          amd64        computer vision Image Processing library
ii  libopencv-videoio4.2:amd64                 4.2.0+dfsg-5                          amd64        computer vision Video I/O library

$ dpkg -l |grep -i ffm
ii  ffmpeg                                     7:4.2.4-1ubuntu0.1                    amd64        Tools for transcoding, streaming and playing of multimedia files
ii  gstreamer1.0-libav:amd64                   1.16.2-2                              amd64        ffmpeg plugin for GStreamer
ii  libavcodec-extra:amd64                     7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library with extra codecs (metapackage)
ii  libavcodec-extra58:amd64                   7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library with additional de/encoders for audio/video codecs
ii  libavdevice58:amd64                        7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library for handling input and output devices - runtime files
ii  libavfilter7:amd64                         7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library containing media filters - runtime files
ii  libavformat58:amd64                        7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library with (de)muxers for multimedia containers - runtime files
ii  libavresample4:amd64                       7:4.2.4-1ubuntu0.1                    amd64        FFmpeg compatibility library for resampling - runtime files
ii  libavutil56:amd64                          7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library with functions for simplifying programming - runtime files
ii  libffmpegthumbnailer4v5                    2.1.1-0.2build2                       amd64        shared library for ffmpegthumbnailer
ii  libpostproc55:amd64                        7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library for post processing - runtime files
ii  libswresample3:amd64                       7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  libswscale5:amd64                          7:4.2.4-1ubuntu0.1                    amd64        FFmpeg library for image scaling and various conversions - runtime files
$


    


  • Can I test funcion of nvidia decoder (nvdec/cuvid) on generated ffmpeg video ?

    31 janvier 2021, par Milan Čížek

    goal : In my script I try to check if nvdec on my graphics card is available/functional.
I don't have any source video (H.264 / H.265) to use as input at this time intentionally, so I want to generate it.
It is also not necessary to use an encoder, because I do not need the output file.
I'm testing the exit code of command ffmpeg ($ ?).
I use nvidia-smi for check dec/enc load.

    


    My attempt :

    


    ffmpeg -y -hwaccel cuda -hwaccel_output_format cuda -c:v h264_cuvid -f lavfi -i testsrc="duration=5:size=1920x1080:rate=25" -c:v copy test.ts


    


    output of my commands :

    


    Input #0, lavfi, from 'testsrc=duration=5:size=1920x1080:rate=25':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264, rgb24, 1920x1080 [SAR 1:1 DAR 16:9], 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
No information about the input framerate is available. Falling back to a default value of 25fps for output stream #0:0. Use the -r option if you want a different framerate.
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf58.65.101
    Stream #0:0: Video: wrapped_avframe, rgb24, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn
    Metadata:
      encoder         : Lavc58.119.100 wrapped_avframe
frame=    0 fps=0.0 q=0.0 Lsize=N/A 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)


    


    I triead add -t 5 before test.ts but nothing changed.
Output ts file has zero size.

    


    If I debug the command, I expect to add it to the end "-f null - 2>/dev/null". Output file is only for debug purposes.

    


    Thank you.

    


  • How to use FFMPEG with Nvidia Acceleration (Nvenc) to hardcode subtitles

    21 février 2021, par Ibraheem Nofal

    So I'm trying to use Nvenc to accelerate video encoding. The aim is to have 1 input video file and 1 input subtitle, and to get multiple outputs at different resolutions with subtitles hardcoded or burned into the video. I've tried multiple approaches but can't figure out how to do it.

    


    Here's the command that I'm currently using :

    


    ffmpeg -hwaccel cuvid -i 3030025890-TEST.mp4 -i output_ar.srt  -filter_complex "[0:v]scale_npp=1920:1080, hwdownload,format=nv12[base], [base]subtitles=output_ar.srt[marked]" -map "[marked]" -c:v h264_nvenc -map 0:v:0 -map 0:a:0 -g 50 -b:v 5M -maxrate 5.5M -minrate 4M -bufsize 5M -preset fast 1080_output.mp4


    


    and here's the output :

    


    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '3030025890-TEST.mp4':
  Metadata:
    major_brand     : M4V 
    minor_version   : 1
    compatible_brands: isomavc1mp42
    creation_time   : 2021-01-05T13:45:58.000000Z
  Duration: 00:45:04.28, start: 0.000000, bitrate: 5574 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5000 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Video Media Handler
      encoder         : Elemental H.264
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:3(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:4(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:5(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
    Stream #0:6(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2021-01-05T13:45:58.000000Z
      handler_name    : ETI ISO Audio Media Handler
Input #1, srt, from 'output_ar.srt':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: subrip
[Parsed_subtitles_3 @ 0x5601070b1dc0] Shaper: FriBidi 0.19.7 (SIMPLE)
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x5601070b1dc0] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x5601070b1dc0] Using font provider fontconfig
Stream mapping:
  Stream #0:0 (h264) -> scale_npp (graph 0)
  subtitles (graph 0) -> Stream #0:0 (h264_nvenc)
  Stream #0:0 -> #0:1 (h264 (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:2 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x56010792f980] Error creating a NVDEC decoder: 1
[h264 @ 0x56010792f980] Failed setup for format cuda: hwaccel initialisation returned error.
[Parsed_subtitles_3 @ 0x560107364cc0] Shaper: FriBidi 0.19.7 (SIMPLE)
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x560107364cc0] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file
[Parsed_subtitles_3 @ 0x560107364cc0] Using font provider fontconfig
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
[aac @ 0x56010734d400] Qavg: 65536.000
[aac @ 0x56010734d400] 2 frames left in the queue on closing
Conversion failed!


    


    Edit : Made some progress. I now no longer get an error, but upon viewing the output, there's no subtitles burned in.
Command :

    


    ffmpeg -hwaccel cuvid -c:v h264_cuvid -i 3030025890-TEST.mp4  -c:v h264_nvenc -map 0:v:0 -map 0:a:0 -g 50 -b:v 5M -maxrate 5.5M -minrate 4M -bufsize 5M -vf "scale_npp=1920:1080, hwdownload, format=nv12, subtitles=output_ar.srt, hwupload" -preset fast 1080_output.mp4