Opened 10 years ago

Closed 9 years ago

#1014 closed defect (invalid)

[libvpx][mjpeg] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 67 >= 33

Reported by: Artem A Klevtsov Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: av_interleaved_write_frame libvpx
Cc: Michael Niedermayer Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I tried encode mjpeg video with bp8 codec and get error.
I use following commands:

$ ffmpeg -pass 1 -i /tmp/video/video.avi -vf hqdn3d=2:1:2,format=yuv420p -pix_fmt yuv420p -an -vcodec libvpx -threads 4 -vprofile 0 -vb 1M -g 360 -keyint_min 0 -qmin 1 -qmax 51 -skip_threshold 0 -deadline good -cpu-used 0 -mb_threshold 0 -slices 2 -f rawvideo -y /dev/null
ffmpeg version N-37208-g01fcbdf Copyright (c) 2000-2012 the FFmpeg developers
  built on Feb  7 2012 10:34:18 with gcc 4.6.2 20120120 (prerelease)
  configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-libgsm --enable-libspeex --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-libpulse --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug --disable-static
  libavutil      51. 34.101 / 51. 34.101
  libavcodec     53. 60.100 / 53. 60.100
  libavformat    53. 31.100 / 53. 31.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 60.100 /  2. 60.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, avi, from '/tmp/video/video.avi':
  Metadata:
    creation_time   : 2012-01-26 12:49:21
    encoder         : CanonMVI06
  Duration: 00:00:25.03, start: 0.000000, bitrate: 11340 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, 1 channels, u8, 88 kb/s
[buffer @ 0x2282ec0] w:640 h:480 pixfmt:yuvj422p tb:1/1000000 sar:0/1 sws_param:
[hqdn3d @ 0x2281160] ls:2.000000 cs:1.000000 lt:2.000000 ct:1.000000
[hqdn3d @ 0x2281160] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'Parsed_hqdn3d_0'
[scale @ 0x22837a0] w:640 h:480 fmt:yuvj422p -> w:640 h:480 fmt:yuv420p flags:0x4
[libvpx @ 0x2282040] v1.0.0
Output #0, rawvideo, to '/dev/null':
  Metadata:
    creation_time   : 2012-01-26 12:49:21
    encoder         : Lavf53.31.100
    Stream #0:0: Video: vp8, yuv420p, 640x480, q=1-51, pass 1, 1000 kb/s, 90k tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg -> libvpx)
Press [q] to stop, [?] for help
frame=  751 fps=134 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=   0.0kbits/s    
video:0kB audio:0kB global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

$ ffmpeg -pass 2 -i /tmp/video/video.avi -vf hqdn3d=2:1:2,format=yuv420p -pix_fmt yuv420p -an -vcodec libvpx -threads 4 -vprofile 0 -vb 1M -g 360 -keyint_min 0 -qmin 1 -qmax 51 -skip_threshold 0 -deadline good -cpu-used 0 -mb_threshold 0 -slices 2 -lag-in-frames 16 -minrate 100k -maxrate 2M -arnr-maxframes 7 -arnr-strength 5 -arnr-type centered -auto-alt-ref 1 -acodec libvorbis -ab 80k -ac 2 -ar 48000 -f webm -y test.webm
ffmpeg version N-37208-g01fcbdf Copyright (c) 2000-2012 the FFmpeg developers
  built on Feb  7 2012 10:34:18 with gcc 4.6.2 20120120 (prerelease)
  configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-libgsm --enable-libspeex --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-libpulse --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug --disable-static
  libavutil      51. 34.101 / 51. 34.101
  libavcodec     53. 60.100 / 53. 60.100
  libavformat    53. 31.100 / 53. 31.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 60.100 /  2. 60.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, avi, from '/tmp/video/video.avi':
  Metadata:
    creation_time   : 2012-01-26 12:49:21
    encoder         : CanonMVI06
  Duration: 00:00:25.03, start: 0.000000, bitrate: 11340 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, 1 channels, u8, 88 kb/s
[buffer @ 0x19f9e20] w:640 h:480 pixfmt:yuvj422p tb:1/1000000 sar:0/1 sws_param:
[hqdn3d @ 0x19faa80] ls:2.000000 cs:1.000000 lt:2.000000 ct:1.000000
[hqdn3d @ 0x19faa80] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'Parsed_hqdn3d_0'
[scale @ 0x1a011a0] w:640 h:480 fmt:yuvj422p -> w:640 h:480 fmt:yuv420p flags:0x4
[libvpx @ 0x19fbc20] v1.0.0
Output #0, webm, to 'test.webm':
  Metadata:
    creation_time   : 2012-01-26 12:49:21
    encoder         : Lavf53.31.100
    Stream #0:0: Video: vp8, yuv420p, 640x480, q=1-51, pass 2, 1000 kb/s, 1k tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg -> libvpx)
Press [q] to stop, [?] for help
[webm @ 0x19fb2e0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 67 >= 33
av_interleaved_write_frame(): Invalid argument

My system is Archlinux x86_64 with recent updates. Packages versions:

ffmpeg 20120127-3
libvpx 1.0.0-1

Attachments (1)

video_cut.avi (2.4 MB ) - added by Carl Eugen Hoyos 10 years ago.

Change History (14)

comment:1 by Artem A Klevtsov, 10 years ago

Seems error occurs with 'auto-alt-ref 1' option. I hope this will help.

in reply to:  1 ; comment:2 by Carl Eugen Hoyos, 10 years ago

Component: FFmpegundetermined
Keywords: mjpeg removed

Replying to unikum:

Seems error occurs with 'auto-alt-ref 1' option. I hope this will help.

Yes, please provide a minimal (as short as possible with -an) command line that allows to reproduce the problem (together with complete, uncut console output).

in reply to:  2 comment:3 by Artem A Klevtsov, 10 years ago

Replying to cehoyos:

Replying to unikum:

Seems error occurs with 'auto-alt-ref 1' option. I hope this will help.

Yes, please provide a minimal (as short as possible with -an) command line that allows to reproduce the problem (together with complete, uncut console output).

Ok. I use following script:

ffmpeg -pass 1 -i "/tmp/video/video.avi" -an -vcodec libvpx -vb 1M -f rawvideo -y /dev/null
ffmpeg -pass 2 -i "/tmp/video/video.avi" -an -vcodec libvpx -vb 1M -vp8flags altref -rc_lookahead 16 -f webm -y test.webm

I get following ouput:

sh encode
ffmpeg version N-37208-g01fcbdf Copyright (c) 2000-2012 the FFmpeg developers
  built on Feb  7 2012 10:34:18 with gcc 4.6.2 20120120 (prerelease)
  configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-libgsm --enable-libspeex --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-libpulse --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug --disable-static
  libavutil      51. 34.101 / 51. 34.101
  libavcodec     53. 60.100 / 53. 60.100
  libavformat    53. 31.100 / 53. 31.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 60.100 /  2. 60.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, avi, from '/tmp/video/video.avi':
  Metadata:
    creation_time   : 2012-01-26 12:49:21
    encoder         : CanonMVI06
  Duration: 00:00:25.03, start: 0.000000, bitrate: 11340 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, 1 channels, u8, 88 kb/s
Incompatible pixel format 'yuvj422p' for codec 'libvpx', auto-selecting format 'yuv420p'
[buffer @ 0xb1c140] w:640 h:480 pixfmt:yuvj422p tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0xb15f80] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0xb37600] w:640 h:480 fmt:yuvj422p -> w:640 h:480 fmt:yuv420p flags:0x4
[libvpx @ 0xb15480] v1.0.0
Output #0, rawvideo, to '/dev/null':
  Metadata:
    creation_time   : 2012-01-26 12:49:21
    encoder         : Lavf53.31.100
    Stream #0:0: Video: vp8, yuv420p, 640x480, q=-1--1, pass 1, 1000 kb/s, 90k tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg -> libvpx)
Press [q] to stop, [?] for help
frame=  751 fps=158 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=   0.0kbits/s    
video:0kB audio:0kB global headers:0kB muxing overhead -nan%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
ffmpeg version N-37208-g01fcbdf Copyright (c) 2000-2012 the FFmpeg developers
  built on Feb  7 2012 10:34:18 with gcc 4.6.2 20120120 (prerelease)
  configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-libgsm --enable-libspeex --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-libpulse --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug --disable-static
  libavutil      51. 34.101 / 51. 34.101
  libavcodec     53. 60.100 / 53. 60.100
  libavformat    53. 31.100 / 53. 31.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 60.100 /  2. 60.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, avi, from '/tmp/video/video.avi':
  Metadata:
    creation_time   : 2012-01-26 12:49:21
    encoder         : CanonMVI06
  Duration: 00:00:25.03, start: 0.000000, bitrate: 11340 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 640x480, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 11024 Hz, 1 channels, u8, 88 kb/s
Incompatible pixel format 'yuvj422p' for codec 'libvpx', auto-selecting format 'yuv420p'
[buffer @ 0xa0a640] w:640 h:480 pixfmt:yuvj422p tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0xa04560] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0xa25460] w:640 h:480 fmt:yuvj422p -> w:640 h:480 fmt:yuv420p flags:0x4
[libvpx @ 0xa03620] v1.0.0
Output #0, webm, to 'test.webm':
  Metadata:
    creation_time   : 2012-01-26 12:49:21
    encoder         : Lavf53.31.100
    Stream #0:0: Video: vp8, yuv420p, 640x480, q=-1--1, pass 2, 1000 kb/s, 1k tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg -> libvpx)
Press [q] to stop, [?] for help
[webm @ 0xa02cc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 67 >= 33
av_interleaved_write_frame(): Invalid argument

I notice that error occurs only with 2 pass encoding and when '-vp8flags altref' and '-rc_lookahead 16' used together. Also I tried reproduce it on the XVID source but it encode normally.

Last edited 10 years ago by Artem A Klevtsov (previous) (diff)

comment:4 by Carl Eugen Hoyos, 10 years ago

Does the problem happen for every sample?

in reply to:  4 ; comment:5 by Artem A Klevtsov, 10 years ago

Replying to cehoyos:

Does the problem happen for every sample?

I don't have a lot of material for the experiments. This error manifests itself in much of the video recorded with Canon PowerShot A100.

I cut fragment video which I get this error - http://rghost.ru/download/36693666/49cf45fc832a7a0c6361143179960f4dc03aa352/video.avi
You can spend your own experiment.

in reply to:  5 ; comment:6 by Carl Eugen Hoyos, 10 years ago

Replying to unikum:

Replying to cehoyos:

Does the problem happen for every sample?

I don't have a lot of material for the experiments. This error manifests itself in much of the video recorded with Canon PowerShot A100.

But there are videos for which you cannot reproduce the problem, is that correct?

in reply to:  6 comment:7 by Artem A Klevtsov, 10 years ago

Replying to cehoyos:

Replying to unikum:

Replying to cehoyos:

Does the problem happen for every sample?

I don't have a lot of material for the experiments. This error manifests itself in much of the video recorded with Canon PowerShot A100.

But there are videos for which you cannot reproduce the problem, is that correct?

I did not check all the videos, but I came across at least one video in which an error can not be reproduce. This is enough to say that the error is not reproduce in all the videos.

Video does not pass any additional processing. They are in the form in which were recorded camera.

by Carl Eugen Hoyos, 10 years ago

Attachment: video_cut.avi added

comment:8 by Carl Eugen Hoyos, 10 years ago

Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

I reproduced the problem with attached cut sample and libvpx 0.9.7.

comment:9 by Carl Eugen Hoyos, 10 years ago

Keywords: av_interleaved_write_frame added

comment:10 by Artem A Klevtsov, 10 years ago

If '-rc_lookahead' < 10 2d pass encoded success.

Version 0, edited 10 years ago by Artem A Klevtsov (next)

comment:11 by Michael Niedermayer, 9 years ago

Cc: Michael Niedermayer added

comment:12 by Michael Niedermayer, 9 years ago

According to James Zern this is a bug in libvpx
http://code.google.com/p/webm/issues/detail?id=468

comment:13 by Michael Niedermayer, 9 years ago

Resolution: invalid
Status: openclosed

This issue has been fixed in libvpx v1.1.0-184-g429743c

Note: See TracTickets for help on using tickets.