[FFmpeg-trac] #677(undetermined:new): Tell user when -t or -ss value exceeds input duration
FFmpeg
trac at avcodec.org
Tue Nov 22 20:51:21 CET 2011
#677: Tell user when -t or -ss value exceeds input duration
-------------------------------------+-------------------------------------
Reporter: llogan | Owner:
Type: | Status: new
enhancement | Component:
Priority: wish | undetermined
Version: git- | Keywords:
master | Blocking:
Blocked By: | Analyzed by developer: 0
Reproduced by developer: 0 |
-------------------------------------+-------------------------------------
Lately I've seen a few users on ffmpeg-user[1] and #ffmpeg[2] ask why
their -t or -ss doesn't work, and in these cases it's because they are
using a value that exceeds the input duration.
Current behavior:
{{{
$ ffmpeg -ss 12 -i hop.mp4 -t 3 -y out.mpg
ffmpeg version N-35078-g7831788, Copyright (c) 2000-2011 the FFmpeg
developers
built on Nov 22 2011 10:36:32 with gcc 4.6.2
configuration: --prefix=/usr --enable-gpl
libavutil 51. 26. 0 / 51. 26. 0
libavcodec 53. 36. 0 / 53. 36. 0
libavformat 53. 21. 0 / 53. 21. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 49. 0 / 2. 49. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hop.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf52.32.0
Duration: 00:00:10.13, start: 0.000000, bitrate: 563 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
640x480, 559 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name :
[buffer @ 0x17c1bc0] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:0/1
sws_param:
[mpeg @ 0x17cb5e0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'out.mpg':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.21.0
Stream #0:0(und): Video: mpeg1video, yuv420p, 640x480, q=2-31, 200
kb/s, 90k tbn, 30 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name :
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> mpeg1video)
Press [q] to stop, [?] for help
frame= 0 fps= 0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=
0.0kbits/s dup=0 drop=54
video:0kB audio:0kB global headers:0kB muxing overhead -nan%
}}}
Output file is created, but with 0 bytes:
{{{
$ ls -lh out.mpg
-rw-r--r-- 1 lou lou 0 Nov 22 10:42 out.mpg
}}}
The message could be something like: "Your -ss value exceeds the duration
of your input. Aborting."
I don't know if multiple inputs with different durations would complicate
things.
[1] http://ffmpeg.org/pipermail/ffmpeg-user/2011-November/003222.html
[2] http://ffmpeg.org/pipermail/ffmpeg-devel-irc/2011-November/000309.html
(21:45)
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/677>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list