[FFmpeg-user] ffmpeg -ss start-time issue

Henk D. Schoneveld belcampo at zonnet.nl
Thu Mar 27 15:31:35 CET 2014


On 27 Mar 2014, at 15:07, richard heade <richard.heade at gmail.com> wrote:

> I'm a newbie, I've just started using ffmpeg, so I fully expect that I'm
> doing something wrong and I could use some help.  I'm using "ffmpeg
> input.mpg -ss 123.456 -t 12.345" to extract a clip from an mpeg 2 file. 
> It works really well except for one significant problem, ffmpeg and I
> (or avidemux) don't agree on where 123.456 is.  I use avidemux to
> determine the start time, 123.456.  Avidemux2_gtk allows me to play the
> video and at any point it displays the frame number, elapsed time and
> frame type.
> 
> I'm running ffmpeg 2.1.1 with gcc 4.7.  It reports the video properties as:
> Duration: 03:04:56.08, start: 1.874000, bitrate: 10112 kb/s
>    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 1280x720
> [SAR 1:1 DAR 16:9], max. 24000 kb/s, 59.94 fps, 59.94 tbr, 90k tbn,
> 119.88 tbc
>    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
> 
Have a close look above which says
Duration: 03:04:56.08, start: 1.874000
It doesn’t start at 0.0, maybe add this value to -ss
Or at that point isn’t a I-frame/Keyframe and the nearest is taken. It’s not possible to cut at an arbitrary frame without re-encoding to an all I-frame/Keyframe file.
> I'm running Avidemux 2.5.6.  It reports the video properties as:
> Video:
> Codec 4CC: MPEG
> Image Size: 1280x720
> Aspect Ratio: 1:1
> Frame Rate: 59.940 fps
> Frame Count: 624061 frames
> Total Duration: 02:53:31.428
> Audio:
> Codec: AC3
> Channels: 6
> Bitrate: 48000 Bps  / 384 kbps
> Variable Bitrate: No
> Frequency: 48000 Hz
> Total Duration: 03:04:55.520
> File Size: 507.91MB
> 
> It would unfortunate if avidemux and ffmpeg are just incompatible,
> though I would accept that, because I haven't found another way to
> accurately determine the starting position of a clip within a video.  If
> they are incompatible is there another way, compatible with ffmpeg, to
> get the frame count, elapsed time, and frame type from a video?
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140327/a2b0f944/attachment.asc>


More information about the ffmpeg-user mailing list