Opened 6 years ago
Closed 6 years ago
#7347 closed defect (fixed)
HEVC HDR playback issues
Reported by: | enen92 | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mov hevc dvvideo |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
FFmpeg (ffplay) incorrectly identifies video codec as dvvideo and fails. If you force hevc decoder it will play. Streams can be found here (labeled as HDR_HVEC):
https://sylvan.apple.com/Aerials/2x/entries.json
Example stream: https://sylvan.apple.com/Aerials/2x/Videos/LA_A006_C008_2K_HDR_HEVC.mov
This issue was also submitted on Kodi trac: https://trac.kodi.tv/ticket/17831
How to reproduce:
% ffplay https://sylvan.apple.com/Aerials/2x/Videos/LA_A006_C008_2K_HDR_HEVC.mov Version: 4.0.2
Attachments (1)
Change History (17)
comment:1 by , 6 years ago
Summary: | HVEC HDR playback issues → HEVC HDR playback issues |
---|
comment:2 by , 6 years ago
Keywords: | hevc added; hvec removed |
---|
follow-up: 9 comment:3 by , 6 years ago
comment:4 by , 6 years ago
Component: | ffmpeg → avformat |
---|---|
Keywords: | mov added; hdr removed |
Reproduced by developer: | set |
Status: | new → open |
by , 6 years ago
Attachment: | LA_A006_C008_2K_HDR_HEVC_cut.mov added |
---|
follow-up: 6 comment:5 by , 6 years ago
'dvh1' is actually the FourCC for Dolby Vision videos (dvh1 for the hvc1 variant, dvhe for hev1). Although I could only find it in Dolby docs, not sure if they registered it officially for mov/mp4.
Is the DVCPRO HD code official somewhere? Or just something FFmpeg somehow "allows" in mov?
Apple devices definitely understand 'dvh1' (the Dolby Vision one), so considering Apple owns MOV, its probably valid.
comment:6 by , 6 years ago
Replying to heleppkes:
'dvh1' is actually the FourCC for Dolby Vision videos (dvh1 for the hvc1 variant, dvhe for hev1). Although I could only find it in Dolby docs, not sure if they registered it officially for mov/mp4.
They did (and it should definitely not been allowed).
Is the DVCPRO HD code official somewhere? Or just something FFmpeg somehow "allows" in mov?
https://web.archive.org/web/20070330141901/https://msdn.microsoft.com/archive/en-us/directx9_c/directx/htm/dvvideosubtypes.asp
Contrary to popular believe here, MEncoder was not the usual application writing such (mov) files.
follow-up: 8 comment:7 by , 6 years ago
Microsoft FourCCs are not automatically valid in every container format. They apply to AVI, not MOV or MP4.
comment:8 by , 6 years ago
Replying to heleppkes:
Microsoft FourCCs are not automatically valid in every container format. They apply to AVI, not MOV or MP4.
I was neither saying this nor am I believing it. It's imo just not very helpful to mention it.
follow-up: 11 comment:9 by , 6 years ago
Replying to jkqxz:
The video stream is tagged as 'dvh1', indicating that it contains DVCPRO HD video. It actually does contain a valid H.265 stream, but FFmpeg does not probe the content of files where the container explicitly signals its parameters (H.265 video should be tagged as 'hvc1' or 'hev1').
You can remux the file with:
ffmpeg -c:v hevc -i LA_A006_C008_2K_HDR_HEVC.mov -c:v copy remuxed.movto make it playable.
Do you know how the file was created? Maybe the muxer which made it is misconfigured somehow?
Thanks for taking a look. I have no idea how the files were created. Those are the aerial videos Apple uses in their Apple TV4 screensaver. The main reason for posting the "bug" was mainly because I found vlc was able to play the file without any issues nor further configurations unlike ffmpeg. So I though maybe something could be improved in ffmpeg. I don't want nor need to remux the files, I can already play them in ffplay if I force the hevc decoder.
If it is a false positive feel free to close.
comment:10 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
comment:11 by , 6 years ago
Replying to enen92:
The main reason for posting the "bug" was mainly because I found vlc was able to play the file without any issues nor further configurations unlike ffmpeg.
Thank you for the report, it is much appreciated! We love samples that don't work here;-)
comment:12 by , 6 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It will be nice to implement not only Dolby Vision "dvh1" profile, but also "dvhe", "dva1" und "dvav" Dolby Vision profiles. The follow patch fixes codec recognition error.
+++ libavformat/isom.c (working copy) @@ -164,6 +164,13 @@ { AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') }, /* HEVC/H.265 which indicates parameter sets may be in ES */ { AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which indicates parameter sets shall not be in ES */ + // Dolby vision HEVC + { AV_CODEC_ID_HEVC, MKTAG('d', 'v', 'h', 'e') }, /* HEVC/H.265 Dobly Vision HEV1 */ + //{ AV_CODEC_ID_HEVC, MKTAG('d', 'v', 'h', '1') }, /* HEVC/H.265 Dolby Vision HVC1 */ + // Dolby vision H264 + { AV_CODEC_ID_H264, MKTAG('d', 'v', 'a', 'v') }, /* HEVC/H.264 Dolby Vision AVC3S */ + { AV_CODEC_ID_H264, MKTAG('d', 'v', 'a', '1') }, /* HEVC/H.264 Dolby Vision AVC1 */ + { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */ { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '2') }, { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '3') },
Please note that patch above works only for mov container (and not for mp4, mkv, ts ...). Unfortunately MKTAG('d', 'v', 'h', '1') codec_tag is already used for AV_CODEC_ID_DVVIDEO codec. It's why it's commented in my patch, but it will be nice to have at least for "mp4" und "ts".
Dolby Vision public documentation can be found under:
https://www.dolby.com/us/en/technologies/dolby-vision/dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2.0.pdf
https://www.dolby.com/in/en/technologies/dolby-vision/dolby-vision-profiles-levels-v1-2-92-171021.pdf
Dobly Vision transport stream with codec tag "dvhe" can be found under:
http://4kmedia.org/tag/dolby-vision/
I hope it helps (FYI: VLC supports Dolby Vision profiles)
Thanks in advance
comment:13 by , 6 years ago
Please send your patch - made with git format-patch
- to the FFmpeg development mailing list, patches are ignored here.
comment:16 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
A similar patch was committed, my suggestion to mention your patch was sadly ignored:
6ebe88f3a4c427511eba7495896f4a57a2b4b529
The video stream is tagged as 'dvh1', indicating that it contains DVCPRO HD video. It actually does contain a valid H.265 stream, but FFmpeg does not probe the content of files where the container explicitly signals its parameters (H.265 video should be tagged as 'hvc1' or 'hev1').
You can remux the file with:
to make it playable.
Do you know how the file was created? Maybe the muxer which made it is misconfigured somehow?