Recherche avancée

Médias (91)

Autres articles (35)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

Sur d’autres sites (4553)

  • ffmpeg nvidia hwaccel yuv444p raw frame output

    3 avril 2020, par 慕容风
      

    1. I use ffmpeg to do frame decimation, millions of video

    2. 


    3. I have to use nvidia gpu card (tesla P4) to optimize performance

    4. 


    5. my ffmpeg command is

      



      ffmpeg   -hwaccel cuvid  -c:v h264_cuvid -i ./a.mp4  -c:v nvenc -vf "scale_npp=format=yuv444p"  -r 1  ./\%08d.raw

    6. 


    7. but the output data format is weird, I don't know what the format is and how to decode it

    8. 


    



    I want to know how to decode these data or how to output ream rawdata, can anybody help me ?

    



    Log :

    



    built with gcc 8.2.0 (GCC)  
configuration: --cc=/opt/compiler/gcc-8.2/bin/gcc --disable-x86asm --enable-cuda --enable-cuvid --enable-nvenc --enable-nvdec --enable-nonfree --enable-libnpp --enable-libx264 --enable-gpl --enable-debug=3 --disable-optimizations --disable-stripping --extra-cflags='-I/home/work/cuda-10.0/include -g3' --extra-ldflags=-L/home/work/cuda-10.0/lib64 --prefix=/home/work/ffmpeg  
 libavutil      56. 36.101 / 56. 36.101  
 libavcodec     58. 65.100 / 58. 65.10  
 libavformat    58. 35.101 / 58. 35.101  
 libavdevice    58.  9.101 / 58.  9.101  
 libavfilter     7. 69.101 /  7. 69.101  
 libswscale      5.  6.100 /  5.  6.100  
 libswresample   3.  6.100 /  3.  6.100  
 libpostproc    55.  6.100 / 55.  6.100  
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './a.mp4':  
 Metadata:  
   major_brand     : isom  
   minor_version   : 512  
   compatible_brands: isomiso2avc1mp41  
   encoder         : Lavf57.71.100  
 Duration: 00:50:41.28, start: 0.000000, bitrate: 862 kb/s  
   Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360  >[SAR 1:1 DAR 16:9], 825 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)   
   Metadata: 
     handler_name    : VideoHandler 
   Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,  fltp, 29 kb/s (default)
   Metadata: 
     handler_name    : SoundHandler 
Stream mapping: 
 Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (nvenc)) 
 Stream #0:1 -> #1:0 (aac (native) -> pcm_s16le (native)) 
Press [q] to stop, [?] for help  
Output #1, wav, to './audio.wav':  
 Metadata:  
   major_brand     : isom  
   minor_version   : 512  
   compatible_brands: isomiso2avc1mp41  
   ISFT            : Lavf58.35.101  
   Stream #1:0(eng): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s (default)  
   Metadata:  
     handler_name    : SoundHandler  
     encoder         : Lavc58.65.100 pcm_s16le  
[nvenc @ 0x44bbc40] This encoder is deprecated, use 'h264_nvenc' instead
Output #0, image2, to './%08d.raw':  
 Metadata:  
   major_brand     : isom  
   minor_version   : 512  
   compatible_brands: isomiso2avc1mp41  
   encoder         : Lavf58.35.101  
   Stream #0:0(eng): Video: h264 (nvenc) (High 4:4:4 Predictive), cuda, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 1 fps, 1 tbn, 1 tbc (default)  
   Metadata:  
     handler_name    : VideoHandler  
     encoder         : Lavc58.65.100 nvenc  
   Side data:  
     cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: N/A
frame= 3043 fps= 52 q=4.0 Lsize=N/A time=00:50:43.00 bitrate=N/A dup=0 drop=72984 speed=52.3x 
video:245435kB audio:6250kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown


    


  • Files created with "ffmpeg hevc_nvenc" do not play on TV. (with video codec SDK 9.1 of nvidia)

    29 janvier 2020, par Dashhh

    Problem

    • Files created with hevc_nvenc do not play on TV. (samsung smart tv, model unknown)
      Related to my ffmpeg build is below.

    FFmpeg build conf

    $ ffmpeg -buildconf
       --enable-cuda
       --enable-cuvid
       --enable-nvenc
       --enable-nonfree
       --enable-libnpp
       --extra-cflags=-I/path/cuda/include
       --extra-ldflags=-L/path/cuda/lib64
       --prefix=/prefix/ffmpeg_build
       --pkg-config-flags=--static
       --extra-libs='-lpthread -lm'
       --extra-cflags=-I/prefix/ffmpeg_build/include
       --extra-ldflags=-L/prefix/ffmpeg_build/lib
       --enable-gpl
       --enable-nonfree
       --enable-version3
       --disable-stripping
       --enable-avisynth
       --enable-libass
       --enable-libfontconfig
       --enable-libfreetype
       --enable-libfribidi
       --enable-libgme
       --enable-libgsm
       --enable-librubberband
       --enable-libshine
       --enable-libsnappy
       --enable-libssh
       --enable-libtwolame
       --enable-libwavpack
       --enable-libzvbi
       --enable-openal
       --enable-sdl2
       --enable-libdrm
       --enable-frei0r
       --enable-ladspa
       --enable-libpulse
       --enable-libsoxr
       --enable-libspeex
       --enable-avfilter
       --enable-postproc
       --enable-pthreads
       --enable-libfdk-aac
       --enable-libmp3lame
       --enable-libopus
       --enable-libtheora
       --enable-libvorbis
       --enable-libvpx
       --enable-libx264
       --enable-libx265
       --disable-ffplay
       --enable-libopenjpeg
       --enable-libwebp
       --enable-libxvid
       --enable-libvidstab
       --enable-libopenh264
       --enable-zlib
       --enable-openssl

    ffmpeg Command

    • Command about FFmpeg encoding
    ffmpeg -ss 1800 -vsync 0 -hwaccel cuvid -hwaccel_device 0 \
    -c:v h264_cuvid -i /data/input.mp4 -t 10 \
    -filter_complex "\
    [0:v]hwdownload,format=nv12,format=yuv420p,\
    scale=iw*2:ih*2" -gpu 0 -c:v hevc_nvenc -pix_fmt yuv444p16le -preset slow -rc cbr_hq -b:v 5000k -maxrate 7000k -bufsize 1000k -acodec aac -ac 2 -dts_delta_threshold 1000 -ab 128k -flags global_header ./makevideo_nvenc_hevc.mp4

    Full log about This Command - check this full log

    The reason for adding "-color_ " in the command is as follows.

    • HDR video after creating bt2020 + smpte2084 video using nvidia hardware accelerator. (I’m studying to make HDR videos. I’m not sure if this is right.)

    How can I make a video using ffmpeg hevc_nvenc and have it play on TV ?


    Things i’ve done

    Here’s what I’ve researched about why it doesn’t work.
    - The header information is not properly included in the resulting video file. So I used a program called nvhsp to add SEI and VUI information inside the video. See below for the commands and logs used.

    nvhsp is open source for writing VUI and SEI bitstrings in raw video. nvhsp link

    # make rawvideo for nvhsp
    $  ffmpeg -vsync 0 -hwaccel cuvid -hwaccel_device 0 -c:v h264_cuvid \
    -i /data/input.mp4 -t 10 \
    -filter_complex "[0:v]hwdownload,format=nv12,\
    format=yuv420p,scale=iw*2:ih*2" \
    -gpu 0 -c:v hevc_nvenc -f rawvideo output_for_nvhsp.265

    # use nvhsp
    $ python nvhsp.py ./output_for_nvhsp.265 -colorprim bt2020 \
    -transfer smpte-st-2084 -colormatrix bt2020nc \
    -maxcll "1000,300" -videoformat ntsc -full_range tv \
    -masterdisplay "G (13250,34500) B (7500,3000 ) R (34000,16000) WP (15635,16450) L (10000000,1)" \
    ./after_nvhsp_proc_output.265

    Parsing the infile:

    ==========================

    Prepending SEI data
    Starting new SEI NALu ...
    SEI message with MaxCLL = 1000 and MaxFall = 300 created in SEI NAL
    SEI message Mastering Display Data G (13250,34500) B (7500,3000) R (34000,16000) WP (15635,16450) L (10000000,1) created in SEI NAL
    Looking for SPS ......... [232, 22703552]
    SPS_Nals_addresses [232, 22703552]
    SPS NAL Size 488
    Starting reading SPS NAL contents
    Reading of SPS NAL finished. Read 448 of SPS NALu data.

    Making modified SPS NALu ...
    Made modified SPS NALu-OK
    New SEI prepended
    Writing new stream ...
    Progress: 100%
    =====================
    Done!

    File nvhsp_after_output.mp4 created.

    # after process
    $ ffmpeg -y -f rawvideo -r 25 -s 3840x2160 -pix_fmt yuv444p16le -color_primaries bt2020 -color_trc smpte2084  -colorspace bt2020nc -color_range tv -i ./1/after_nvhsp_proc_output.265 -vcodec copy  ./1/result.mp4 -hide_banner

    Truncating packet of size 49766400 to 3260044
    [rawvideo @ 0x40a6400] Estimating duration from bitrate, this may be inaccurate
    Input #0, rawvideo, from './1/nvhsp_after_output.265':
     Duration: N/A, start: 0.000000, bitrate: 9953280 kb/s
       Stream #0:0: Video: rawvideo (Y3[0][16] / 0x10003359), yuv444p16le(tv, bt2020nc/bt2020/smpte2084), 3840x2160, 9953280 kb/s, 25 tbr, 25 tbn, 25 tbc
    [mp4 @ 0x40b0440] Could not find tag for codec rawvideo in stream #0, codec not currently supported in container
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
       Last message repeated 1 times

    Goal

    • I want to generate matadata normally when encoding a video through hevc_nvenc.

    • I want to create a video through hevc_nvenc and play HDR Video on smart tv with 10bit color depth support.


    Additional

    • Is it normal for ffmpeg hevc_nvenc not to generate metadata in the resulting video file ? or is it a bug ?

    • Please refer to the image below. (*’알 수 없음’ meaning ’unknown’)

      • if you need more detail file info, check this Gist Link (by ffprobe)
        hevc_nvenc metadata
    • However, if you encode a file in libx265, the attribute information is entered correctly as shown below.

      • if you need more detail file info, check this Gist Link
        libx265 metadata

    However, when using hevc_nvenc, all information is missing.

    • i used option -show_streams -show_programs -show_format -show_data -of json -show_frames -show_log 56 at ffprobe
  • Use NVIDIA GPU to speed up drawtext with ffmpeg

    28 février 2020, par Garrett

    I use the following ffmpeg command add text to a video, which takes longer than I would like.

    ffmpeg -i input.mp4 -vf "[in] drawbox= x=iw*0.75:y=ih*0.88:w=iw*0.25:h=ih*0.12:color=black@0.7:t=fill, drawtext=fontsize=20:fontcolor=White:text='Test Text Row 1':x=(w*.75)+15:y=(h*.88)+15, drawtext=fontsize=20:fontcolor=White:text='Test Text Row 2':x=(w*.75)+15:y=((h*.88)+25)+15, drawtext=fontsize=20:fontcolor=White:text='Test Text Row 3':x=(w*.75)+15:y=((h*.88)+50)+15, drawtext=fontsize=20:fontcolor=White:text='Test Text Row 4':x=(w*.75)+15:y=((h*.88)+75)+15 [out]" -y out.mp4

    I believe I have successfully configured ffmpeg to use the GPU on my laptop by following NVIDIA’s guide, which can be found https://developer.nvidia.com/ffmpeg

    However I am having trouble integrating the commands to utilize the GPU with my command above. I tested the following command from NVIDIA’s site to test configuration and it worked without error.

    ffmpeg -vsync 0 -c:v h264_cuvid -i  -f rawvideo

    I have not found any examples yet of the integration of drawtext and GPU acceleration so any guidance appreciated.