[Ffmpeg-devel] Unable to set duration

Vidar Normann vidarno
Sat Nov 4 16:53:15 CET 2006


Hi,

I have had this problem with several pre-packaged versions of ffmpeg, but
also the
current svn version, hope somebody has a solution. The ffmpeg version used
is
compiled plain as vanilla with just "./configure". I am running on an amd64
machine
using a Logitech Quickcam for Notebooks Pro webcam as a video-source, via
the uvc-driver.

I am trying to accomplish: Recording videos with a specified duration (1
hour), for the
purpose of storing a 24-hour "backlog" of what has happened, this is for a
surveillance
system. The plan so far is to run a looping script that records an hour
(naming the file
after the current hour) and then repeating "forever".

The problem: According to the manpage, documentation page and other sources
the correct parameter is "-t x", where 'x' is the duration of the recording,
in seconds.
(Alternative format is "-t hh:mm:ss", I have tried both)
When using this parameter I get no indication that ffmpeg is setting the
duration,
I have to stop the recording by pressing "q", I have tried putting the
parameter at
all possible places in the command-line, first, last, in the middle, etc..

My command line:
ffmpeg -t "00:00:06" -vd "/dev/video0" -target svcd -s 640x480 "test.mpg

The console output:
FFmpeg version SVN-r6880, Copyright (c) 2000-2006 Fabrice Bellard, et al.
  configuration:
  libavutil version: 49.0.2
  libavcodec version: 51.24.0
  libavformat version: 51.6.0
  built on Nov  3 2006 11:21:22, gcc: 4.1.2 20060928 (prerelease) (Ubuntu
4.1.1-13ubuntu5)
Assuming PAL for target.
[video4linux2 @ 0x7af370][4]Capabilities: 4000001
The V4L2 driver changed the video from 640x480 to 1024x576
Input #0, video4linux2, from '':
  Duration: N/A, bitrate: N/A
  Stream #0.0: Video: rawvideo, yuv422, 1024x576, 235929 kb/s, 25.00 fps(r)
Input #1, audio_device, from '':
  Duration: N/A, bitrate: N/A
  Stream #1.0: Audio: pcm_s16le, 44100 Hz, mono, 705 kb/s
PIX_FMT_YUV420P will be used as an intermediate format for rescaling
Output #0, svcd, to 'test.mpg':
  Stream #0.0: Video: mpeg2video, yuv420p, 640x480, q=2-31, 2040 kb/s,
25.00fps(c)
  Stream #0.1: Audio: mp2, 44100 Hz, mono, 224 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #1.0 -> #0.1
Press [q] to stop encoding
frame=  212 q=3.0 Lsize=    2342kB time=8.4 bitrate=2273.3kbits/s
video:608kB audio:0kB global headers:0kB muxing overhead 284.931243%



Again, this problem has had me stumped and I have found no help in the
mailing-list archives,
the irc-channel, documentation and mailing-list for users, even though many
friendly people
have tried. Consider this a challenge. :)

Regards,
Vidar




More information about the ffmpeg-devel mailing list