Encoded video plays too fast for network input
|Reported by:||Roman Gaufman||Owned by:|
|Blocking:||Reproduced by developer:||yes|
|Analyzed by developer:||no|
Many IP cameras have MJPEG streams that vary in framerate depending network conditions, ambient light, just plain slow processors on the camera itself, etc. This can be anything from 8fps to 30fps - even if the camera is set to a fixed framerate.
Right now, if you set a framerate in ffmpeg, the duration ffmpeg thinks the movie is does not match reality, sometimes by a factor of more than 3x. While ffmpeg supports variable framerate it requires timestamps which in this case do not exist.
Gstreamer has an option called do-timestamp=true that would be very useful in ffmpeg. From their website: "Timestamps are set on the buffers as they arrive from the camera. These are used by the mime/multipart demultiplexer to emit timestamps on the JPEG-encoded video frame buffers. This allows the multiplexer to timestamp the frames in the resulting file."
This would allow ffmpeg to set the timestamp of "now" on every single frame as it comes in and know the correct duration of the recording. This means correct duration, a/v sync and just being able to seek to specific parts of the recording.
Change History (9)
comment:5 by , 10 years ago
|Reproduced by developer:||set|
|Status:||new → open|
|Summary:||Generate timestamps for source (like do-timestamp=true in gstreamer) → Encoded video plays too fast for network input|
|Type:||enhancement → defect|
|Version:||unspecified → git-master|