Open cnlohr opened 4 months ago
FFMPEG fails very early on and reports the following:
[gif @ 0x5e118417e500] Opening 'video-64x48x8.gif' for reading
[file @ 0x5e118417eb40] Setting default whitelist 'file,crypto,data'
[gif @ 0x5e118417e500] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:1
[gif @ 0x5e118417e500] invalid block label
[gif @ 0x5e118417e500] stream 0: start_time: 0 duration: 0
[gif @ 0x5e118417e500] format: start_time: 0 duration: NOPTS (estimate from stream) bitrate=0 kb/s
[gif @ 0x5e118417e500] After avformat_find_stream_info() pos: 1831802 bytes read:1831802 seeks:0 frames:0
Input #0, gif, from 'video-64x48x8.gif':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0, 0, 1/100: Video: gif, 1 reference frame, bgra, 128x96, 0/1, 100 tbr, 100 tbn
video-64x48x8.gif.zip The image did not seem to attach, I decided to zip it.
TIL "depth" is bit depth, not colors.
Ah, that still doesn't fix it for lower bit depths, for instance, "1" still produces an error, after 207 frames.
[gif @ 0x5db76e953ec0] code=21 '!'
[gif @ 0x5db76e953ec0] code=2c ','
[libx264 @ 0x5db76e95a8c0] frame= 156 QP=16.00 NAL=0 Slice:B Poc:308 I:0 P:11 SKIP:37 size=24 bytes
[gif @ 0x5db76e953ec0] code=21 '!'
[gif @ 0x5db76e953ec0] code=2c ','
[libx264 @ 0x5db76e95a8c0] frame= 157 QP=16.00 NAL=0 Slice:B Poc:312 I:0 P:9 SKIP:39 size=23 bytes
[gif @ 0x5db76e953ec0] code=21 '!'
[gif @ 0x5db76e953ec0] code=2c ','
[libx264 @ 0x5db76e95a8c0] frame= 158 QP=31.25 NAL=2 Slice:P Poc:316 I:1 P:5 SKIP:42 size=61 bytes
[gif @ 0x5db76e953ec0] code=21 '!'
[gif @ 0x5db76e953ec0] code=2c ','
[gif @ 0x5db76e94a500] invalid block label
[libx264 @ 0x5db76e95a8c0] frame= 159 QP=25.08 NAL=2 Slice:P Poc:318 I:2 P:1 SKIP:45 size=45 bytes
[gif @ 0x5db76e953ec0] code=21 '!'
[gif @ 0x5db76e953ec0] code=2c ','
Blehhh
I got a little further. It looks like if there is a block that has exactly 255? data bits, it emits a second 00 when it should not before the next block.
I somehow am not building against the current master? I think this has been fixed.
When using your encoder in 2-color mode, I have found a specific set of images that produce output that ffmpeg, firefox, and google chrome will cause the video to terminate after 498 frames, instead of the 6,000 frames that are encoded in this video.
Interestingly, tools like xviewer, or eom (eye of mate) both parse the stream fine.
FFMPEG Output with
-loglevel trace
Please note the output frames are not printed in-line with the GIF frame decoding because of buffering.
I also tried another instance, where I set delay to 0, and it failed after 207 frames, with the same error.
My general usage is as follows:
I will continue to investigate.