[FFmpeg-trac] #10103(undetermined:new): mov enc: QT doesn't like TIFF GRAY8 in MOV created by ffmpeg
FFmpeg
trac at avcodec.org
Thu Dec 15 02:40:01 EET 2022
#10103: mov enc: QT doesn't like TIFF GRAY8 in MOV created by ffmpeg
-------------------------------------+-------------------------------------
Reporter: ami_stuff | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
TIFF GRAY8 in MOV created by ffmpeg decodes incorrectly with QT Player,
because QT Player expects 0x28 instead of 0x18 in stsd atom.
Attached patch fixes the problem, but I'm not sure if it's the best
solution.
If it's not then please fix the issue whatever way you like.
avctx->bits_per_coded_sample is set to 0x28 for GRAY8 in tiff encoder, but
it's not forwarded to mov muxer, where it's always set to 0:
{{{
case AV_PIX_FMT_GRAY8:
avctx->bits_per_coded_sample = 0x28;
}}}
{{{
./ffmpeg -i 160.bmp -vcodec tiff -pix_fmt gray gray.mov
ffmpeg version N-109332-g45ab5307a6 Copyright (c) 2000-2022 the FFmpeg
developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --enable-libopenjpeg
libavutil 57. 43.100 / 57. 43.100
libavcodec 59. 54.100 / 59. 54.100
libavformat 59. 34.102 / 59. 34.102
libavdevice 59. 8.101 / 59. 8.101
libavfilter 8. 51.100 / 8. 51.100
libswscale 6. 8.112 / 6. 8.112
libswresample 4. 9.100 / 4. 9.100
Input #0, bmp_pipe, from '160.bmp':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: bmp, bgr24, 160x120, 25 fps, 25 tbr, 25 tbn
Stream mapping:
Stream #0:0 -> #0:0 (bmp (native) -> tiff (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'gray.mov':
Metadata:
encoder : Lavf59.34.102
Stream #0:0: Video: tiff (tiff / 0x66666974), gray(pc, progressive),
160x120, q=2-31, 200 kb/s, 25 fps, 12800 tbn
Metadata:
encoder : Lavc59.54.100 tiff
frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate=
-0.0kbframe= 1 fps=0.0 q=-0.0 Lsize= 20kB time=00:00:00.00
bitrate=N/A speed= 0x
video:19kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 3.705027%
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10103>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list