Opened 10 years ago
Closed 8 years ago
#3846 closed defect (needs_more_info)
The output video show a wrong alpha
Reported by: | Noir89 | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | ProRes, alpha |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
Converting a TIFF Image (with alpha) to PRORES video pixel format yuva444p10le,
result a video where the alpha value overall 255 and not the value in input
picture. After export a single picture from this video alpha values are in
result picture coorrect.
Tested on Windows 8.1 64bit and OS X 10.9 64bit
How to reproduce:
ffmpeg started on 2014-08-11 at 09:15:53 Report written to "ffmpeg-20140811-091553.log" Command line: ffmpeg -report -v 9 -loglevel 99 -i "E:\\zzblock001.tif" -c:v prores_ks -pix_fmt yuva444p10le -r 25 -y "E:\\out.mov" ffmpeg version N-65515-g5ec85c9 Copyright (c) 2000-2014 the FFmpeg developers built on Aug 10 2014 22:09:42 with gcc 4.8.3 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib libavutil 54. 1.100 / 54. 1.100 libavcodec 56. 0.100 / 56. 0.100 libavformat 56. 0.100 / 56. 0.100 libavdevice 56. 0.100 / 56. 0.100 libavfilter 5. 0.100 / 5. 0.100 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 0.100 / 1. 0.100 libpostproc 53. 0.100 / 53. 0.100 Splitting the commandline. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'. Reading option '-i' ... matched as input file with argument 'E:\zzblock001.tif'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'prores_ks'. Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuva444p10le'. Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option 'E:\out.mov' ... matched as output file. Finished splitting the commandline. Parsing a group of options: global . Applying option report (generate a report) with argument 1. Applying option v (set logging level) with argument 9. Applying option loglevel (set logging level) with argument 99. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input file E:\zzblock001.tif. Successfully parsed a group of options. Opening an input file: E:\zzblock001.tif. [AVIOContext @ 0000000004339240] Statistics: 8303406 bytes read, 0 seeks [image2 @ 0000000004337e80] Probe buffer size limit of 5000000 bytes reached Input #0, image2, from 'E:\zzblock001.tif': Duration: 00:00:00.04, start: 0.000000, bitrate: N/A Stream #0:0, 1, 1/25: Video: tiff, rgba, 1920x1080 [SAR 1:1 DAR 16:9], 1/25, 25 tbr, 25 tbn, 25 tbc Successfully opened the file. Parsing a group of options: output file E:\out.mov. Applying option c:v (codec name) with argument prores_ks. Applying option pix_fmt (set pixel format) with argument yuva444p10le. Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25. Successfully parsed a group of options. Opening an output file: E:\out.mov. Successfully opened the file. detected 8 logical cores [graph 0 input from stream 0:0 @ 000000000002e460] Setting 'video_size' to value '1920x1080' [graph 0 input from stream 0:0 @ 000000000002e460] Setting 'pix_fmt' to value '28' [graph 0 input from stream 0:0 @ 000000000002e460] Setting 'time_base' to value '1/25' [graph 0 input from stream 0:0 @ 000000000002e460] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 000000000002e460] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 000000000002e460] Setting 'frame_rate' to value '25/1' [graph 0 input from stream 0:0 @ 000000000002e460] w:1920 h:1080 pixfmt:rgba tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2 [format @ 000000000435c800] compat: called with args=[yuva444p10le] [format @ 000000000435c800] Setting 'pix_fmts' to value 'yuva444p10le' [auto-inserted scaler 0 @ 000000000435e0c0] Setting 'flags' to value '0x4' [auto-inserted scaler 0 @ 000000000435e0c0] w:iw h:ih flags:'0x4' interl:0 [format @ 000000000435c800] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format' [AVFilterGraph @ 000000000433cf80] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed [auto-inserted scaler 0 @ 000000000435e0c0] w:1920 h:1080 fmt:rgba sar:1/1 -> w:1920 h:1080 fmt:yuva444p10le sar:1/1 flags:0x4 [prores_ks @ 0000000000029280] profile 2, 1020 slices, interlacing: no, 632 bits per MB [prores_ks @ 0000000000029280] frame size upper bound: 655040 Output #0, mov, to 'E:\out.mov': Metadata: encoder : Lavf56.0.100 Stream #0:0, 0, 1/12800: Video: prores (prores_ks) (apcn / 0x6E637061), yuva444p10le, 1920x1080 [SAR 1:1 DAR 16:9], 1/25, q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc Metadata: encoder : Lavc56.0.100 prores_ks Stream mapping: Stream #0:0 -> #0:0 (tiff (native) -> prores (prores_ks)) Press [q] to stop, [?] for help [output stream 0:0 @ 000000000433f920] EOF on sink link output stream 0:0:default. No more output streams to write to, finishing. frame= 1 fps=0.0 q=0.0 Lsize= 69kB time=00:00:00.04 bitrate=14157.8kbits/s video:68kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.034768% Input file #0 (E:\zzblock001.tif): Input stream #0:0 (video): 1 packets read (8303406 bytes); 1 frames decoded; Total: 1 packets (8303406 bytes) demuxed Output file #0 (E:\out.mov): Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (70064 bytes); Total: 1 packets (70064 bytes) muxed 2 frames successfully decoded, 0 decoding errors [AVIOContext @ 0000000004339e00] Statistics: 30 seeks, 27 writeouts
Change History (18)
comment:1 by , 10 years ago
Component: | undetermined → avcodec |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Not tested, but alpha is not correctly handled because of ticket #2760. Once the fixes under review are committed, it would be worth reevaluating, and determine if it is eg a duplicate.
comment:5 by , 10 years ago
Test with latest Build Windows x64 and OS X
Problem is not solved.
Version:
libavutil 54. 3.100 / 54. 3.100
libavcodec 56. 0.101 / 56. 0.101
libavformat 56. 1.100 / 56. 1.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.100 / 5. 0.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 0.100 / 1. 0.100
libpostproc 53. 0.100 / 53. 0.100
comment:6 by , 10 years ago
I'm not getting what the issue really is then. The prores file generated by "libavcodec 56. 0.101" has an alpha channel that looks proper to me. In particular, not, as you describe, "whose overall value is 255".
When decoding back the prores file into whatever image format understood by eg gimp and supporting alpha, the alpha channel is identical to your "zzblock001.tif". You seem to already confirm this.
So, what's missing? Are you for instance reporting that a software that handles prores with alpha displays the prores files produced by ffmpeg incorrectly?
Obviously the alpha content is in those files, as ffmpeg knows how to retrieve it. But maybe it is incorrectly flagged for this software?
comment:7 by , 10 years ago
Cc: | added |
---|
comment:8 by , 10 years ago
After decoding back into an image, the alpha channel is identical to "zzblock001.tif".
But in the resulting video, the alpha channel is not correct. Tested with Adober After Effects and Final Cut Pro.
https://dl.dropboxusercontent.com/u/13796764/Final_Cut_Pro_Screenshot.png
comment:9 by , 10 years ago
OK, I dug a bit more, you need to specify "-profile 4444" on the command line. In the meantime, I'll see what to do about the user friendliness of that.
comment:10 by , 10 years ago
Ok, now with this option in Final Cut Pro alpha looks good, but in After Effects is a wrong alpha.
On Friday i can test it with target Software and Hardware. After that i can you tell more.
comment:11 by , 10 years ago
By the way, could you also test with "-pix_fmt yuv444p10le -profile 4444"? I suspect some of your software may misbehave (even crash) if we use a profile for alpha content, but don't have encode it.
The After Effect situation is unfortunate, but I fear it will be more difficult to solve. Maybe try adding "-alpha_bits N" with N being 0/8/16?
Thank you.
comment:12 by , 10 years ago
With "-alpha_bits 8" i have noch changes in After Effects.
Final Cut Pro works also with "-pix_fmt yuv444p10le -profile 4444", but has no alpha channel. The other Software can i try on Friday.
Thanks for your help
comment:13 by , 10 years ago
Does After Effect support alpha at all? A way to test this, if possible, would be to save with Final Cut Pro a sequence you know contains alpha in prores 4444 format, and try reopening it in After Effects. If this one works, please provide the prores file. Ideally, it would be the same sequence as we are debugging with.
comment:14 by , 10 years ago
Sorry for the late reply.
After Effects Support Alpha. I export this image from FCP and in After Effects is a correct alpha channel.
Video from FCP:
https://dl.dropboxusercontent.com/u/13796764/ffmpeg/ProRes_FCP.mov
And with an other picture from this video, i had some strong artefacts.
Picture:
https://dl.dropboxusercontent.com/u/13796764/ffmpeg/zz_0380.tif
comment:17 by , 8 years ago
Cc: | removed |
---|
comment:18 by , 8 years ago
Resolution: | → needs_more_info |
---|---|
Status: | new → closed |
Unclear, the encoder stores alpha just fine.
http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket3846/