Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (71)

  • 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.

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • 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 ;

Sur d’autres sites (10876)

  • I can't use HW encoder of QSV by ffmpeg

    6 novembre 2017, par Ubunkun

    I would like to use to encode by Intel H/W encode QSV.

    Intel(R) Core(TM) i7-5650U CPU @ 2.20GHz

    lspci -nn -s 0:02.0
    00:02.0 VGA compatible controller [0300] : Intel Corporation Broadwell-U Integrated Graphics [8086:1626] (rev 09)

    I could install MediaServerStudioEssentials2017R2 and ffpemg.

    # vainfo | grep -v 'unknown'
    error: can't connect to X server!
    libva info: VA-API version 0.99.0
    libva info: va_getDriverName() returns 0
    libva info: User requested driver 'iHD'
    libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
    libva info: Found init function __vaDriverInit_0_32
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 0.99 (libva 1.67.0.pre1)
    vainfo: Driver version: 16.5.1.59511-ubit
    vainfo: Supported profile and entrypoints
         VAProfileH264ConstrainedBaseline: VAEntrypointVLD
         VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
         VAProfileH264Main               : VAEntrypointVLD
         VAProfileH264Main               : VAEntrypointEncSlice
         VAProfileH264High               : VAEntrypointVLD
         VAProfileH264High               : VAEntrypointEncSlice
         VAProfileMPEG2Simple            : VAEntrypointEncSlice
         VAProfileMPEG2Simple            : VAEntrypointVLD
         VAProfileMPEG2Main              : VAEntrypointEncSlice
         VAProfileMPEG2Main              : VAEntrypointVLD
         VAProfileVC1Advanced            : VAEntrypointVLD
         VAProfileVC1Main                : VAEntrypointVLD
         VAProfileVC1Simple              : VAEntrypointVLD
         VAProfileJPEGBaseline           : VAEntrypointVLD
         VAProfileJPEGBaseline           : VAEntrypointEncPicture
         VAProfileVP8Version0_3          : VAEntrypointEncSlice
         VAProfileVP8Version0_3          : VAEntrypointVLD
         VAProfileNone                   : VAEntrypointVideoProc

    and

    # ffmpeg -codecs | grep qsv
    ffmpeg version N-86584-g4976a34 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
     configuration: --enable-libmfx
     libavutil      55. 66.100 / 55. 66.100
     libavcodec     57. 99.100 / 57. 99.100
     libavformat    57. 73.100 / 57. 73.100
     libavdevice    57.  7.100 / 57.  7.100
     libavfilter     6. 94.100 /  6. 94.100
     libswscale      4.  7.101 /  4.  7.101
     libswresample   2.  8.100 /  2.  8.100
    DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv h264_cuvid ) (encoders: h264_nvenc h264_qsv h264_vaapi nvenc nvenc_h264 )
    DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_cuvid ) (encoders: nvenc_hevc hevc_nvenc hevc_qsv hevc_vaapi )
    DEV.L. mpeg2video           MPEG-2 video (decoders: mpeg2video mpegvideo mpeg2_qsv mpeg2_cuvid ) (encoders: mpeg2video mpeg2_qsv mpeg2_vaapi )
    D.V.L. vc1                  SMPTE VC-1 (decoders: vc1 vc1_qsv vc1_cuvid )
    DEV.L. vp8                  On2 VP8 (decoders: vp8 vp8_cuvid vp8_qsv ) (encoders: vp8_vaapi )

    But, I tried to encode as below.

    # ffmpeg -i test.avi -c:v h264_qsv -b:v 2000k -r 30 -s 720x480 -acodec copy -look_ahead 0 qsv.mp4
    ・・・
    [h264_qsv @ 0x3139f40] No device available for encoder (device type qsv for codec h264_qsv).
    [h264_qsv @ 0x3139f40] Encoder will work with partial HW acceleration
    [h264_qsv @ 0x3139f40] Warning in encoder initialization: partial acceleration (4)
    ・・・

    It seems like that the encoding is using by software. It’s slow.
    How can I do by H/W encode ? If you know it, let me know it.

    Bests,

  • FFmpeg (Thumbnail from video) works in command line, but not in PHP script

    25 juin 2017, par Jun Kim

    I looked at the similar questions, and the solutions there do not work in my case. Anyone has any idea ? I am trying to capture a thumbnail from a given video file.

    Later, my goal is to capture a thumbnail from live streaming video file.

    Below is my current set up.

    Linux Ubuntu 16.04

    PHP version 7.0

    Nginx Version 1.10.3

    FFmpeg Version FFmpeg 2.8.11

    I installed FFmpeg through below commands in my Ubuntu server.

    apt-get update
    apt-get install ffmpeg

    When I type the below command line in the terminal, it does the conversion fine.

    ffmpeg -i /etc/nginx/html/test.mp4 -ss 00:00:01 -vframes 1 -vf scale=240:120 /etc/nginx/html/Share/ffmpeg/thumbnails/test.png;

    In order to use it in php file, I confirmed the location of ffmpeg binaries by I typing in the terminal, which ffmpeg, and it returns /usr/bin/ffmpeg

    I also gave permission to the directory by using chmod 755 command line.

    Here is what I have in my ffmpeg.php file.
    I included the full path to my ffmpeg as you can see.

    <?php
    header("Content-Type: text/html;charset=UTF-8");

    $ffmpeg = "/usr/bin/ffmpeg";
    $videoFile="/etc/nginx/html/test.mp4";
    $thumbnail= "/etc/nginx/html/Share/ffmpeg/thumbnails/thumbnail1.jpg";

    $cmd = "$ffmpeg -i $videoFile -ss 00:00:01 -vframes 1 -vf scale=240:120 $thumbnail 2>&1 &";

    $output = shell_exec($cmd);
    echo "<pre>".$output."</pre>";
    ?>

    This returns the message like below.

    ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/etc/nginx/html/Share/test.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2mp41
       creation_time   : 1970-01-01 00:00:00
       encoder         : Lavf53.24.2
     Duration: 00:00:06.40, start: 0.000000, bitrate: 1321 kb/s
       Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x368 [SAR 1:1 DAR 40:23], 932 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : SoundHandler
    [swscaler @ 0x1621be0] deprecated pixel format used, make sure you did set range correctly
    Output #0, image2, to '/etc/nginx/html/Share/ffmpeg/thumbnails/thumbnail1.jpg':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2mp41
       encoder         : Lavf56.40.101
       Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 240x120 [SAR 20:23 DAR 40:23], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : VideoHandler
         encoder         : Lavc56.60.100 mjpeg
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg4 (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    [image2 @ 0x16165a0] Could not open file : /etc/nginx/html/Share/ffmpeg/thumbnails/thumbnail1.jpg
    av_interleaved_write_frame(): Input/output error
    frame=    1 fps=0.0 q=3.9 Lsize=N/A time=00:00:00.04 bitrate=N/A    
    video:8kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Conversion failed!

    UPDATED : I also gave permission to ffmpeg by chmod +x $(which ffmpeg)

    I tried php /etc/nginx/html/Share/ffmpeg/ffmpeg.php in the terminal, and it also does conversion fine.

     libavutil      54. 31.100 / 54. 31.100
     libavcodec     56. 60.100 / 56. 60.100
     libavformat    56. 40.101 / 56. 40.101
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 40.101 /  5. 40.101
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.101 /  1.  2.101
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/etc/nginx/html/Share/test.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2mp41
       creation_time   : 1970-01-01 00:00:00
       encoder         : Lavf53.24.2
     Duration: 00:00:06.40, start: 0.000000, bitrate: 1321 kb/s
       Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x368 [SAR 1:1 DAR 40:23], 932 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : SoundHandler
    [swscaler @ 0x72dbe0] deprecated pixel format used, make sure you did set range correctly
    Output #0, image2, to '/etc/nginx/html/Share/ffmpeg/thumbnails/thumbnail.jpg':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2mp41
       encoder         : Lavf56.40.101
       Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 240x120 [SAR 20:23 DAR 40:23], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
       Metadata:
         creation_time   : 1970-01-01 00:00:00
         handler_name    : VideoHandler
         encoder         : Lavc56.60.100 mjpeg
    Stream mapping:
     Stream #0:0 -> #0:0 (mpeg4 (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=3.9 Lsize=N/A time=00:00:00.04 bitrate=N/A    
    video:8kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
  • ffmpeg HLS transcoding and chunks upload to remote server

    25 mai 2020, par Georgе Stoyanov

    I am trying to create a so called origin server for storing the hls chunks and the manifest file on a remote server. The sending machine running ffmpeg is with IP : 192.168.178.50 and the web server which has to store both the HLS chunks and the manifest file is with IP : 192.168.178.100. My ffmpeg transcoding command line is :

    &#xA;&#xA;

    $ ffmpeg -i 01_llama_drama_1080p.mp4 -profile:v high -level 5.2 -s 1920x1080 -strict -2 -start_number 0 -hls_time 6 -hls_list_size 0 -f hls http://192.168.178.100/hls/test.m3u8&#xA;&#xA;ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers&#xA;  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609&#xA;  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g&#x2B;&#x2B; --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv&#xA;  libavutil      54. 31.100 / 54. 31.100&#xA;  libavcodec     56. 60.100 / 56. 60.100&#xA;  libavformat    56. 40.101 / 56. 40.101&#xA;  libavdevice    56.  4.100 / 56.  4.100&#xA;  libavfilter     5. 40.101 /  5. 40.101&#xA;  libavresample   2.  1.  0 /  2.  1.  0&#xA;  libswscale      3.  1.101 /  3.  1.101&#xA;  libswresample   1.  2.101 /  1.  2.101&#xA;  libpostproc    53.  3.100 / 53.  3.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;01_llama_drama_1080p.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: isommp42&#xA;    creation_time   : 2013-02-08 18:56:45&#xA;  Duration: 00:01:30.00, start: 0.000000, bitrate: 3120 kb/s&#xA;    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 2925 kb/s, 24 fps, 24 tbr, 48 tbn, 48 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 1970-01-01 00:00:00&#xA;      handler_name    : VideoHandler&#xA;    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 191 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2013-02-08 18:56:46&#xA;      handler_name    : IsoMedia File Produced by Google, 5-11-2011&#xA;[libx264 @ 0x249b880] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2&#xA;[libx264 @ 0x249b880] profile High, level 5.2&#xA;Output #0, hls, to &#x27;http://185.71.86.48/hls/test.m3u8&#x27;:&#xA;  Metadata:&#xA;    major_brand     : mp42&#xA;    minor_version   : 0&#xA;    compatible_brands: isommp42&#xA;    encoder         : Lavf56.40.101&#xA;    Stream #0:0(und): Video: h264 (libx264), yuv420p, 1920x1080, q=-1--1, 24 fps, 90k tbn, 24 tbc (default)&#xA;    Metadata:&#xA;      creation_time   : 1970-01-01 00:00:00&#xA;      handler_name    : VideoHandler&#xA;      encoder         : Lavc56.60.100 libx264&#xA;    Stream #0:1(und): Audio: aac, 44100 Hz, stereo, fltp, 128 kb/s (default)&#xA;    Metadata:&#xA;      creation_time   : 2013-02-08 18:56:46&#xA;      handler_name    : IsoMedia File Produced by Google, 5-11-2011&#xA;      encoder         : Lavc56.60.100 aac&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))&#xA;  Stream #0:1 -> #0:1 (aac (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[hls @ 0x24997e0] Cannot use rename on non file protocol, this may lead to races and temporarly partial files&#xA;

    &#xA;&#xA;

    But no matter what method I am using I got in the access log of my apache web server the following errors :

    &#xA;&#xA;

    $ tail -f /var/log/apache2/access.log&#xA;&#xA;192.168.178.50 - - [27/Jun/2017:10:40:45 &#x2B;0000] "POST /hls/test.m3u8 HTTP/1.1" 404 469 "-" "Lavf/56.40.101"&#xA;192.168.178.50 - - [27/Jun/2017:10:40:45 &#x2B;0000] "POST /hls/test12.ts HTTP/1.1" 404 469 "-" "Lavf/56.40.101"&#xA;192.168.178.50 - - [27/Jun/2017:10:40:46 &#x2B;0000] "POST /hls/test.m3u8 HTTP/1.1" 404 469 "-" "Lavf/56.40.101"&#xA;192.168.178.50 - - [27/Jun/2017:10:40:46 &#x2B;0000] "POST /hls/test13.ts HTTP/1.1" 404 469 "-" "Lavf/56.40.101"&#xA;192.168.178.50 - - [27/Jun/2017:10:40:47 &#x2B;0000] "POST /hls/test.m3u8 HTTP/1.1" 404 469 "-" "Lavf/56.40.101"&#xA;192.168.178.50 - - [27/Jun/2017:10:46:44 &#x2B;0000] "POST /hls/test0.ts HTTP/1.1" 404 468 "-" "Lavf/56.40.101"&#xA;192.168.178.50 - - [27/Jun/2017:10:46:51 &#x2B;0000] "POST /hls/test.m3u8 HTTP/1.1" 404 469 "-" "Lavf/56.40.101"&#xA;

    &#xA;&#xA;

    These are the supported methods on my web server :

    &#xA;&#xA;

    $ nmap -Pn -p 80 --script http-methods 192.168.178.100&#xA;&#xA;Starting Nmap 7.01 ( https://nmap.org ) at 2017-06-27 10:47 UTC&#xA;Nmap scan report for 192.168.178.100&#xA;Host is up (0.0015s latency).&#xA;PORT   STATE SERVICE&#xA;80/tcp open  http&#xA;| http-methods:&#xA;|_  Supported Methods: GET HEAD POST OPTIONS&#xA;&#xA;Nmap done: 1 IP address (1 host up) scanned in 0.34 seconds&#xA;

    &#xA;&#xA;

    My web server is running apache2 on Ubuntu 16.04 :

    &#xA;&#xA;

    $ apache2 -v&#xA;&#xA;Server version: Apache/2.4.18 (Ubuntu)&#xA;Server built:   2017-06-26T11:58:04&#xA;

    &#xA;&#xA;

    So according to the access.log file no matter what method I define in the ffmpeg command line it is always trying to upload the chunks using HTTP POST, but the latter is already supported and the directory I am directing the chunks has even 777 rights. Am I missing something here ?

    &#xA;