revmischa / rtsp-server

Lightweight RTSP/RTP streaming media server
https://metacpan.org/release/RTSP-Server
427 stars 111 forks source link

Nothing is happening #5

Closed shientze95 closed 8 years ago

shientze95 commented 8 years ago

I did everything as stated in the README. I'm trying to see it in vlc. So i followed everything but nothing happened. Any idea? From running perl rtsp-server.pl -l 4 Starting RTSP server, log level = 4 Source server started Client server started

running ffmpeg -re -i video1.mp4 -f rtsp -muxdelay 0.ict -2 rtsp://12.34.56.78:5545/abc [endless@endless Downloads]$ ffmpeg -re -i video1.mp4 -f rtsp -muxdelay 0.ict -2 rtsp://12.34.56.78:5545/abc ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 5.2.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-shared --enable-version3 --enable-x11grab libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video1.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2015-10-12 02:51:51 Duration: 00:04:00.23, start: 0.000000, bitrate: 1248 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1053 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 191 kb/s (default) Metadata: creation_time : 2015-10-12 02:51:53 handler_name : IsoMedia File Produced by Google, 5-11-2011

revmischa commented 8 years ago

Maybe try checking netstat -lpnt or tcpdump? See if there's any traffic or something listening? Or a firewall?

shientze95 commented 8 years ago

Seems like it's listening. Means it's working. Don't know why ffmpeg is not sending the video, Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:554 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5545 0.0.0.0:* LISTEN -
tcp6 0 0 :::3306 :::* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -

revmischa commented 8 years ago

You should probably replace the "12.34.56.78" with your actual IP address

shientze95 commented 8 years ago

Replaced it but now i have errors. It seems like it's not connecting to 5545. [endless@endless Downloads]$ sudo ffmpeg -re -i video1.mp4 -f rtsp -muxdelay 0 -strict -2 rtsp://115.134.56.44:5545/abd [sudo] password for endless: ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 5.2.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-shared --enable-version3 --enable-x11grab libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video1.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2015-10-12 02:51:51 Duration: 00:04:00.23, start: 0.000000, bitrate: 1248 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1053 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 191 kb/s (default) Metadata: creation_time : 2015-10-12 02:51:53 handler_name : IsoMedia File Produced by Google, 5-11-2011 [tcp @ 0x55cfbe83cf40] Connection to tcp://115.134.56.44:5545?timeout=0 failed: Connection refused Output #0, rtsp, to 'rtsp://115.134.56.44:5545/abd': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 encoder : Lavf56.40.101 Stream #0:0(und): Video: mpeg4, yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default) Metadata: handler_name : VideoHandler encoder : Lavc56.60.100 mpeg4 Stream #0:1(und): Audio: aac, 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: creation_time : 2015-10-12 02:51:53 handler_name : IsoMedia File Produced by Google, 5-11-2011 encoder : Lavc56.60.100 aac Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Could not write header for output file #0 (incorrect codec parameters ?): Connection refused