Ullaakut / RTSPAllTheThings

Deprecated RTSP media server -- Use github.com/aler9/rtsp-simple-server instead.
Apache License 2.0
278 stars 72 forks source link

Issue with streaming a file #59

Closed davidgatti closed 6 years ago

davidgatti commented 6 years ago

I'm trying to stream a demo file with the following command:

sudo docker run --rm -p 8554:8554 -e INPUT="/tmp/face.m4v" -v "/home/davidgatti/Documents/Kingsbacon/FRP-Video-Source/face.m4v:/tmp/face.m4v" ullaakut/rtspatt

When I do this I get the following error message

Server configuration:
Address:    0.0.0.0
Port:       8554
Route:      /live.sdp
Username:
Password:
Auth method:    basic
Input:      /tmp/face.m4v
Input type: file

Launching stream with the following pipeline: ( appsrc name=mysrc ! decodebin ! capsfilter ! queue ! x264enc speed-preset=superfast ! rtph264pay name=pay0 pt=96  )
Stream ready at rtsp://0.0.0.0:8554/live.sdp
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory

When I connect to the stream with VLC, the vide o is choppy, brakes down, and is unreliable. I did try to convert the original video in to different formats and bitrates but ending up with the same result.

Any idea what might be wrong?

Ullaakut commented 6 years ago

Hi!

I'm pretty sure the issue comes from the encoding of the video. What did you use to covert it to other formats? I've had no problem with 60fps HD streams in the past so I don't think it comes from RTSPAtt, unless there was a regression.

If you could share a link to an example video for me to reproduce the issue, that would also be great :)

Thanks!

davidgatti commented 6 years ago

I recorded the video, with my iPhone, and had this, then I converted it using VLC.

Ullaakut commented 6 years ago

Then I'm pretty sure the problem comes from the way VLC converts this video. RTSPATT uses Gstreamer, a streaming library, and the way it handles files means it's not able to handle every file format and every encoding that exists, so it's very likely to produce issues such as this one.

To fix it, use ffmpeg for encoding instead of VLC, like such: ffmpeg -i input.avi -c:v libx264 output.mp4 and use this output.mp4 file in RTSPATT instead. Let me know if that helps :)

davidgatti commented 6 years ago

Oo I see you should include this info I the readme :)