<p><code>ffmpeg -i https://urlToTheStream/playlist.m3u8 -f yuv4mpegpipe -</code></p>

<p>Read from stdout pipe, The format is documented here <a href="https://wiki.multimedia.cx/index.php/YUV4MPEG2" rel="nofollow noreferrer">https://wiki.multimedia.cx/index.php/YUV4MPEG2</a></p>

CC BY-SA 4.0
2018-06-12T11:12:45.420Z
Thanks for the answer.
Before I start messing around with piping (I am using Java under Windows) I tried to route the pipe to ffplay to see if lag is less.  `fmpeg -i https://urlToTheStream/playlist.m3u8 -f yuv4mpegpipe - | ffplay -f rawvideo -pix_fmt yuv420p -s 1440x1080 -`  encoding seems not quite to function right, i have a shifting picture, but its quite recognizable, that the lag is still there.
Che
CC BY-SA 4.0
2018-06-12T19:31:17.613Z
You need to force the same format on ffplay, or skip it altogether.
Gyan
CC BY-SA 4.0
2018-06-13T07:13:47.737Z
@Gyan Thanks for the reply. ffplay doesnt support the yuv4mpegpipe format I think. Do you have a hint for me, what you mean by >forcing or >skipping together ?
Che
CC BY-SA 4.0
2018-06-13T07:29:15.410Z
ffplay supports everything ffmpeg does. `ffmpeg -i https://urlToTheStream/playlist.m3u8 -f yuv4mpegpipe - | ffplay -i -`
Gyan
CC BY-SA 4.0
2018-06-13T08:29:50.320Z
`ffmpeg -i https://urlToTheStream/playlist.m3u8 -f yuv4mpegpipe - | ffplay -i - `works, but the lag is still around 1 second compared to the video playing in my browser in parallel.
https://image.ibb.co/jietEd/z.jpg 
See, that the speed should be high enough.
Che
CC BY-SA 4.0
2018-06-07T18:16:08.517Z
2018-06-07T18:16:08.517Z
SlimSCSI
<p>I am currently grabbing a live stream video with the following command:</p>

<pre><code>ffmpeg -i https://urlToTheStream/playlist.m3u8 -f image2 -q:v 30 C:\pathToOutputFolder\%01d.bmp
</code></pre>

<p>video is running in 24 fps.</p>

<p>I am then live-processing the bmp files with a self written java program.
My processing program is a bit faster than the output of ffmpeg. i can see that ffmpeg produces packages of bmp files. Around 25 and then pauses.</p>

<p>Is it possible to tell ffmpeg not to buffer anything and instead just producing "in realtime"?</p>

<p>At first I used jpg format which was clearly slower than bmp. I changed quality to 30 which helped too. But I still have a latency about 0.7 seconds compared watching the stream in the browser. I also tried the no buffering option with no efford.</p>

<p>Thanks for any tips!</p>

<p>edit: code format settings in text</p>

CC BY-SA 4.0
2022-03-22T23:29:18.613Z
If latency matters to you, you shouldn't use HLS in the first place.
Brad
<ffmpeg>
how to get realtime output from ffmpeg
Che
# how to get realtime output from ffmpeg

(Asked by: username_0 on 2018-06-07)

I am currently grabbing a live stream video with the following command:
ffmpeg -i https://urlToTheStream/playlist.m3u8 -f image2 -q:v 30 C:\pathToOutputFolder\%01d.bmp

video is running in 24 fps.
I am then live-processing the bmp files with a self written java program.
My processing program is a bit faster than the output of ffmpeg. i can see that ffmpeg produces packages of bmp files. Around 25 and then pauses.
Is it possible to tell ffmpeg not to buffer anything and instead just producing "in realtime"?
At first I used jpg format which was clearly slower than bmp. I changed quality to 30 which helped too. But I still have a latency about 0.7 seconds compared watching the stream in the browser. I also tried the no buffering option with no efford.
Thanks for any tips!
edit: code format settings in text

**Tags:** ffmpeg

> **Comments:**
> **username_1**: If latency matters to you, you shouldn't use HLS in the first place.  

---

## 1 answers

### Answer by username_2 on 2018-06-07. Score: 1

`ffmpeg -i https://urlToTheStream/playlist.m3u8 -f yuv4mpegpipe -`

Read from stdout pipe, The format is documented here <https://wiki.multimedia.cx/index.php/YUV4MPEG2>

> **Comments:**
> **username_0**: Thanks for the answer. Before I start messing around with piping (I am using Java under Windows) I tried to route the pipe to ffplay to see if lag is less.  `fmpeg -i https://urlToTheStream/playlist.m3u8 -f yuv4mpegpipe - | ffplay -f rawvideo -pix_fmt yuv420p -s 1440x1080 -`  encoding seems not quite to function right, i have a shifting picture, but its quite recognizable, that the lag is still there.  
> **username_3**: You need to force the same format on ffplay, or skip it altogether.  
> **username_0**: @username_3 Thanks for the reply. ffplay doesnt support the yuv4mpegpipe format I think. Do you have a hint for me, what you mean by >forcing or >skipping together ?  
> **username_3**: ffplay supports everything ffmpeg does. `ffmpeg -i https://urlToTheStream/playlist.m3u8 -f yuv4mpegpipe - | ffplay -i -`  
> **username_0**: `ffmpeg -i https://urlToTheStream/playlist.m3u8 -f yuv4mpegpipe - | ffplay -i - `works, but the lag is still around 1 second compared to the video playing in my browser in parallel. https://image.ibb.co/jietEd/z.jpg  See, that the speed should be high enough.  

---

