[FFmpeg-trac] #1526(avcodec:new): Got "Truncating packet of size 4096 to 1" at files with long durations when "-ss" at the near the end of file

FFmpeg trac at avcodec.org
Thu Jul 12 16:11:32 CEST 2012


#1526: Got "Truncating packet of size 4096 to 1" at files with long durations when
"-ss" at the near the end of file
------------------------------------+-----------------------------------
             Reporter:  vladget     |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------

Comment (by vladget):

 Replying to [comment:2 cehoyos]:
 > Is the problem also reproducible with "ffmpeg -ss 00:52:37.640 -i
 /tmp/converter/2012-05-29-W16/input_file.avi -qscale 2 out.avi"?

 Yep, it is reproducible:

 {{{
 % ffmpeg -ss 00:52:37.640 -i /tmp/converter/2012-05-29-W16/input_file.avi
 -qscale 2 out.avi
 ffmpeg version N-41702-gc47fc94 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Jun 20 2012 05:02:24 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
   configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
 --mandir=/usr/share/man --incdir=/usr/include --incdir=/usr/local/include
 --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-gpl
 --enable-nonfree --enable-postproc --enable-pthreads --enable-shared
 --enable-swscale --enable-version3 --disable-ffserver --enable-libvpx
 --enable-runtime-cpudetect
   libavutil      51. 59.100 / 51. 59.100
   libavcodec     54. 25.100 / 54. 25.100
   libavformat    54.  8.100 / 54.  8.100
   libavdevice    54.  0.100 / 54.  0.100
   libavfilter     2. 81.100 /  2. 81.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100
 [avi @ 0x3ea8120] non-interleaved AVI
 Guessed Channel Layout for  Input Stream #0.1 : stereo
 Input #0, avi, from '/tmp/converter/2012-05-29-W16/input_file.avi':
   Duration: 01:37:44.72, start: 0.000000, bitrate: 14956 kb/s
     Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv420p, 720x576 [SAR
 16:15 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
     Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 32000 Hz,
 stereo, s16, 1024 kb/s
 Please use -q:a or -q:v, -qscale is ambiguous
 [buffer @ 0x3ead7a0] w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:16/15
 sws_param:flags=2
 [ffmpeg_buffersink @ 0x3ee35e0] No opaque field provided
 Output #0, avi, to 'out.avi':
   Metadata:
     ISFT            : Lavf54.8.100
     Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x576 [SAR
 16:15 DAR 4:3], q=2-31, 200 kb/s, 25 tbn, 25 tbc
     Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 32000 Hz, stereo, s16
 Stream mapping:
   Stream #0:0 -> #0:0 (dvvideo -> mpeg4)
   Stream #0:1 -> #0:1 (pcm_s16le -> libmp3lame)
 Press [q] to stop, [?] for help
 Truncating packet of size 4096 to 1
 [libmp3lame @ 0x3eacd80] Trying to remove 1152 samples, but que empty
 [avi @ 0x3eafda0] Encoder did not produce proper pts, making some up.
 frame=    0 fps=0.0 q=0.0 Lsize=      10kB time=00:00:00.00 bitrate=
 0.0kbits/s
 video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 2319.444444%
 }}}


 Same, but new type of argument -"-q:v 2":

 {{{
 % ffmpeg -ss 00:52:37.640 -i /tmp/converter/2012-05-29-W16/input_file.avi
 -q:v 2 out.avi
 ffmpeg version N-41702-gc47fc94 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Jun 20 2012 05:02:24 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
   configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
 --mandir=/usr/share/man --incdir=/usr/include --incdir=/usr/local/include
 --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-gpl
 --enable-nonfree --enable-postproc --enable-pthreads --enable-shared
 --enable-swscale --enable-version3 --disable-ffserver --enable-libvpx
 --enable-runtime-cpudetect
   libavutil      51. 59.100 / 51. 59.100
   libavcodec     54. 25.100 / 54. 25.100
   libavformat    54.  8.100 / 54.  8.100
   libavdevice    54.  0.100 / 54.  0.100
   libavfilter     2. 81.100 /  2. 81.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100
 [avi @ 0x75d7120] non-interleaved AVI
 Guessed Channel Layout for  Input Stream #0.1 : stereo
 Input #0, avi, from '/tmp/converter/2012-05-29-W16/input_file.avi':
   Duration: 01:37:44.72, start: 0.000000, bitrate: 14956 kb/s
     Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv420p, 720x576 [SAR
 16:15 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
     Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 32000 Hz,
 stereo, s16, 1024 kb/s
 File 'out.avi' already exists. Overwrite ? [y/N] y
 w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:16/15 sws_param:flags=2
 [ffmpeg_buffersink @ 0x76125e0] No opaque field provided
 Output #0, avi, to 'out.avi':
   Metadata:
     ISFT            : Lavf54.8.100
     Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x576 [SAR
 16:15 DAR 4:3], q=2-31, 200 kb/s, 25 tbn, 25 tbc
     Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 32000 Hz, stereo, s16
 Stream mapping:
   Stream #0:0 -> #0:0 (dvvideo -> mpeg4)
   Stream #0:1 -> #0:1 (pcm_s16le -> libmp3lame)
 Press [q] to stop, [?] for help
 Truncating packet of size 4096 to 1
 [libmp3lame @ 0x75dbd80] Trying to remove 1152 samples, but que empty
 [avi @ 0x75deda0] Encoder did not produce proper pts, making some up.
 frame=    0 fps=0.0 q=0.0 Lsize=      10kB time=00:00:00.00 bitrate=
 0.0kbits/s
 video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 2319.444444%
 }}}
 >
 > Could you provide the output of "ffmpeg -i
 /tmp/converter/2012-05-29-W16/input_file.avi -f null -" (how long is the
 input sample)?

 {{{
 % ffmpeg -i /tmp/converter/2012-05-29-W16/input_file.avi -f null -
 ffmpeg version N-41702-gc47fc94 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Jun 20 2012 05:02:24 with gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
   configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
 --mandir=/usr/share/man --incdir=/usr/include --incdir=/usr/local/include
 --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-gpl
 --enable-nonfree --enable-postproc --enable-pthreads --enable-shared
 --enable-swscale --enable-version3 --disable-ffserver --enable-libvpx
 --enable-runtime-cpudetect
   libavutil      51. 59.100 / 51. 59.100
   libavcodec     54. 25.100 / 54. 25.100
   libavformat    54.  8.100 / 54.  8.100
   libavdevice    54.  0.100 / 54.  0.100
   libavfilter     2. 81.100 /  2. 81.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100
 [avi @ 0x464d120] non-interleaved AVI
 Guessed Channel Layout for  Input Stream #0.1 : stereo
 Input #0, avi, from '/tmp/converter/2012-05-29-W16/input_file.avi':
   Duration: 01:37:44.72, start: 0.000000, bitrate: 14956 kb/s
     Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv420p, 720x576 [SAR
 16:15
     Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 32000 Hz,
 stereo, s16
 [buffer @ 0x464ed20] w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:16/15
 sws_p
 [ffmpeg_buffersink @ 0x464fcc0] No opaque field provided
 Output #0, null, to 'pipe:':
   Metadata:
     encoder         : Lavf54.8.100
     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576
 [SAR 16:
     Stream #0:1: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (dvvideo -> rawvideo)
   Stream #0:1 -> #0:1 (pcm_s16le -> pcm_s16le)
 Press [q] to stop, [?] for help
 [null @ 0x4654a20] Encoder did not produce proper pts, making some up.
 frame= 3882 fps= 59 q=0.0 size=       0kB time=00:02:35.28 bitrate=
 0.0kbits/
 frame= 3890 fps= 58 q=0.0 size=       0kB time=00:02:35.60 bitrate=
 0.0kbits/
 frame= 3899 fps= 58 q=0.0 size=       0kB time=00:02:35.96 bitrate=
 0.0kbits/
 frame= 3908 fps= 58 q=0.0 size=       0kB time=00:02:36.32 bitrate=
 0.0kbits/
 frame= 3916 fps= 57 q=0.0 size=       0kB time=00:02:36.64 bitrate=
 0.0kbits/
 frame= 3924 fps= 57 q=0.0 size=       0kB time=00:02:36.96 bitrate=
 0.0kbits/
 frame= 3930 fps= 57 q=0.0 size=       0kB time=00:02:37.20 bitrate=
 0.0kbits/
 frame= 3982 fps= 57 q=0.0 size=       0kB time=00:02:39.28 bitrate=
 0.0kbits/
 frame= 3991 fps= 57 q=0.0 size=       0kB time=00:02:39.64 bitrate=
 0.0kbits/
 frame= 3999 fps= 56 q=0.0 size=       0kB time=00:02:39.96 bitrate=
 0.0kbits/
 frame= 4019 fps= 56 q=0.0 size=       0kB time=00:02:40.76 bitrate=
 0.0kbits/
 frame= 4060 fps= 55 q=0.0 size=       0kB time=00:02:42.40 bitrate=
 0.0kbits/
 frame= 4067 fps= 55 q=0.0 size=       0kB time=00:02:42.67 bitrate=
 0.0kbits/
 frame= 4078 fps= 54 q=0.0 size=       0kB time=00:02:43.12 bitrate=
 0.0kbits/
 frame= 4086 fps= 54 q=0.0 size=       0kB time=00:02:43.44 bitrate=
 0.0kbits/s
 frame= 4093 fps= 54 q=0.0 size=       0kB time=00:02:43.72 bitrate=
 0.0kbits/s
 frame= 4100 fps= 54 q=0.0 size=       0kB time=00:02:43.99 bitrate=
 0.0kbits/s
 Truncating packet of size 4096 to 1   0kB time=00:48:59.92 bitrate=
 0.0kbits/s
 frame=73501 fps= 35 q=0.0 Lsize=       0kB time=00:49:00.00 bitrate=
 0.0kbits/s
 video:6891kB audio:367500kB subtitle:0 global headers:0kB muxing overhead
 -100.000000%
 }}}

 hmm.... I guess problem in source file, am I right?

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1526#comment:3>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list