
Recherche avancée
Autres articles (12)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (3898)
-
lavu/hwcontext : Add support for HW -> HW transfers
24 octobre 2019, par Philip Langdalelavu/hwcontext : Add support for HW -> HW transfers
We are beginning to consider scenarios where a given HW Context
may be able to transfer frames to another HW Context without
passing via system memory - this would usually be when two
contexts represent different APIs on the same device (eg : Vulkan
and CUDA).This is modelled as a transfer, as we have today, but where both
the src and the dst are hardware frames with hw contexts. We need
to be careful to ensure the contexts are compatible - particularly,
we cannot do transfers where one of the frames has been mapped via
a derived frames context - we can only do transfers for frames that
were directly allocated by the specified context.Additionally, as we have two hardware contexts, the transfer function
could be implemented by either (or indeed both). To handle this
uncertainty, we explicitly look for ENOSYS as an indicator to try
the transfer in the other direction before giving up. -
Files created with "ffmpeg hevc_nvenc" do not play on TV. (with video codec SDK 9.1 of nvidia)
29 janvier 2020, par DashhhProblem
- 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-opensslffmpeg 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.mp4Full 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 timesGoal
-
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)
- if you need more detail file info, check this Gist Link (by ffprobe)
-
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
- if you need more detail file info, check this Gist Link
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
- Files created with hevc_nvenc do not play on TV. (samsung smart tv, model unknown)
-
Converting mp4 audio & video for JavaScript's MediaSource API
10 janvier 2020, par CrayzzitSo I have two files.
frag_bunny.mp4
andraw.mp4
(you can download them in a tar on my Google drive). Thefrag_bunny.mp4
works perfectly when I use it with the JavaScript’s MediaSource API. But it’s not the case withraw.mp4
, why is that ?Here’s the
mediainfo
offrag_bunny.mp4
:General
Complete name : frag_bunny.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp42/avc1/iso5)
File size : 5.27 MiB
Duration : 1 min 0 s
Overall bit rate : 734 kb/s
Video
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3
Format settings : 2 Ref Frames
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Format settings, GOP : M=1, N=64
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1 min 0 s
Bit rate : 613 kb/s
Width : 640 pixels
Height : 360 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 (23976/1000) FPS
Minimum frame rate : 7.317 FPS
Maximum frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.111
Stream size : 4.39 MiB (83%)
Language : English
Color range : Limited
Color primaries : BT.601 NTSC
Transfer characteristics : BT.709
Matrix coefficients : BT.601
Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : mp4a-40-2
Duration : 1 min 0 s
Bit rate mode : Constant
Bit rate : 64.0 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 22.05 kHz
Frame rate : 21.533 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 478 KiB (9%)
Language : English
Other #1
ID : 3
Type : Hint
Format : RTP
Codec ID : rtp
Duration : 1 min 0 s
Language : English
Other #2
ID : 4
Type : Hint
Format : RTP
Codec ID : rtp
Duration : 1 min 0 s
Language : EnglishAnd same for
raw.mp4
:General
Complete name : raw.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (isom/iso2/avc1/mp41)
File size : 16.9 MiB
Duration : 3 min 32 s
Overall bit rate : 668 kb/s
Writing application : Lavf57.83.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3 min 32 s
Bit rate : 532 kb/s
Width : 640 pixels
Height : 360 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.092
Stream size : 13.4 MiB (80%)
Writing library : x264 core 152 r2854 e9a5903
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : mp4a-40-2
Duration : 3 min 32 s
Bit rate mode : Constant
Bit rate : 132 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 3.30 MiB (20%)
Default : Yes
Alternate group : 1And in my js, I’m using this codec :
...addSourceBuffer('video/mp4; codecs="avc1.42c00d,mp4a.40.2"')