[FFmpeg-trac] #1425(FFmpeg:new): Clips generated by ffmpeg using segment muxer are not correctly played on some videoplayers

FFmpeg trac at avcodec.org
Wed Jun 6 11:30:43 CEST 2012

#1425: Clips generated by ffmpeg using segment muxer are not correctly played on
some videoplayers
             Reporter:  knovz        |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  FFmpeg       |                  Version:  git-
             Keywords:  segment mp4  |  master
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
 What I am trying to do:
 I am trying to record a video stream from an IP camera (Axis 210). I am
 using segment to split the output in 5 second chunks and generate a
 playing list.
 I would like to be able to play the videos on the playlist one after the
 other seamlessly.
 And/or be able to reproduce each one of the segment clips as an standalone

 What happens:
 During the recording there appears to be no problem, and the clips are
 generated without a problem.

 If I open the playlist on VLC the first clip plays smoothly. Then I have 5
 seconds where VLC counter is working, but no video is played, then the
 second clip is played (while the time counter goes up to something like
 10/5). Then 10 seconds pause, and increasing for every clip.

 It also happens when playing each of the clips separatedly.
 On VLC each one will have a "no video" time equal to the added length of
 all preceding files (equal to the "start" time), first plays ok, 5 seconds
 before the start of video for the second, 10 for the third...

 MPlayer OSX Extended plays the videos correctly, but the time line below
 the image is not correct. It indicates playing time starting on "start" (5
 to 10 seconds on de second clip, ...) but if I try to move the video using
 the handle it tries to play the first 5 seconds (therefore restarting the

 Gnome MPlayer plays everything as I would like it (as if those were
 standalone movies of 5 second length).

 Totem on Ubuntu plays it ok as well.

 Quicktime opens and plays the first clip smoothly.
 The rest of the clips, Quicktime opens them without any problem nor error
 message, but presenting a black screen. If I click play it plays a black
 screen as if everything was normal, for the duration of the clip (more or
 less 5 seconds in my test). Then it stops.
 On the second clip a few frames may appear at the end (the length of the
 clip is 5 seconds, the start time of the stream is a little before than
 the end).

 Ticket #910 (closed as invalid) might be related.

 The command:
 % ffmpeg -v 9 -loglevel 99 -report \
   -i "rtsp://" \
   -map 0 \
   -vcodec mpeg4 \
   -t 60 -f segment \
   -segment_time 5 -segment_format mp4 \
   -segment_list testsegmentedmp4.m3u8 -segment_list_size 30 \

 Tested with current git head N-41352-gc8a1101:
 ffmpeg version N-41352-gc8a1101 Copyright (c) 2000-2012 the FFmpeg
   built on Jun  6 2012 09:34:33 with gcc 4.6.1
   configuration: --enable-gpl --enable-libx264 --enable-x11grab
   libavutil      51. 56.100 / 51. 56.100
   libavcodec     54. 25.100 / 54. 25.100
   libavformat    54.  6.101 / 54.  6.101
   libavdevice    54.  0.100 / 54.  0.100
   libavfilter     2. 78.100 /  2. 78.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100

 The output: please see attached ffmpeg log (ffmpeg-20120606-100145.log
 generated by -report).

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

More information about the FFmpeg-trac mailing list