Opened 11 years ago

Closed 11 years ago

#2620 closed defect (fixed)

ffmpeg don't stop encoding if example -ss 00:05:00 -t 00:01:00

Reported by: telperion Owned by:
Priority: important Component: avfilter
Version: git-master Keywords: trim regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

ffmpeg don't stop encoding if example -ss 00:05:00 -t 00:01:00

How to reproduce:

% ffmpeg -i input -ss 00:05:00 -t 00:01:00 output


ffmpeg version N-53736-g1fb52bf Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  1 2013 14:41:56 with gcc 4.7 (Debian 4.7.3-4)
  configuration: --extra-cflags='-g -O3 -mtune=core2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-frei0r --enable-libopencv --enable-libfreetype --enable-libvo-aacenc --enable-libvo-amrwbenc --disable-decoder=amrnb --enable-libaacplus --enable-libdc1394 --disable-altivec --disable-armv5te --disable-armv6 --disable-vis --disable-ffserver --disable-shared --enable-static --enable-vdpau --enable-libfdk-aac --enable-libass --enable-libvidstab --enable-opencl --enable-libiec61883

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (8)

comment:1 by telperion, 11 years ago

ffmpeg version N-53493-g1c711b6
works:

./ffmpeg -i test.mkv -ss 00:02:00 -t 00:01:00 test.avi
ffmpeg version N-53493-g1c711b6 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  1 2013 16:06:25 with gcc 4.7 (Debian 4.7.3-4)
  configuration: --extra-cflags='-g -O3 -mtune=core2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-frei0r --enable-libopencv --enable-libfreetype --enable-libvo-aacenc --enable-libvo-amrwbenc --disable-decoder=amrnb --enable-libaacplus --enable-libdc1394 --disable-altivec --disable-armv5te --disable-armv6 --disable-vis --disable-ffserver --disable-shared --enable-static --enable-vdpau --enable-libfdk-aac --enable-libass --enable-libvidstab --enable-opencl --enable-libiec61883
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.100 / 55. 12.100
  libavformat    55.  7.100 / 55.  7.100
  libavdevice    55.  1.101 / 55.  1.101
  libavfilter     3. 70.101 /  3. 70.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from 'test.mkv':
  Metadata:
    ENCODER         : Lavf55.8.102
  Duration: 01:42:07.44, start: 0.000000, bitrate: 746 kb/s
    Stream #0:0: Video: h264 (High), yuv420p, 644x428 [SAR 16:11 DAR 2576:1177], SAR 243:167 DAR 39123:17869, 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
    Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp (default)
Output #0, avi, to 'test.avi':
  Metadata:
    ISFT            : Lavf55.7.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 644x428 [SAR 243:167 DAR 39123:17869], q=2-31, 200 kb/s, 25 tbn, 25 tbc (default)
    Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp (default)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
  Stream #0:1 -> #0:1 (aac -> libmp3lame)
Press [q] to stop, [?] for help
frame= 1500 fps=175 q=31.0 Lsize=    3056kB time=00:01:00.00 bitrate= 417.3kbits/s    
video:2014kB audio:938kB subtitle:0 global headers:0kB muxing overhead 3.533343%

comment:2 by Carl Eugen Hoyos, 11 years ago

Component: FFmpegundetermined

Please provide the input sample test.mkv

in reply to:  2 comment:3 by telperion, 11 years ago

Replying to cehoyos:

Please provide the input sample test.mkv

Any video is valid for test, better a long video.
After the end point ffmpeg don't stop and continue seek to the end of file.

ffmpeg -f lavfi -i testsrc=size=854x480:duration=­600 out.mp4
frame=15000 fps= 88 q=-1.0 Lsize=    6468kB time=00:09:59.92 bitrate=  88.3kbits/s    
video:6409kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.931592%

ffmpeg -report -i out.mp4 -ss 00:01:00 -t 00:01:00 test.avi

report ffmpeg version N-53493-g1c711b6
(stops at the end point correctly after 60 sec)

ffmpeg started on 2013-06-01 at 21:14:14
Report written to "ffmpeg-20130601-211414.log"
Command line:
ffmpeg -report -i out.mp4 -ss 00:01:00 -t 00:01:00 test.avi
ffmpeg version N-53493-g1c711b6 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  1 2013 16:06:25 with gcc 4.7 (Debian 4.7.3-4)
  configuration: --extra-cflags='-g -O3 -mtune=core2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-frei0r --enable-libopencv --enable-libfreetype --enable-libvo-aacenc --enable-libvo-amrwbenc --disable-decoder=amrnb --enable-libaacplus --enable-libdc1394 --disable-altivec --disable-armv5te --disable-armv6 --disable-vis --disable-ffserver --disable-shared --enable-static --enable-vdpau --enable-libfdk-aac --enable-libass --enable-libvidstab --enable-opencl --enable-libiec61883
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.100 / 55. 12.100
  libavformat    55.  7.100 / 55.  7.100
  libavdevice    55.  1.101 / 55.  1.101
  libavfilter     3. 70.101 /  3. 70.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-i' ... matched as input file with argument 'out.mp4'.
Reading option '-ss' ... matched as option 'ss' (set the start time offset) with argument '00:01:00'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '00:01:00'.
Reading option 'test.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file out.mp4.
Successfully parsed a group of options.
Opening an input file: out.mp4.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c9bba0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c9bba0] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c9bba0] File position before avformat_find_stream_info() is 6623667
[h264 @ 0x1c9c900] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c9bba0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1c9bba0] File position after avformat_find_stream_info() is 6390
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.7.100
  Duration: 00:10:00.00, start: 0.000000, bitrate: 88 kb/s
    Stream #0:0(und), 1, 1/12800: Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 854x480 [SAR 1:1 DAR 427:240], 87 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
    Metadata:
      handler_name    : VideoHandler
Successfully opened the file.
Parsing a group of options: output file test.avi.
Applying option ss (set the start time offset) with argument 00:01:00.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 00:01:00.
Successfully parsed a group of options.
Opening an output file: test.avi.
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 0:0 @ 0x1c954e0] Setting 'video_size' to value '854x480'
[graph 0 input from stream 0:0 @ 0x1c954e0] Setting 'pix_fmt' to value '5'
[graph 0 input from stream 0:0 @ 0x1c954e0] Setting 'time_base' to value '1/12800'
[graph 0 input from stream 0:0 @ 0x1c954e0] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x1c954e0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x1c954e0] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x1c954e0] w:854 h:480 pixfmt:yuv444p tb:1/12800 fr:25/1 sar:1/1 sws_param:flags=2
[format @ 0x1c97360] compat: called with args=[yuv420p]
[format @ 0x1c97360] Setting 'pix_fmts' to value 'yuv420p'
[auto-inserted scaler 0 @ 0x1c977a0] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0x1c977a0] w:iw h:ih flags:'0x4' interl:0
[format @ 0x1c97360] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x1c94440] query_formats: 5 queried, 4 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0x1c977a0] w:854 h:480 fmt:yuv444p sar:1/1 -> w:854 h:480 fmt:yuv420p sar:1/1 flags:0x4
[mpeg4 @ 0x1c9fce0] intra_quant_bias = 0 inter_quant_bias = -64
Output #0, avi, to 'test.avi':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    ISFT            : Lavf55.7.100
    Stream #0:0(und), 0, 1/25: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
Press [q] to stop, [?] for help
[h264 @ 0x1f4f420] no picture 
[h264 @ 0x1f942c0] no picture 
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=   75 fps= 19 q=10.3 size=     289kB time=00:00:03.00 bitrate= 789.8kbits/s    
frame=  178 fps= 39 q=31.0 size=     473kB time=00:00:07.12 bitrate= 543.8kbits/s    
frame=  286 fps= 57 q=31.0 size=     670kB time=00:00:11.44 bitrate= 480.0kbits/s    
frame=  387 fps= 70 q=31.0 size=     860kB time=00:00:15.48 bitrate= 455.2kbits/s    
frame=  487 fps= 81 q=31.0 size=    1041kB time=00:00:19.48 bitrate= 437.8kbits/s    
frame=  584 fps= 90 q=31.0 size=    1219kB time=00:00:23.36 bitrate= 427.4kbits/s    
frame=  687 fps= 98 q=31.0 size=    1413kB time=00:00:27.48 bitrate= 421.1kbits/s    
frame=  789 fps=105 q=31.0 size=    1597kB time=00:00:31.56 bitrate= 414.4kbits/s    
frame=  886 fps=110 q=31.0 size=    1773kB time=00:00:35.44 bitrate= 409.9kbits/s    
frame=  986 fps=116 q=31.0 size=    1964kB time=00:00:39.44 bitrate= 408.0kbits/s    
frame= 1085 fps=120 q=31.0 size=    2144kB time=00:00:43.40 bitrate= 404.7kbits/s    
frame= 1185 fps=124 q=31.0 size=    2323kB time=00:00:47.40 bitrate= 401.4kbits/s    
frame= 1285 fps=128 q=24.8 size=    2512kB time=00:00:51.40 bitrate= 400.3kbits/s    
frame= 1384 fps=131 q=31.0 size=    2686kB time=00:00:55.36 bitrate= 397.5kbits/s    
frame= 1484 fps=134 q=31.0 size=    2861kB time=00:00:59.36 bitrate= 394.8kbits/s    
EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
frame= 1500 fps=135 q=31.0 Lsize=    2910kB time=00:01:00.00 bitrate= 397.3kbits/s    
video:2868kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.447225%
3013 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x1ca3b80] Statistics: 9 seeks, 1509 writeouts
[AVIOContext @ 0x1ca4180] Statistics: 1437384 bytes read, 2 seeks

report ffmpeg version N-53736-g1fb52bf
(parse all the video and takes a long time If the video is very long)

ffmpeg started on 2013-06-01 at 21:11:23
Report written to "ffmpeg-20130601-211123.log"
Command line:
ffmpeg -report -i out.mp4 -ss 00:01:00 -t 00:01:00 test.avi
ffmpeg version N-53736-g1fb52bf Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  1 2013 14:41:56 with gcc 4.7 (Debian 4.7.3-4)
  configuration: --extra-cflags='-g -O3 -mtune=core2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-frei0r --enable-libopencv --enable-libfreetype --enable-libvo-aacenc --enable-libvo-amrwbenc --disable-decoder=amrnb --enable-libaacplus --enable-libdc1394 --disable-altivec --disable-armv5te --disable-armv6 --disable-vis --disable-ffserver --disable-shared --enable-static --enable-vdpau --enable-libfdk-aac --enable-libass --enable-libvidstab --enable-opencl --enable-libiec61883
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.102 / 55. 12.102
  libavformat    55.  8.102 / 55.  8.102
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 73.100 /  3. 73.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-i' ... matched as input file with argument 'out.mp4'.
Reading option '-ss' ... matched as option 'ss' (set the start time offset) with argument '00:01:00'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '00:01:00'.
Reading option 'test.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file out.mp4.
Successfully parsed a group of options.
Opening an input file: out.mp4.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22d7ba0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22d7ba0] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22d7ba0] File position before avformat_find_stream_info() is 6623667
[h264 @ 0x22d8900] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22d7ba0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22d7ba0] File position after avformat_find_stream_info() is 6390
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.7.100
  Duration: 00:10:00.00, start: 0.000000, bitrate: 88 kb/s
    Stream #0:0(und), 1, 1/12800: Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 854x480 [SAR 1:1 DAR 427:240], 87 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
    Metadata:
      handler_name    : VideoHandler
Successfully opened the file.
Parsing a group of options: output file test.avi.
Applying option ss (set the start time offset) with argument 00:01:00.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 00:01:00.
Successfully parsed a group of options.
Opening an output file: test.avi.
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 0:0 @ 0x22d1440] Setting 'video_size' to value '854x480'
[graph 0 input from stream 0:0 @ 0x22d1440] Setting 'pix_fmt' to value '5'
[graph 0 input from stream 0:0 @ 0x22d1440] Setting 'time_base' to value '1/12800'
[graph 0 input from stream 0:0 @ 0x22d1440] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x22d1440] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x22d1440] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x22d1440] w:854 h:480 pixfmt:yuv444p tb:1/12800 fr:25/1 sar:1/1 sws_param:flags=2
[format @ 0x22d32c0] compat: called with args=[yuv420p]
[format @ 0x22d32c0] Setting 'pix_fmts' to value 'yuv420p'
[auto-inserted scaler 0 @ 0x22d2980] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0x22d2980] w:iw h:ih flags:'0x4' interl:0
[format @ 0x22d32c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x22d03a0] query_formats: 5 queried, 4 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0x22d2980] w:854 h:480 fmt:yuv444p sar:1/1 -> w:854 h:480 fmt:yuv420p sar:1/1 flags:0x4
[mpeg4 @ 0x22dbce0] intra_quant_bias = 0 inter_quant_bias = -64
Output #0, avi, to 'test.avi':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    ISFT            : Lavf55.8.102
    Stream #0:0(und), 0, 1/25: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
Press [q] to stop, [?] for help
[h264 @ 0x258b560] no picture 
[h264 @ 0x25d0280] no picture 
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A    
frame=   59 fps= 15 q=6.2 size=     230kB time=00:00:02.36 bitrate= 796.8kbits/s    
frame=  165 fps= 37 q=31.0 size=     449kB time=00:00:06.60 bitrate= 557.5kbits/s    
frame=  263 fps= 52 q=31.0 size=     628kB time=00:00:10.52 bitrate= 488.9kbits/s    
frame=  361 fps= 65 q=24.8 size=     814kB time=00:00:14.44 bitrate= 462.1kbits/s    
frame=  464 fps= 77 q=31.0 size=     998kB time=00:00:18.56 bitrate= 440.4kbits/s    
frame=  563 fps= 86 q=31.0 size=    1178kB time=00:00:22.52 bitrate= 428.5kbits/s    
frame=  662 fps= 94 q=31.0 size=    1368kB time=00:00:26.48 bitrate= 423.1kbits/s    
frame=  765 fps=102 q=31.0 size=    1552kB time=00:00:30.60 bitrate= 415.6kbits/s    
frame=  863 fps=108 q=31.0 size=    1730kB time=00:00:34.52 bitrate= 410.7kbits/s    
frame=  959 fps=112 q=31.0 size=    1908kB time=00:00:38.36 bitrate= 407.4kbits/s    
frame= 1056 fps=117 q=31.0 size=    2085kB time=00:00:42.24 bitrate= 404.3kbits/s    
frame= 1157 fps=121 q=31.0 size=    2275kB time=00:00:46.28 bitrate= 402.7kbits/s    
frame= 1260 fps=125 q=31.0 size=    2459kB time=00:00:50.40 bitrate= 399.6kbits/s    
frame= 1359 fps=129 q=31.0 size=    2642kB time=00:00:54.36 bitrate= 398.2kbits/s    
frame= 1462 fps=132 q=31.0 size=    2820kB time=00:00:58.48 bitrate= 395.1kbits/s    
frame= 1500 fps=130 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps=124 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps=119 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps=115 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps=110 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps=107 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps=103 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 99 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 96 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 93 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 90 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 88 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 85 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 83 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 81 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 79 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 77 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 75 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 73 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 71 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 69 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 68 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 66 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 65 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 64 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 62 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 61 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 60 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 59 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 57 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 56 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 55 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 54 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 53 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 52 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 52 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 51 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 50 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 49 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 48 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 47 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 47 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 46 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 45 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 45 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 44 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 43 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 43 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 42 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 42 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 41 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 40 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 40 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 39 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 39 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 38 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
frame= 1500 fps= 38 q=31.0 size=    2887kB time=00:01:00.00 bitrate= 394.1kbits/s    
EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
frame= 1500 fps= 38 q=31.0 Lsize=    2910kB time=00:01:00.00 bitrate= 397.3kbits/s    
video:2868kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.447225%
15006 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x22dfa60] Statistics: 9 seeks, 1509 writeouts
[AVIOContext @ 0x22e0180] Statistics: 6680264 bytes read, 2 seeks

comment:4 by Carl Eugen Hoyos, 11 years ago

Works fine here, could you recompile? (Maybe with less options, some of them look very broken.)

$ ffmpeg -f lavfi -i testsrc=size=854x480:duration=600 out.mp4
ffmpeg version N-53736-g1fb52bf Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  1 2013 21:52:52 with gcc 4.7 (SUSE Linux)
  configuration:
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.102 / 55. 12.102
  libavformat    55.  8.102 / 55.  8.102
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 73.100 /  3. 73.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
Input #0, lavfi, from 'testsrc=size=854x480:duration=600':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 854x480 [SAR 1:1 DAR 427:240], 25 tbr, 25 tbn, 25 tbc
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf55.8.102
    Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 12800 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Press [q] to stop, [?] for help
[swscaler @ 0x2a85080] Warning: data is not aligned! This can lead to a speedloss
frame=15000 fps=259 q=31.0 Lsize=   27343kB time=00:10:00.00 bitrate= 373.3kbits/s
video:27278kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.236658%
$ ffmpeg -i out.mp4 -ss 00:01:00 -t 00:01:00 test.avi
ffmpeg version N-53736-g1fb52bf Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  1 2013 21:52:52 with gcc 4.7 (SUSE Linux)
  configuration:
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.102 / 55. 12.102
  libavformat    55.  8.102 / 55.  8.102
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 73.100 /  3. 73.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf55.8.102
  Duration: 00:10:00.00, start: 0.000000, bitrate: 373 kb/s
    Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 372 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc
    Metadata:
      handler_name    : VideoHandler
Output #0, avi, to 'test.avi':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    ISFT            : Lavf55.8.102
    Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)
Press [q] to stop, [?] for help
frame= 1500 fps=578 q=31.0 Lsize=    2341kB time=00:01:00.00 bitrate= 319.6kbits/s
video:2299kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.802684%

comment:5 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavfilter
Keywords: trim regression added
Priority: normalimportant
Reproduced by developer: set
Status: newopen

I don't know if I understand the ticket (ffmpeg definitely does stop encoding) but if there is an issue, it is a regression since ed1c835

comment:6 by Carl Eugen Hoyos, 11 years ago

$ time ffmpeg -i out.mp4 -ss 00:01:00 -t 00:01:00 test.avi
ffmpeg version N-53495-g4f8e4b8 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  1 2013 22:48:50 with gcc 4.7 (SUSE Linux)
  configuration:
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 12.100 / 55. 12.100
  libavformat    55.  7.100 / 55.  7.100
  libavdevice    55.  1.101 / 55.  1.101
  libavfilter     3. 70.101 /  3. 70.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.8.102
  Duration: 00:10:00.00, start: 0.000000, bitrate: 57 kb/s
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 854x480 [SAR 1:1 DAR 427:240], 54 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
    Metadata:
      handler_name    : VideoHandler
Output #0, avi, to 'test.avi':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    ISFT            : Lavf55.7.100
    Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
Press [q] to stop, [?] for help
frame= 1500 fps=380 q=31.0 Lsize=    2882kB time=00:01:00.00 bitrate= 393.4kbits/s
video:2840kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.462303%

real    0m3.969s
user    0m9.423s
sys     0m0.146s
$ time ffmpeg -i out.mp4 -ss 00:01:00 -t 00:01:00 test.avi
ffmpeg version N-53746-gec34963 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun  1 2013 22:52:00 with gcc 4.7 (SUSE Linux)
  configuration:
  libavutil      52. 34.100 / 52. 34.100
  libavcodec     55. 13.100 / 55. 13.100
  libavformat    55.  8.102 / 55.  8.102
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 74.101 /  3. 74.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.8.102
  Duration: 00:10:00.00, start: 0.000000, bitrate: 57 kb/s
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 854x480 [SAR 1:1 DAR 427:240], 54 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
    Metadata:
      handler_name    : VideoHandler
Output #0, avi, to 'test.avi':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    ISFT            : Lavf55.8.102
    Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
Press [q] to stop, [?] for help
frame= 1500 fps=100 q=31.0 Lsize=    2882kB time=00:01:00.00 bitrate= 393.4kbits/s
video:2840kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.462303%

real    0m15.019s
user    0m31.781s
sys     0m0.197s

in reply to:  5 comment:7 by telperion, 11 years ago

Replying to cehoyos:

I don't know if I understand the ticket (ffmpeg definitely does stop encoding) but if there is an issue, it is a regression since ed1c835

I'm sorry for my bad English.
ffmpeg correctly encode the footage, but instead of stopping itself at the end of the same, continues until the end of the video, wasting much time, to do anything.

comment:8 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: openclosed

Fixed by Nicolas George in 50a4d07, thank you for the report!

Note: See TracTickets for help on using tickets.