S
S
Stanislav2018-04-23 17:50:43
fmpeg
Stanislav, 2018-04-23 17:50:43

Streaming webm video via ffmpeg?

Good afternoon!
I'm trying to transcode streaming video from a webcam to webm format using ffmpeg

ffmpeg -f dshow -i video="USB2.0 HD UVC WebCam" -pix_fmt yuyv422 ^
-c:v libvpx -b:v 3000k -keyint_min 30 -g 30 -speed 6 ^
-tile-columns 4 -frame-parallel 1 -threads 8 -static-thresh 0 ^
-max-intra-rate 300 -deadline realtime -lag-in-frames 0 ^
-error-resilient 0 -f webm_chunk -header live.hdr ^
-chunk_start_index 0 live_%d.chk

When executed, an error occurs:
Output file #0 does not contain any stream
Topics on forums with similar errors come across on the Internet, but there is no solution.
Any thoughts on how to fix the error?
I tried the method through changing the encoding to h.264 and transferring via hls, but the delay is too large ~ 8 seconds.
ffmpeg.exe -f dshow -s 1280x720 -r 30 -vcodec mjpeg -i video="USB2.0 HD UVC WebCam" -c:v ^
libx264 -preset ultrafast ^
-crf 20 -maxrate 3000 -bufsize 100 -intra-refresh 1 -slice-max-size 1500 ^
-tune zerolatency ^
-flags -global_header ^
-fflags flush_packets ^
-hls_time 1 ^
-hls_list_size 3 ^
-hls_wrap 3 ^
-hls_flags delete_segments ^
-start_number 0 webcamstream.m3u8

What can be tweaked to reduce latency?
What other options for streaming transcoding can you think of with ffmpeg ?
PS: this crutch is used to display video from a webcam on a local server.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Paul Nice, 2018-07-18
@S_Stas

Regarding delays, there are a couple of good articles:
part one ,
part two
, in your case, rtsp, rtmp, mpegts will come out with the least delays in order of increasing delay.
HLS is in principle segmented and the delay will be high.
If you need to show in the browser with a low latency, then either professional products, or picking in WebRTC, MSE-ld and other wss.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question