[FFmpeg-user] Using ffplay to play a video during creation
Marton Balint
cus at passwd.hu
Wed May 14 02:31:14 CEST 2014
On Tue, 13 May 2014, Zack Thevenot wrote:
>
> I am using ffplay to essentially stream a video from another device. I
> have the device continually creating a H264 video file and transmitting
> it to a PC in 2KB packets, and ffplay is playing it on the fly, even as
> the file is being appended to. What I would like to do is make this
> process cleaner on ffplay. Every so often, from what I can tell, ffplay
> tries to play an incomplete frame and the video grays out or blurs. Is
> there a way I can tell ffplay to pause at the last good frame? Or to
> play/continue playing only when there are good frames yet to play? Or
> maybe something else is going on?
Some demuxers just flush their incomplete packets if they reach the end
of file, so the codecs will get corrupted packets. I don't think this can
be easily fixed, so a better approach instead of playing a file which is
being appended to is to do some kind of streaming, and play the stream.
You may try to find a "tail -f" like program for binary files, and pipe
the output to the standard input of ffplay and play the standard input,
and see how it works.
Regards,
Marton
>
> I would just like to know if cleaning up my stream is possible through
> ffplay rather than my input. If I do have to process my input
> further, I'm not very familiar with H264 format and could use some
> resources.
More information about the ffmpeg-user
mailing list