
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (18)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...)
Sur d’autres sites (3634)
-
FFmpeg warning : could not find codec parameters for stream 1 [closed]
17 avril 2020, par MocchiHello : I have videos in the TS container that are Advanced Video Codec created by Elgato Game Capture HD60 Pro. I am trying to convert the TS videos because sometimes the Elgato MP4 output videos have audio/video sync issues. I have been trying for a few days now to get a clean remuxed video into MP4. I am using this simple batch file :



ffmpeg -analyzeduration 10000M -probesize 10000000M -i "Game Video.ts" -acodec copy -vcodec copy "Game Video.mp4"
pause




I always get these warnings no matter what I have tried. even if I use the -vn command to ignore the video. which makes me believe FFmpeg is seeing something or can't read something in my source video. The Source video Information via Media Info is here, there is 12 Audio streams which are all the same and I only put the first two here :



General
ID : 1 (0x1)
Complete name : P :\Game Video.ts
Format : MPEG-TS
File size : 8.82 GiB
Duration : 54 min 43 s
Overall bit rate mode : Variable
Overall bit rate : 23.1 Mb/s



Video
ID : 100 (0x64)
Menu ID : 2 (0x2)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 1 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 1 frame
Format settings, GOP : M=1, N=15
Codec ID : 27
Duration : 54 min 43 s
Bit rate mode : Variable
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709



Audio #1
ID : 101 (0x65)
Menu ID : 2 (0x2)
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Format version : Version 4
Muxing mode : ADTS
Codec ID : 15-2
Duration : 54 min 43 s
Bit rate mode : Variable
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : 13 ms
Language : English



Audio #2
ID : 103 (0x67)
Menu ID : 2 (0x2)
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Format version : Version 4
Muxing mode : ADTS
Codec ID : 15-2
Duration : 54 min 43 s
Bit rate mode : Variable
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : 13 ms
Language : English



FFmpeg does create a MP4 video which seems to be good ; the Media Info is here :



General
Complete name : P :\Game Video.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 7.44 GiB
Duration : 54 min 43 s
Overall bit rate mode : Variable
Overall bit rate : 19.5 Mb/s
Writing application : Lavf58.29.100



Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 1 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 1 frame
Format settings, GOP : M=1, N=15
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 54 min 43 s
Bit rate mode : Variable
Bit rate : 19.2 Mb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 59.862 FPS
Minimum frame rate : 0.461 FPS
Maximum frame rate : 59.960 FPS
Original frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.348
Stream size : 7.35 GiB (99%)
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : avcC



Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 54 min 43 s
Bit rate mode : Constant
Bit rate : 221 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 86.5 MiB (1%)
Language : English
Default : Yes
Alternate group : 1



I have not been able to figure out how to address the FFmpeg warnings and I am concerned that there is something wrong with the video that I will not find out until after I delete the source video. Any help is appreciated. here is the output from FFmpeg :



P:\>ffmpeg -analyzeduration 10000M -probesize 10000000M -i "Game Video.ts" -acod
ec copy -vcodec copy "Game Video.mp4"
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9.2.1 (GCC) 20200122
 configuration: --disable-static --enable-shared --enable-gpl --enable-version3
 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libas
s --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --ena
ble-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libth
eora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --
enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma
--enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo
-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom
--enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va
--enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenm
pt
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
[mpegts @ 00000000003b8fc0] start time for stream 1 is not set in estimate_timin
gs_from_pts
[mpegts @ 00000000003b8fc0] Could not find codec parameters for stream 1 (Video:
 mpeg2video ([2][0][0][0] / 0x0002), none(tv)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'Game Video.ts':
 Duration: 00:54:43.40, start: 505.283956, bitrate: 23076 kb/s
 Program 2
 Stream #0:0[0x64]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc,
 bt709, progressive), 1280x720 [SAR 96:96 DAR 16:9], 59.94 fps, 59.94 tbr, 90k t
bn, 119.88 tbc
 Stream #0:1[0x66]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv), 90k
tbr, 90k tbn, 90k tbc
 Stream #0:2[0x67](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
stereo, fltp, 225 kb/s
 Stream #0:3[0x69](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
stereo, fltp, 224 kb/s
 Stream #0:4[0x3ec](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
 stereo, fltp, 225 kb/s
 Stream #0:5[0x3f0](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
 stereo, fltp, 224 kb/s
 Stream #0:6[0x3f7](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
 stereo, fltp, 225 kb/s
 Stream #0:7[0x65](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
stereo, fltp, 225 kb/s
 Stream #0:8[0x3f3](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
 stereo, fltp, 225 kb/s
 Stream #0:9[0x3eb](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
 stereo, fltp, 225 kb/s
 Stream #0:10[0x3f5](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz
, stereo, fltp, 225 kb/s
 Stream #0:11[0x3ed](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz
, stereo, fltp, 225 kb/s
 Stream #0:12[0x3f1](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz
, stereo, fltp, 225 kb/s
 Stream #0:13[0x4e7](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz
, stereo, fltp, 225 kb/s
Output #0, mp4, to 'Game Video.mp4':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709, pro
gressive), 1280x720 [SAR 96:96 DAR 16:9], q=2-31, 59.94 fps, 59.94 tbr, 90k tbn,
 90k tbc
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, flt
p, 225 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 3067 fps=0.0 q=-1.0 size= 111616kB time=00:00:51.16 bitrate=17871.9kbits
frame= 5766 fps=5766 q=-1.0 size= 220160kB time=00:01:36.19 bitrate=18748.6kbit
frame= 8478 fps=5652 q=-1.0 size= 330496kB time=00:02:21.42 bitrate=19143.9kbit
frame=11166 fps=5583 q=-1.0 size= 438272kB time=00:03:06.28 bitrate=19273.1kbit
frame=13962 fps=5254 q=-1.0 size= 549632kB time=00:03:52.94 bitrate=19329.1kbit
frame=16771 fps=5312 q=-1.0 size= 662784kB time=00:04:39.79 bitrate=19405.7kbit
frame=19591 fps=5357 q=-1.0 size= 775424kB time=00:05:26.85 bitrate=19434.7kbit
frame=22357 fps=5378 q=-1.0 size= 887808kB time=00:06:12.99 bitrate=19498.6kbit
frame=24205 fps=5197 q=-1.0 size= 963584kB time=00:06:43.80 bitrate=19548.3kbit
frame=26914 fps=5219 q=-1.0 size= 1073152kB time=00:07:29.02 bitrate=19578.4kbit
frame=28873 fps=5104 q=-1.0 size= 1149696kB time=00:08:01.71 bitrate=19551.8kbit
frame=31566 fps=5127 q=-1.0 size= 1256704kB time=00:08:46.63 bitrate=19548.3kbit
frame=33579 fps=5022 q=-1.0 size= 1336832kB time=00:09:20.21 bitrate=19548.3kbit
frame=36292 fps=5050 q=-1.0 size= 1444096kB time=00:10:05.46 bitrate=19538.7kbit
frame=38205 fps=4970 q=-1.0 size= 1519872kB time=00:10:37.40 bitrate=19533.7kbit
frame=41030 fps=5012 q=-1.0 size= 1631488kB time=00:11:24.52 bitrate=19524.6kbit
frame=43471 fps=4947 q=-1.0 size= 1729280kB time=00:12:05.25 bitrate=19532.9kbit
frame=46199 fps=4974 q=-1.0 size= 1838080kB time=00:12:50.75 bitrate=19536.1kbit
frame=48026 fps=4907 q=-1.0 size= 1909760kB time=00:13:21.24 bitrate=19525.6kbit
frame=50849 fps=4943 q=-1.0 size= 2022144kB time=00:14:08.34 bitrate=19526.8kbit
frame=53324 fps=4909 q=-1.0 size= 2120960kB time=00:14:49.64 bitrate=19530.2kbit
frame=56043 fps=4933 q=-1.0 size= 2231552kB time=00:15:34.99 bitrate=19551.8kbit
frame=58032 fps=4892 q=-1.0 size= 2316288kB time=00:16:08.15 bitrate=19599.2kbit
frame=60918 fps=4928 q=-1.0 size= 2436608kB time=00:16:56.31 bitrate=19640.2kbit
frame=62869 fps=4878 q=-1.0 size= 2516480kB time=00:17:28.85 bitrate=19654.8kbit
frame=65418 fps=4886 q=-1.0 size= 2622464kB time=00:18:11.39 bitrate=19684.3kbit
frame=67200 fps=4839 q=-1.0 size= 2696960kB time=00:18:41.12 bitrate=19706.5kbit
frame=69648 fps=4841 q=-1.0 size= 2799360kB time=00:19:22.17 bitrate=19732.3kbit
frame=72165 fps=4802 q=-1.0 size= 2908160kB time=00:20:04.20 bitrate=19783.8kbit
frame=74787 fps=4816 q=-1.0 size= 3016704kB time=00:20:47.93 bitrate=19803.0kbit
frame=76580 fps=4775 q=-1.0 size= 3090432kB time=00:21:19.98 bitrate=19779.1kbit
frame=78741 fps=4761 q=-1.0 size= 3182080kB time=00:21:57.86 bitrate=19780.2kbit
frame=81470 fps=4781 q=-1.0 size= 3295232kB time=00:22:43.39 bitrate=19799.6kbit
frame=84198 fps=4801 q=-1.0 size= 3409664kB time=00:23:28.87 bitrate=19825.7kbit
frame=86826 fps=4813 q=-1.0 size= 3519744kB time=00:24:12.75 bitrate=19847.6kbit
frame=89508 fps=4828 q=-1.0 size= 3626752kB time=00:24:57.49 bitrate=19840.1kbit
frame=91254 fps=4793 q=-1.0 size= 3699456kB time=00:25:26.61 bitrate=19851.8kbit
frame=94034 fps=4813 q=-1.0 size= 3817472kB time=00:26:12.99 bitrate=19881.1kbit
frame=96349 fps=4808 q=-1.0 size= 3911168kB time=00:26:51.62 bitrate=19880.7kbit
frame=98600 fps=4801 q=-1.0 size= 4004864kB time=00:27:29.17 bitrate=19893.5kbit
frame=100838 fps=4793 q=-1.0 size= 4098048kB time=00:28:06.48 bitrate=19906.0kbi
frame=103620 fps=4811 q=-1.0 size= 4206848kB time=00:28:52.92 bitrate=19886.9kbi
frame=105687 fps=4795 q=-1.0 size= 4292608kB time=00:29:27.40 bitrate=19896.4kbi
frame=107646 fps=4776 q=-1.0 size= 4374016kB time=00:30:00.10 bitrate=19905.4kbi
frame=110196 fps=4752 q=-1.0 size= 4482560kB time=00:30:42.66 bitrate=19928.2kbi
frame=112831 fps=4763 q=-1.0 size= 4592896kB time=00:31:26.61 bitrate=19943.1kbi
frame=114561 fps=4736 q=-1.0 size= 4667648kB time=00:31:55.47 bitrate=19962.3kbi
frame=116471 fps=4714 q=-1.0 size= 4744960kB time=00:32:27.34 bitrate=19960.8kbi
frame=119043 fps=4723 q=-1.0 size= 4850432kB time=00:33:10.25 bitrate=19964.7kbi
frame=120907 fps=4704 q=-1.0 size= 4930816kB time=00:33:41.35 bitrate=19983.2kbi
frame=122932 fps=4691 q=-1.0 size= 5012992kB time=00:34:15.10 bitrate=19982.6kbi
frame=125679 fps=4706 q=-1.0 size= 5123584kB time=00:35:00.94 bitrate=19977.8kbi
frame=127629 fps=4691 q=-1.0 size= 5205760kB time=00:35:33.48 bitrate=19988.7kbi
frame=129623 fps=4679 q=-1.0 size= 5284864kB time=00:36:06.76 bitrate=19980.8kbi
frame=132378 fps=4693 q=-1.0 size= 5394432kB time=00:36:52.71 bitrate=19971.5kbi
frame=134255 fps=4677 q=-1.0 size= 5469440kB time=00:37:24.05 bitrate=19966.4kbi
frame=136291 fps=4667 q=-1.0 size= 5549312kB time=00:37:58.03 bitrate=19955.7kbi
frame=139035 fps=4680 q=-1.0 size= 5658368kB time=00:38:43.79 bitrate=19947.2kbi
frame=140864 fps=4663 q=-1.0 size= 5730560kB time=00:39:14.30 bitrate=19939.9kbi
frame=142685 fps=4647 q=-1.0 size= 5801984kB time=00:39:44.68 bitrate=19931.3kbi
frame=145415 fps=4660 q=-1.0 size= 5910528kB time=00:40:30.25 bitrate=19923.4kbi
frame=147296 fps=4646 q=-1.0 size= 5984000kB time=00:41:01.61 bitrate=19914.1kbi
frame=149243 fps=4634 q=-1.0 size= 6060032kB time=00:41:34.10 bitrate=19904.4kbi
frame=151934 fps=4645 q=-1.0 size= 6164992kB time=00:42:18.99 bitrate=19891.2kbi
frame=153880 fps=4634 q=-1.0 size= 6241280kB time=00:42:51.48 bitrate=19882.9kbi
frame=155799 fps=4622 q=-1.0 size= 6316032kB time=00:43:23.50 bitrate=19873.6kbi
frame=158502 fps=4633 q=-1.0 size= 6426112kB time=00:44:08.60 bitrate=19875.7kbi
frame=160503 fps=4624 q=-1.0 size= 6505984kB time=00:44:41.98 bitrate=19872.2kbi
frame=162396 fps=4612 q=-1.0 size= 6584832kB time=00:45:13.58 bitrate=19878.9kbi
frame=165264 fps=4628 q=-1.0 size= 6705920kB time=00:46:01.43 bitrate=19893.6kbi
frame=167267 fps=4619 q=-1.0 size= 6788608kB time=00:46:34.84 bitrate=19898.2kbi
frame=169281 fps=4611 q=-1.0 size= 6873600kB time=00:47:08.42 bitrate=19908.1kbi
frame=171831 fps=4607 q=-1.0 size= 6972160kB time=00:47:50.95 bitrate=19894.4kbi
frame=174586 fps=4619 q=-1.0 size= 7080192kB time=00:48:36.95 bitrate=19884.1kbi
frame=176481 fps=4608 q=-1.0 size= 7156736kB time=00:49:08.54 bitrate=19883.7kbi
frame=178470 fps=4599 q=-1.0 size= 7234560kB time=00:49:41.74 bitrate=19876.1kbi
frame=181282 fps=4612 q=-1.0 size= 7344128kB time=00:50:28.65 bitrate=19864.6kbi
frame=183059 fps=4598 q=-1.0 size= 7414784kB time=00:50:58.33 bitrate=19861.1kbi
frame=185151 fps=4588 q=-1.0 size= 7496960kB time=00:51:33.23 bitrate=19854.7kbi
frame=188046 fps=4603 q=-1.0 size= 7610368kB time=00:52:21.50 bitrate=19845.3kbi
frame=189885 fps=4591 q=-1.0 size= 7685888kB time=00:52:52.20 bitrate=19848.3kbi
frame=193431 fps=4621 q=-1.0 size= 7761408kB time=00:53:51.34 bitrate=19676.5kbi
frame=196550 fps=4669 q=-1.0 Lsize= 7799116kB time=00:54:43.37 bitrate=19458.7kb
its/s speed= 78x
video:7704206kB audio:89623kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.067837%




Do I need to tell FFmpeg more information about the source file which I have seen suggested but I have been unable to implement. Again all Help is appreciated


-
Transcoding HEVC 4K HDR using ffmpeg and vaapi
13 mai 2021, par P. BrandI am trying to transcode a 4K HEVC HDR video to a lower bitrate using ffmpeg and VAAPI hardware acceleration for my LG OLED television.



I use the following file :
Video



Using the following command :



ffmpeg -init_hw_device vaapi=va:/dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device va -filter_hw_device va -i LG\ 4K\ HDR\ Demo\ -\ Daylight.mkv -map 0:0 -t 00:00:20 -c:v hevc_vaapi -sei hdr -qp:v 21 lg_vaapi.mkv




But this file is not recognized as HDR on my TV.



When using the libx265 encoder (which is off course much slower) it works fine :



ffmpeg -i LG\ 4K\ HDR\ Demo\ -\ Daylight.mkv -t 00:00:20 -map 0:0 -c:v libx265 -preset medium -crf 18 -x265-params "colorprim=bt2020:colormatrix=bt2020nc:transfer=smpte2084:colormatrix=bt2020nc:hdr=1:info=1:repeat-headers=1:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(11000000,40)" lg_libx265.mkv




When comparing the output of mediainfo on both files I can see the following properties are not set for the video track :



- 

- Color range
- Color primaries
- Transfer characteristics









mediainfo for vaapi encode :



General
Unique ID : 168011494166392912924249315217763643529 
(0x7E65D636029A5354FE73998A5ED6B089)
Complete name : lg_vaapi.mkv
Format : Matroska
Format version : Version 4
File size : 118 MiB
Duration : 20 s 4 ms
Overall bit rate : 49.6 Mb/s
Writing application : Lavf58.20.100
Writing library : Lavf58.20.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5@Main
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 20 s 4 ms
Bit rate : 48.6 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.098
Stream size : 116 MiB (98%)
Writing library : Lavc58.35.100 hevc_vaapi
Default : Yes
Forced : No
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0040 cd/m2, max: 1100 cd/m2




mediainfo for the libx265 encode :



General
Unique ID : 261605749278874425324960669956061374077 (0xC4CF6F42FE952004772A02D5819DA67D)
Complete name : lg_libx265.mkv
Format : Matroska
Format version : Version 4
File size : 155 MiB
Duration : 47 s 715 ms
Overall bit rate : 27.3 Mb/s
Writing application : Lavf58.20.100
Writing library : Lavf58.20.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@Main
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 47 s 715 ms
Bit rate : 26.8 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.054
Stream size : 152 MiB (98%)
Writing library : x265 2.8:[Linux][GCC 9.1.0][64 bit] 10bit
Encoding settings : cpuid=1111039 / frame-threads=3 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=8 / scenecut=40 / radl=0 / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=18.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=0 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,50) / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0040 cd/m2, max: 1100 cd/m2




I suspect Color range, Color primaries and Transfer characteristics are necessary to make the file recognized as HDR by my TV. 
How can I add these properties to the VAAPI encoded file ?



Edit :
This patch fixes the problem :
Patch


-
Fast video compression like Whatsapp
5 août 2015, par Douglas AnunciaçãoI need to speed up video compression in my Android app. I’m using FFMPEG and it takes 3 minutes to compress 80MB video. Does anyone knows a better solution ?
The command I’m using is :
/data/data/com.moymer/app_bin/ffmpeg -y -i /storage/emulated/0/DCIM/Camera/VID_20150803_164811363.mp4 -s 640x352 -r 25 -vcodec mpeg4 -ac 1 -preset ultrafast -strict -2 /storage/emulated/0/DCIM/Camera/compressed_video.mp4
I’m running this command using FFMPEG for Android from this github repo : https://github.com/guardianproject/android-ffmpeg-java
The code to use FFMPEG in my project is inside an AsyncTask and is copied below :
@Override
protected Object doInBackground(Object... params) {
ItemRoloDeCamera compressedVideo = new ItemRoloDeCamera();
File videoInputFile = new File(video.getSdcardPath());
File videoFolderFile = videoInputFile.getParentFile();
File videoOutputFile = new File(videoFolderFile, "video_comprimido_moymer.mp4");
if (videoFolderFile.exists())
android.util.Log.e("COMPRESS VIDEO UTILS", "video folder exist");
else
android.util.Log.e("COMPRESS VIDEO UTILS", "video folder DON'T exist");
if (videoInputFile.exists())
android.util.Log.e("COMPRESS VIDEO UTILS", "video input file exist");
else
android.util.Log.e("COMPRESS VIDEO UTILS", "video input file DON'T exist");
if (videoOutputFile.exists())
android.util.Log.e("COMPRESS VIDEO UTILS", "video output file exist");
else
android.util.Log.e("COMPRESS VIDEO UTILS", "video output file DON'T exist");
FfmpegController ffmpegController;
try {
ffmpegController = new FfmpegController(context, videoFolderFile);
Clip clipIn = new Clip(videoInputFile.getAbsolutePath());
ffmpegController.getInfo(clipIn, new ShellUtils.ShellCallback() {
@Override
public void shellOut(String shellLine) {
videoInfo.add(shellLine);
}
@Override
public void processComplete(int exitValue) {
videoInfo.add(String.valueOf(exitValue));
}
});
int rotate = getRotateMetadata();
Clip clipOut = new Clip(videoOutputFile.getAbsolutePath());
clipOut.videoFps = "24";
clipOut.videoBitrate = 512;
clipOut.audioChannels = 1;
clipOut.width = 640;
clipOut.height = 352;
if (rotate == 90)
clipOut.videoFilter = "transpose=1";
else if (rotate == 180)
clipOut.videoFilter = "transpose=1,transpose=1";
else if (rotate == 270)
clipOut.videoFilter = "transpose=1,transpose=1,transpose=1";
millisDuration = getVideoDuration(videoInputFile.getAbsolutePath());
float secondsDuration = millisDuration / 1000f;
clipOut.duration = secondsDuration;
ffmpegController.processVideo(clipIn, clipOut, true, new ShellUtils.ShellCallback() {
@Override
public void shellOut(String shellLine) {
android.util.Log.e("COMPRESS VIDEO UTILS", "shellOut - " + shellLine);
float percentage = getTimeMetadata(shellLine);
if (percentage >= 0f)
publishProgress(percentage);
}
@Override
public void processComplete(int exitValue) {
android.util.Log.e("COMPRESS VIDEO UTILS", "proccess complete - " + exitValue);
}
});
} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally {
if (videoOutputFile.exists()) {
android.util.Log.e("COMPRESS VIDEO UTILS", "finished ffmpeg ---> video output file exist");
compressedVideo.setSdcardPath(videoOutputFile.getAbsolutePath());
return compressedVideo;
} else
android.util.Log.e("COMPRESS VIDEO UTILS", "finished ffmpeg ---> video output file DON'T exist");
}
return compressedVideo;
}
private float getTimeMetadata(String shellLine) {
float percentage = -1;
if (shellLine.contains("time=")) {
String[] timeLine = shellLine.split("=");
String time = timeLine[5];
time = time.replace("bitrate", "");
time = time.trim();
// String source = "00:10:17";
String[] tokens = time.split(":");
int secondsToMs = (int) (Float.parseFloat(tokens[2]) * 1000);
int minutesToMs = Integer.parseInt(tokens[1]) * 60000;
int hoursToMs = Integer.parseInt(tokens[0]) * 3600000;
long timeInMillis = secondsToMs + minutesToMs + hoursToMs;
percentage = (timeInMillis * 100.0f) / millisDuration;
}
return percentage;
}
private int getRotateMetadata() {
int rotate = 0;
String durationString = "";
for (String shellLine : videoInfo) {
if (shellLine.contains("rotate")) {
//rotate : 270
String[] rotateLine = shellLine.split(":");
rotate = Integer.parseInt(rotateLine[1].trim());
}
}
return rotate;
}
public static long getVideoDuration(String videoPath) {
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
retriever.setDataSource(videoPath);
String time = retriever
.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
long timeInmillisec = Long.parseLong(time);
return timeInmillisec;
}The only change I made in the processVideo method was to add the following lines when building the commmand :
cmd.add("-preset");
cmd.add("ultrafast");