[FFmpeg-user] How do I make ffplay play without high latency?
tojesseg at gmail.com
Fri Nov 23 20:33:04 CET 2012
On 11/22/2012 11:01 AM, Nicolas George wrote:
> Le duodi 2 frimaire, an CCXXI, Jesse Gordon a écrit :
>>> ffmpeg ... -f sdl -
>> It looks like (from the man page) that low_delay is only an encoding
>> option for motion encoding or something - but I could be wrong.
> The flags for the "low_delay" option seem to indicate it is relevant both
> for encoding and decoding, and I see a lot of decoders actually checking it.
> Again, trying it to see if it makes a difference is the most efficient
> course of action.
ffmpeg -i test.flv -f sdl -
(Didn't seem to work -- see below.)
(This is the static build from Burek.)
Actually, you've got me to thinking: if I can make ffmpeg (or ffplay)
output a PNM image stream (or other raw image format) I can pipe it into
my existing XVIDEO raw image stream player. Or can I make ffplay or
ffmpeg spit out YUV frames directly?
(I have a simple C program that reads a PNM image stream in stdin,
converts it to YUV and displays it with XVIDEO. It's reasonably
efficient and low-latency.
However it seems more simple to just tell ffmpeg to "play as fast as
possible." I guess if it doesn't already have a -benchmark type option
it would be easy enough to add one.
I looked through ffplay.c to try to find where I could comment out a
call to the frame delay routine but couldn't find it. Anyone have a
function name I could look for?
I did try -vf "setpts=(PTS*0.9)" which make sit play a bit faster --
which does let the playing catch up with the streaming -- but then it
still seems to stop and buffer in order to try to maintain the desired
root at gatewaylaptop:/big# ffmpeg -i test.flv -f sdl -
ffmpeg version N-46821-g8ad9b48 Copyright (c) 2000-2012 the FFmpeg developers
built on Nov 17 2012 05:11:19 with gcc 4.6 (Debian 4.6.3-1)
configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32 --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static' --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
libavutil 52. 7.100 / 52. 7.100
libavcodec 54. 71.100 / 54. 71.100
libavformat 54. 36.100 / 54. 36.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 23.100 / 3. 23.100
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Input #0, flv, from 'test.flv':
major_brand : mp42
minor_version : 1
creation_time : 2012-07-29 15:04:46
comment : CAMCORDER BW10
comment-eng : CAMCORDER BW10
encoder : Lavf52.100.1
Duration: 00:01:02.25, start: 0.000000, bitrate: 7918 kb/s
Stream #0:0: Video: flv1, yuv420p, 1280x720, 7680 kb/s, 29.97 tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16, 256 kb/s
[NULL @ 0x969e160] Requested output format 'sdl' is not a suitable output format
pipe:: Invalid argument
root at gatewaylaptop:/big#
More information about the ffmpeg-user