Opened 13 years ago

Closed 13 years ago

#426 closed defect (fixed)

Clip buggy playback in ffmpeg but ok in vlc or QT

Reported by: ehsmeng Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: mjpeg yuvj422p regression rst
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Buggy playback in ffmpeg. Output when transcoding:

[mjpeg @ 0x101820400] error count: 75
[mjpeg @ 0x101820400] error y=52 x=59
[mjpeg @ 0x101820400] mjpeg_decode_dc: bad vlc: 0:0 (0x1019a3a30)te=9115.1kbits/s
[mjpeg @ 0x101820400] error dc
[mjpeg @ 0x101820400] error y=50 x=57
[mjpeg @ 0x101820400] error count: 70
[mjpeg @ 0x101820400] error y=45 x=58
[mjpeg @ 0x101820400] error count: 65
[mjpeg @ 0x101820400] error y=45 x=58
[mjpeg @ 0x101820400] error count: 66
[mjpeg @ 0x101820400] error y=45 x=58
[mjpeg @ 0x101820400] error count: 65
[mjpeg @ 0x101820400] error y=52 x=58
[mjpeg @ 0x101820400] error count: 68
[mjpeg @ 0x101820400] error y=46 x=60
[mjpeg @ 0x101820400] error count: 68417kB time=00:00:00.72 bitrate=4746.5kbits/s
[mjpeg @ 0x101820400] error y=46 x=58
[mjpeg @ 0x101820400] error count: 64
[mjpeg @ 0x101820400] error y=46 x=58
frame= 25 fps= 16 q=24.8 Lsize= 464kB time=00:00:01.00 bitrate=3804.3kbits/s
video:463kB audio:0kB global headers:0kB muxing overhead 0.206299%

Playback works fine in Quicktime and VLC.

Attaching example file.

Attachments (1)

out12.jpg (779.1 KB ) - added by Carl Eugen Hoyos 13 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by ehsmeng, 13 years ago

ok, stupid 2.5MB limit. Please see example file here:
http://72.249.183.220/tmp/008575000_sub.mov

comment:2 by Carl Eugen Hoyos, 13 years ago

Component: undeterminedavcodec
Keywords: regression added
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: gitgit-master

For future bug-reports: Please always post complete, uncut output when transcoding!

Related to ticket #267, regression since 8c0fa61a9713a1306fca7997dd04d72ea1f060ea / 7b8ed831eb8432d202dad16dedc1758b018bb1fa

$ ffmpeg -i 008575000_sub.mov -qscale 2 out.avi
ffmpeg version N-32280-gd5d7de7, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep  1 2011 22:47:26 with gcc 4.5.3
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc
  libavutil    51. 14. 0 / 51. 14. 0
  libavcodec   53. 12. 0 / 53. 12. 0
  libavformat  53. 10. 0 / 53. 10. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 37. 0 /  2. 37. 0
  libswscale    2.  0. 0 /  2.  0. 0

Seems stream 0 codec frame rate differs from container frame rate: 600.00 (600/1) -> 25.00 (25/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '008575000_sub.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    creation_time   : 1970-01-01 00:00:00
    encoder         : Lavf53.4.0
  Duration: 00:00:01.00, start: 0.000000, bitrate: 160370 kb/s
    Stream #0.0(eng): Video: mjpeg (jpeg / 0x6765706A), yuvj422p, 1920x1080 [SAR 72:72 DAR 16:9], 160363 kb/s, 25 fps, 25 tbr, 600 tbn, 600 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
Incompatible pixel format 'yuvj422p' for codec 'mpeg4', auto-selecting format 'yuv420p'
[buffer @ 0x1299980] w:1920 h:1080 pixfmt:yuvj422p tb:1/1000000 sar:72/72 sws_param:
[buffersink @ 0x129abc0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x129ea00] w:1920 h:1080 fmt:yuvj422p -> w:1920 h:1080 fmt:yuv420p flags:0x4
Output #0, avi, to 'out.avi':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    creation_time   : 1970-01-01 00:00:00
    ISFT            : Lavf53.10.0
    Stream #0.0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
Stream mapping:
  Stream #0.0 -> #0.0 (mjpeg -> mpeg4)
Press [q] to stop, [?] for help
[mjpeg @ 0x12a2e00] error count: 75
[mjpeg @ 0x12a2e00] error y=52 x=59
[mjpeg @ 0x12a2e00] mjpeg_decode_dc: bad vlc: 0:0 (0x1617c78)trate=23599.2kbits/s
[mjpeg @ 0x12a2e00] error dc
[mjpeg @ 0x12a2e00] error y=50 x=57
[mjpeg @ 0x12a2e00] error count: 70
[mjpeg @ 0x12a2e00] error y=45 x=58
[mjpeg @ 0x12a2e00] error count: 65
[mjpeg @ 0x12a2e00] error y=45 x=58
[mjpeg @ 0x12a2e00] error count: 66
[mjpeg @ 0x12a2e00] error y=45 x=58
[mjpeg @ 0x12a2e00] error count: 65
[mjpeg @ 0x12a2e00] error y=52 x=58
[mjpeg @ 0x12a2e00] error count: 68
[mjpeg @ 0x12a2e00] error y=46 x=60
[mjpeg @ 0x12a2e00] error count: 681904kB time=00:00:00.76 bitrate=20526.2kbits/s
[mjpeg @ 0x12a2e00] error y=46 x=58
[mjpeg @ 0x12a2e00] error count: 64
[mjpeg @ 0x12a2e00] error y=46 x=58
frame=   25 fps= 17 q=2.0 Lsize=    2580kB time=00:00:01.00 bitrate=21131.6kbits/s
video:2573kB audio:0kB global headers:0kB muxing overhead 0.241738%

comment:3 by Michael Niedermayer, 13 years ago

Keywords: rst added
Resolution: fixed
Status: openclosed

by Carl Eugen Hoyos, 13 years ago

Attachment: out12.jpg added

comment:4 by Carl Eugen Hoyos, 13 years ago

Resolution: fixed
Status: closedreopened

Still broken, attached is the 12th frame of the original sample, sufficient to reproduce the problem visually. (Looks fine with ImageMagick and older FFmpeg versions.)

$ ffmpeg -v 9 -loglevel 99 -i out12.jpg out.png
ffmpeg version N-32290-g6fc1299, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep  2 2011 09:37:52 with gcc 4.5.3
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc
  libavutil    51. 14. 0 / 51. 14. 0
  libavcodec   53. 12. 0 / 53. 12. 0
  libavformat  53. 10. 0 / 53. 10. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 37. 0 /  2. 37. 0
  libswscale    2.  0. 0 /  2.  0. 0
[mjpeg @ 0x12a37e0] Unsupported bit depth: 0
[mjpeg @ 0x12a37e0] buffer too small, expanding to 797817 bytes
[mjpeg @ 0x12a37e0] marker=d8 avail_size_in_buf=797817
[mjpeg @ 0x12a37e0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x12a37e0] marker=e0 avail_size_in_buf=797815
[mjpeg @ 0x12a37e0] marker parser used 16 bytes (128 bits)
[mjpeg @ 0x12a37e0] marker=fe avail_size_in_buf=797797
[mjpeg @ 0x12a37e0] marker parser used 12 bytes (96 bits)
[mjpeg @ 0x12a37e0] marker=db avail_size_in_buf=797783
[mjpeg @ 0x12a37e0] index=0
[mjpeg @ 0x12a37e0] qscale[0]: 0
[mjpeg @ 0x12a37e0] index=1
[mjpeg @ 0x12a37e0] qscale[1]: 1
[mjpeg @ 0x12a37e0] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x12a37e0] marker=c4 avail_size_in_buf=797649
[mjpeg @ 0x12a37e0] class=0 index=0 nb_codes=12
[mjpeg @ 0x12a37e0] class=0 index=1 nb_codes=12
[mjpeg @ 0x12a37e0] class=1 index=0 nb_codes=251
[mjpeg @ 0x12a37e0] class=1 index=1 nb_codes=251
[mjpeg @ 0x12a37e0] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x12a37e0] marker=dd avail_size_in_buf=797229
[mjpeg @ 0x12a37e0] restart interval: 120
[mjpeg @ 0x12a37e0] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x12a37e0] marker=c0 avail_size_in_buf=797223
[mjpeg @ 0x12a37e0] sof0: picture: 1920x1080
[mjpeg @ 0x12a37e0] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x12a37e0] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x12a37e0] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x12a37e0] pix fmt id 21111100
[mjpeg @ 0x12a37e0] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x12a37e0] escaping removed 8032 bytes
[mjpeg @ 0x12a37e0] marker=da avail_size_in_buf=797204
[mjpeg @ 0x12a37e0] component: 0
[mjpeg @ 0x12a37e0] component: 1
[mjpeg @ 0x12a37e0] component: 2
[mjpeg @ 0x12a37e0] mjpeg decode frame unused 797204 bytes
Input #0, image2, from 'out12.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0, 1, 1/25: Video: mjpeg, yuvj422p, 1920x1080 [SAR 72:72 DAR 16:9], 1/25, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'yuvj422p' for codec 'png', auto-selecting format 'rgb24'
[buffer @ 0x12a1140] w:1920 h:1080 pixfmt:yuvj422p tb:1/1000000 sar:72/72 sws_param:
[buffersink @ 0x12a3040] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x129b400] w:1920 h:1080 fmt:yuvj422p -> w:1920 h:1080 fmt:rgb24 flags:0x4
[swscaler @ 0x12ad620] No accelerated colorspace conversion found from yuv422p to rgb24.
[swscaler @ 0x12b2d60] No accelerated colorspace conversion found from yuv422p to rgb24.
[swscaler @ 0x12b84a0] No accelerated colorspace conversion found from yuv422p to rgb24.
[png @ 0x12a0ba0] Unsupported bit depth: 0
[mjpeg @ 0x12a37e0] Unsupported bit depth: 0
Output #0, image2, to 'out.png':
  Metadata:
    encoder         : Lavf53.10.0
    Stream #0.0, 0, 1/90000: Video: png, rgb24, 1920x1080 [SAR 1:1 DAR 16:9], 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0 (mjpeg -> png)
Press [q] to stop, [?] for help
[mjpeg @ 0x12a37e0] buffer too small, expanding to 797817 bytes
[mjpeg @ 0x12a37e0] marker=d8 avail_size_in_buf=797817
[mjpeg @ 0x12a37e0] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x12a37e0] marker=e0 avail_size_in_buf=797815
[mjpeg @ 0x12a37e0] marker parser used 16 bytes (128 bits)
[mjpeg @ 0x12a37e0] marker=fe avail_size_in_buf=797797
[mjpeg @ 0x12a37e0] marker parser used 12 bytes (96 bits)
[mjpeg @ 0x12a37e0] marker=db avail_size_in_buf=797783
[mjpeg @ 0x12a37e0] index=0
[mjpeg @ 0x12a37e0] qscale[0]: 0
[mjpeg @ 0x12a37e0] index=1
[mjpeg @ 0x12a37e0] qscale[1]: 1
[mjpeg @ 0x12a37e0] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x12a37e0] marker=c4 avail_size_in_buf=797649
[mjpeg @ 0x12a37e0] class=0 index=0 nb_codes=12
[mjpeg @ 0x12a37e0] class=0 index=1 nb_codes=12
[mjpeg @ 0x12a37e0] class=1 index=0 nb_codes=251
[mjpeg @ 0x12a37e0] class=1 index=1 nb_codes=251
[mjpeg @ 0x12a37e0] marker parser used 418 bytes (3344 bits)
[mjpeg @ 0x12a37e0] marker=dd avail_size_in_buf=797229
[mjpeg @ 0x12a37e0] restart interval: 120
[mjpeg @ 0x12a37e0] marker parser used 4 bytes (32 bits)
[mjpeg @ 0x12a37e0] marker=c0 avail_size_in_buf=797223
[mjpeg @ 0x12a37e0] sof0: picture: 1920x1080
[mjpeg @ 0x12a37e0] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x12a37e0] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x12a37e0] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x12a37e0] pix fmt id 21111100
[mjpeg @ 0x12a37e0] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x12a37e0] escaping removed 8032 bytes
[mjpeg @ 0x12a37e0] marker=da avail_size_in_buf=797204
[mjpeg @ 0x12a37e0] component: 0
[mjpeg @ 0x12a37e0] component: 1
[mjpeg @ 0x12a37e0] component: 2
[mjpeg @ 0x12a37e0] mjpeg decode frame unused 797204 bytes
frame=    1 fps=  0 q=0.0 Lsize=      -0kB time=00:00:00.04 bitrate=  -4.4kbits/s    ^M
video:4538kB audio:0kB global headers:0kB muxing overhead -100.000473%}}}

comment:5 by Michael Niedermayer, 13 years ago

Resolution: fixed
Status: reopenedclosed

Another try, should be fixed now

Note: See TracTickets for help on using tickets.