video-streaming-service icon indicating copy to clipboard operation
video-streaming-service copied to clipboard

rtmp://localhost/live: Input/output error

Open anhhuycao opened this issue 6 years ago • 5 comments

I have a issues when I running "ffmpeg -re -i video.mp4 -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv rtmp://localhost/live/tabvn"

Output: rtmp://localhost/live: Input/output error Please! Help me. Thank you!

anhhuycao avatar Oct 20 '18 07:10 anhhuycao

Make sure Nginx is running before you use the command ffmpeg

Dungyichao avatar Apr 27 '20 02:04 Dungyichao

I am getting input/output error when I am using FFmpeg. Ngnix is working fine status come ok for NGINX and snapped code is below please help me out

./stream1.sh

ffmpeg -re -i sample.mp4 -vcodec copy -loop -1 -c:a aac -b:a 160k -ar 44100 -strict -2 -f flv rtmp:198.168.0.0/live/1234567890 ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect 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 'sample.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf56.40.101 Duration: 00:45:30.48, start: 0.000000, bitrate: 525 kb/s Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 391 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : SoundHandler

rtmp:198.168.0.0/live/1234567890: Input/output error

rahul1001knp avatar Mar 05 '21 15:03 rahul1001knp

If solved how did you solved that? Can you check your Nginx config file Ref: https://www.nginx.com/blog/video-streaming-for-remote-learning-with-nginx/

prathamsss avatar Jun 18 '22 18:06 prathamsss

Comment out this line it should work #on_publish http://localhost:3001/api/on-live-auth; #on_publish_done http://localhost:3001/api/on-stream-end;

akshay0505 avatar Aug 03 '22 15:08 akshay0505

what line on what file? i looked everywhere for those codes and ive found nothing, Either your high and found some random code or your having another problem

carterep avatar Mar 17 '23 16:03 carterep