[FFmpeg-trac] #5411(avfilter:new): Trim filter doesn't work with time specified as HH:MM:SS
FFmpeg
trac at avcodec.org
Sat Apr 9 02:50:19 CEST 2016
#5411: Trim filter doesn't work with time specified as HH:MM:SS
------------------------------------+------------------------------------
Reporter: mulvya | Owner:
Type: defect | Status: new
Priority: normal | Component: avfilter
Version: git-master | Resolution:
Keywords: trim | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Comment (by llogan):
Example input:
{{{
$ ./ffmpeg -f lavfi -i testsrc=d=30 trim.mp4
}}}
9219ec93b145725ac74fbfbde7f67ac5135b85cf creates an invalid output.
Behavior with current git master is the same. Using `starti` and `endi`
instead will produce correct output, but the *i options are not documented
in `doc/filters.texi`.
{{{
$ ./ffmpeg -i trim.mp4 -vf "trim=start=00:00:00:end=00:00:05" output.mp4
ffmpeg version N-54688-g9219ec9 Copyright (c) 2000-2013 the FFmpeg
developers
built on Apr 7 2016 17:39:09 with gcc 5.3.0 (GCC)
configuration:
libavutil 52. 39.100 / 52. 39.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 80.101 / 3. 80.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'trim.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf55.12.102
Duration: 00:00:30.00, start: 0.000000, bitrate: 282 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D),
yuv420p, 320x240 [SAR 1:1 DAR 4:3], 281 kb/s, 25 fps, 25 tbr, 12800 tbn,
25 tbc
Metadata:
handler_name : VideoHandler
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf55.12.102
Stream #0:0(und): Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 320x240
[SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 12800 tbn, 25 tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)
Press [q] to stop, [?] for help
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead
448.936170%
}}}
b3405b1bdacf83f1b9116e70b8cbd3542916b628 creates the trimmed output as
expected.
{{{
$ ./ffmpeg -i trim.mp4 -vf "trim=start=00:00:00:end=00:00:05" output.mp4
ffmpeg version N-54686-gb3405b1 Copyright (c) 2000-2013 the FFmpeg
developers
built on Apr 7 2016 17:33:25 with gcc 5.3.0 (GCC)
configuration:
libavutil 52. 39.100 / 52. 39.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 80.101 / 3. 80.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'trim.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf55.12.102
Duration: 00:00:30.00, start: 0.000000, bitrate: 282 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D),
yuv420p, 320x240 [SAR 1:1 DAR 4:3], 281 kb/s, 25 fps, 25 tbr, 12800 tbn,
25 tbc
Metadata:
handler_name : VideoHandler
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf55.12.102
Stream #0:0(und): Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 320x240
[SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 12800 tbn, 25 tbc
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)
Press [q] to stop, [?] for help
frame= 125 fps=0.0 q=2.0 Lsize= 195kB time=00:00:05.00 bitrate=
319.4kbits/s
video:194kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.682931%
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5411#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list