[FFmpeg-trac] #2307(FFmpeg:new): Stream segmenter bug if total recorded length > 12 hours

FFmpeg trac at avcodec.org
Wed Feb 27 11:48:25 CET 2013


#2307: Stream segmenter bug if total recorded length > 12 hours
-------------------------------------+-------------------------------------
             Reporter:  dgillier     |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  FFmpeg       |                  Version:  1.1.3
             Keywords:  segment,     |               Blocked By:
  duration                           |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I'm recording UDP streams with transcoding to disk.
 UDP source are MPEGTS stream with MPEG2 encoding (TV channels).

 I'm transcoding and recording in H264 using 30 minutes chunks. After the
 #24 segment  is recorded (so after 12 hours of recording) the audio
 duration info is wrong in the file (look like a signed vs unsigned
 variable problem).

 Here is what I'm doing :
 ffmpeg -i udp://xx.xx.xx.xx:5000 -map 0:0 -map 0:1 -s 640x360 -vcodec
 libx264 -g 60 -vb 500000 -strict experimental -vf yadif -acodec aac -ab
 96000 -ac 2 -y -f segment -segment_format mp4 -segment_time 1800
 /mnt/%03dt.mp4

 I tried to change the audio codec to libvo_aacenc with the same result.
 So it seems to be related to the segmenter.

 Here is a copy of the ffmpeg dump when I inspect the file:
 Correct files  (segment 0 to 24):

 [root at srv1 ~]# ffmpeg -i /mnt/video/www/2013-01-25/tf1/tf1-024.mp4
 ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
   built on Jan 12 2013 16:56:27 with gcc 4.4.6 (GCC) 20120305 (Red Hat
 4.4.6-4)
   configuration: --enable-gpl --enable-libmp3lame --enable-libtheora
 --enable-libvo-aacenc --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-version3
   libavutil      52. 13.100 / 52. 13.100
   libavcodec     54. 86.100 / 54. 86.100
   libavformat    54. 59.106 / 54. 59.106
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 32.100 /  3. 32.100
   libswscale      2.  1.103 /  2.  1.103
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  2.100 / 52.  2.100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x3156500] Invalid SampleDelta in STTS
 -2073690672
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/mnt/video/www/2013-01-25/tf1/tf1-024.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf54.59.106
   '''Duration: 00:30:00.32''', start: 0.000000, bitrate: 662 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 640x360 [SAR 1:1 DAR 16:9], 560 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
 fltp, 96 kb/s
     Metadata:
       handler_name    : SoundHandler
 At least one output file must be specified
 --------------------------------------------------------------------------
 Bad files  (segment #25 and more)
 [root at srv1 ~]# ffmpeg -i /mnt/026.mp4
 ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
   built on Jan 12 2013 16:56:27 with gcc 4.4.6 (GCC) 20120305 (Red Hat
 4.4.6-4)
   configuration: --enable-gpl --enable-libmp3lame --enable-libtheora
 --enable-libvo-aacenc --enable-libvorbis --enable-libvpx --enable-libx264
 --enable-version3
   libavutil      52. 13.100 / 52. 13.100
   libavcodec     54. 86.100 / 54. 86.100
   libavformat    54. 59.106 / 54. 59.106
   libavdevice    54.  3.102 / 54.  3.102
   libavfilter     3. 32.100 /  3. 32.100
   libswscale      2.  1.103 /  2.  1.103
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  2.100 / 52.  2.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/mnt/video/www/2013-01-25/tf1/tf1-026.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf54.59.106
 '''  Duration: 12:21:15.64,''' start: 0.000000, bitrate: 22 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 640x360 [SAR 1:1 DAR 16:9], 455 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
 fltp, 3 kb/s
     Metadata:
       handler_name    : SoundHandler
 At least one output file must be specified

 Any clue on this ?
 Thanks.
 Denis

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


More information about the FFmpeg-trac mailing list