[FFmpeg-trac] #1526(undetermined: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 12:26:43 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      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:  start time,  |               Blocked By:
  ffio                               |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 I'm trying to encode video encoded from dv in avi container to x264 in mp4
 container but got error... (please see output below)

 If I decreasing start time of input stream from 00:52:37.640 to
 00:42:37.640 or lower it start converting.. I have tried to move "-ss" to
 the end(before output argument) it will shown no errors but it taked to
 much time for transcoding...


 How to reproduce:
 {{{
 /usr/bin/ffmpeg -y -v 9 -loglevel 99 \
 -ss 00:52:37.640 -t 367 \
 -i "/tmp/converter/2012-05-29-W16/input_file.avi" \
 -pass 1 \
 -passlogfile "/tmp/converter/2012-05-29-W16/input_file/out_input_file.log"
 \
 -vcodec libx264 \
 -x264opts level=3.1:threads=auto \
 -vf
 "yadif,format=yuv420p,scale=iw*sar:ih,fade=in:0:25,fade=out:9150:25,crop=736:560:16:8,setsar=1:1,setdar=736:560"
 \
 -preset slow \
 -b:v 1700k \
 -an \
 -f mp4 \
 -threads 0 \
 /dev/null
 }}}

 Output:
 {{{
 # /usr/bin/ffmpeg -y -v 9 -loglevel 99 -ss 00:52:37.640 -t 367 -i
 "/tmp/converter/2012-05-29-W16/input_file.avi" -pass 1 -passlogfile
 "/tmp/converter/2012-05-29-W16/input_file/out_input_file.log" -vcodec
 libx264 -x264opts level=3.1:threads=auto -vf
 "yadif,format=yuv420p,scale=iw*sar:ih,fade=in:0:25,fade=out:9150:25,crop=736:560:16:8,setsar=1:1,setdar=736:560"
 -preset slow -b:v 1700k -an -f mp4 -threads 0 /dev/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 @ 0x12527120] Format avi probed with size=2048 and score=100
 [avi @ 0x12527740] use odml:1
 st:0 removing common factor 400000 from timebase
 st:1 removing common factor 4 from timebase
 [avi @ 0x12527120] non-interleaved AVI
 [avi @ 0x12527120] File position before avformat_find_stream_info() is
 64668
 [avi @ 0x12527120] parser not found for codec dvvideo, packets or times
 may be invalid.
 [avi @ 0x12527120] parser not found for codec pcm_s16le, packets or times
 may be invalid.
 [avi @ 0x12527120] parser not found for codec dvvideo, packets or times
 may be invalid.
 [avi @ 0x12527120] parser not found for codec pcm_s16le, packets or times
 may be invalid.
 [avi @ 0x12527120] All info found
 [avi @ 0x12527120] File position after avformat_find_stream_info() is
 3733036
 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, 1, 1/25: Video: dvvideo (dvsd / 0x64737664), yuv420p,
 720x576 [SAR 16:15 DAR 4:3], 1/25, 25 tbr, 25 tbn, 25 tbc
     Stream #0:1, 1, 1/32000: Audio: pcm_s16le ([1][0][0][0] / 0x0001),
 32000 Hz, stereo, s16, 1024 kb/s
 [Parsed_yadif_0 @ 0x12528a20] mode:0 parity:-1 auto_enable:0
 [Parsed_fade_3 @ 0x1252a260] type:in start_frame:0 nb_frames:25 alpha:0
 [Parsed_fade_4 @ 0x1252aea0] type:out start_frame:9150 nb_frames:25
 alpha:0
 [Parsed_setsar_6 @ 0x1252f3c0] a:1/1
 [Parsed_setdar_7 @ 0x1252ad60] a:46/35
 [vbuffer source @ 0x1252c9a0] Setting entry with key 'video_size' to value
 '720x576'
 [vbuffer source @ 0x1252c9a0] Setting entry with key 'pix_fmt' to value
 '0'
 [vbuffer source @ 0x1252c9a0] Setting entry with key 'time_base' to value
 '1/25'
 [vbuffer source @ 0x1252c9a0] Setting entry with key 'pixel_aspect' to
 value '16/15'
 [vbuffer source @ 0x1252c9a0] Setting entry with key 'sws_param' to value
 'flags=2'
 [vbuffer source @ 0x1252c9a0] Setting entry with key 'frame_rate' to value
 '25/1'
 [buffer @ 0x1252bbe0] w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:16/15
 sws_param:flags=2
 [ffmpeg_buffersink @ 0x1252aa40] No opaque field provided
 [Parsed_scale_2 @ 0x12529bc0] w:720 h:576 fmt:yuv420p sar:16/15 -> w:768
 h:576 fmt:yuv420p sar:1/1 flags:0x4
 [Parsed_crop_5 @ 0x1252b9a0] w:768 h:576 sar:1/1 -> w:736 h:560 sar:1/1
 [Parsed_setdar_7 @ 0x1252ad60] w:736 h:560 -> dar:46/35 sar:1/1
 [libx264 @ 0x125281e0] using mv_range_thread = 24
 [libx264 @ 0x125281e0] using SAR=1/1
 [libx264 @ 0x125281e0] using cpu capabilities: MMX2 SSE2Fast SSSE3
 FastShuffle SSE4.2
 [libx264 @ 0x125281e0] profile Main, level 3.1
 [libx264 @ 0x125281e0] 264 - core 125 r2200 999b753 - H.264/MPEG-4 AVC
 codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options:
 cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1
 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0
 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12
 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2
 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=detected 8 logical
 cores
 Output #0, mp4, to '/dev/null':
   Metadata:
     encoder         : Lavf54.8.100
     Stream #0:0, 0, 1/25: Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
 736x560 [SAR 1:1 DAR 46:35], 1/25, q=-1--1, pass 1, 1700 kb/s, 25 tbn, 25
 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (dvvideo -> libx264)
 Press [q] to stop, [?] for help
 Truncating packet of size 4096 to 1
 No more inputs to read from, finishing.
 frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=
 0.0kbits/s
 video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -100.000000%
 [libx264 @ 0x125281e0] final ratefactor: 20.28
 [AVIOContext @ 0x1252f7a0] Statistics: 2260992 bytes read, 95 seeks
 }}}

 Additional info:
 {{{
 % ffprobe "/tmp/converter/2012-05-29-W16/input_file.avi"
 ffprobe version N-41702-gc47fc94 Copyright (c) 2007-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 @ 0x1e597220] non-interleaved AVI
 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, 2
 channels, s16, 1024 kb/s



 % ls -lah "/tmp/converter/2012-05-29-W16/input_file.avi"
 -rw-r--r-- 1 root root 11G Jul 12 09:25
 /tmp/converter/2012-05-29-W16/input_file.avi

 }}}

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


More information about the FFmpeg-trac mailing list