VLC http streaming cannot see output video until ctrl-c

0

I am using a raspberry pi to stream video via http. I use the following command line:

cvlc -vvv v4l2:///dev/video0:width=200:height=200:fps=15 --sout="#transcode{vcodec=mp4v}:std{access=http,mux=ts,dst=:8090}"

The server seems to start, here the last rows of the output:

...
[73b00648] core input debug: Buffering 22%
[73b00648] core input debug: Buffering 44%
[73b00648] core input debug: Buffering 66%
[73b00648] core input debug: Buffering 88%
[73b00648] core input debug: Stream buffering done (333 ms in 334 ms)
[739061e0] core generic debug: using decoder module "rawvideo"
[73906548] core encoder debug: looking for encoder module matching "any": 20 candidates
[73906548] avcodec encoder debug: CPU flags: 0x0000003f
[73906548] avcodec encoder debug: Time base for probing setted to 1/25
[73906548] avcodec encoder debug: Time base set to 1/25
[73906548] avcodec encoder debug: found encoder MPEG-4 Video
[73906548] core encoder debug: using encoder module "avcodec"
[73906548] core encoder debug: removing module "avcodec"
[73b00648] core input debug: Decoder wait done in 379 ms
[73806280] stream_out_transcode stream out debug: decoder aspect is 1.000000:1
[73806280] stream_out_transcode stream out debug: source pixel aspect is 1.000000:1
[73806280] stream_out_transcode stream out debug: scaled pixel aspect is 1.000000:1
[73806280] stream_out_transcode stream out debug: source 200x200, destination 200x200
[73806280] stream_out_transcode stream out debug: source fps 15/1, destination 15/1
[73806280] stream_out_transcode stream out: input interval 66666 (base 1)
[73806280] stream_out_transcode stream out: output interval 66666 (base 1)
[73806280] stream_out_transcode stream out debug: encoder aspect is 200:200
[73806280] stream_out_transcode stream out debug: destination (after video filters) 200x200
[73906548] core encoder debug: looking for encoder module matching "any": 20 candidates
[73906548] avcodec encoder debug: CPU flags: 0x0000003f
[73906548] avcodec encoder debug: Time base for probing setted to 1/15
[73906548] avcodec encoder debug: Time base set to 1/15
[73906548] avcodec encoder debug: found encoder MPEG-4 Video
[73906548] core encoder debug: using encoder module "avcodec"
[73802d38] core mux debug: adding a new input
[73802d38] mux_ts mux debug: adding input codec=mp4v pid=68
[73802d38] mux_ts mux debug: new PCR PID is 68
[73802d38] core mux warning: late buffer for mux input (108617)
[73806280] stream_out_transcode stream out warning: Reseting video sync
[73906548] avcodec encoder warning: almost fed libavcodec with two frames with the same PTS (839)
[73802d38] core mux warning: late buffer for mux input (60411)
[73802d38] core mux warning: late buffer for mux input (4372)
[73806280] stream_out_transcode stream out warning: Reseting video sync
[73906548] avcodec encoder warning: almost fed libavcodec with a frame in the past (current: 847, last: 851)
[73906548] avcodec encoder warning: almost fed libavcodec with a frame in the past (current: 848, last: 851)
[73906548] avcodec encoder warning: almost fed libavcodec with a frame in the past (current: 849, last: 851)
[73906548] avcodec encoder warning: almost fed libavcodec with a frame in the past (current: 850, last: 851)
[73906548] avcodec encoder warning: almost fed libavcodec with two frames with the same PTS (851)

When I try to use a client to connect to the streaming, it seems it is loading the video (for indefinite time) but it never appears. From wireshark I see I receive DATA packets. After when I stop the server (Ctrl+C) the video is shown.

Output after Ctrl+C:

^C[01db1918] core libvlc debug: removing all interfaces
[01db1918] core libvlc debug: exiting
[01e62aa8] core interface debug: removing module "dummy"
[01e60060] core interface debug: removing module "dbus"
[01e5fa48] core interface debug: removing module "hotkeys"
[01e58480] core playlist debug: destroying
[01e58480] core playlist debug: deactivating the playlist
[01e58480] core playlist debug: incoming request - stopping current input
[73b00648] core input debug: control: stopping input
[01e58480] core playlist debug: incoming request - stopping current input
[01e58480] core playlist debug: finished input
[73810340] core decoder debug: removing module "rawvideo"
[73810340] core decoder debug: killing decoder fourcc `I420', 0 PES in FIFO
[73800720] core stream output debug: removing a sout input (sout_input:0x73900508)
[739061e0] core generic debug: removing module "rawvideo"
[73906548] core encoder debug: removing module "avcodec"
[73802d38] mux_ts mux debug: removing input pid=68
[73802d38] mux_ts mux debug: new PCR PID is 8191
[73802d38] core mux warning: no more input streams for this mux
[73807ba0] core demux debug: removing module "v4l2"
[73b00648] core input debug: Program doesn't contain anymore ES
[01e58480] core playlist debug: incoming request - stopping current input
[01e58480] core playlist debug: dead input
[73800720] core stream output debug: destroying useless sout
[73806280] core stream out debug: destroying chain... (name=transcode)
[73806280] core stream out debug: removing module "stream_out_transcode"
[73806280] core stream out debug: destroying chain done
[73800a10] core stream out debug: destroying chain... (name=std)
[73800a10] core stream out debug: removing module "stream_out_standard"
[73802d38] core mux debug: removing module "mux_ts"
[738016c8] core access out debug: removing module "access_output_http"
[73801f80] core http host warning: force closing connections
[73801f80] core http host debug: HTTP host removed
[738016c8] access_output_http access out debug: Close
[73800a10] core stream out debug: destroying chain done
[01e3f2e8] core audio output debug: removing module "pulse"
[01e60060] core playlist export debug: saving Media Library to file /home/pi/.local/share/vlc/ml.xspf.tmp1476
[01e60060] core playlist export debug: looking for playlist export module matching "export-xspf": 4 candidates
[01e60060] core playlist export debug: using playlist export module "export"
[01e60060] core playlist export debug: removing module "export"

I also used ffmpeg (with ffserver). Same problem. Any idea? Thanks.

http
streaming
vlc
v4l2
asked on Stack Overflow Aug 23, 2018 by Marco Trinelli

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0