A
A
Alexey Adel2015-11-03 19:37:40
Nginx
Alexey Adel, 2015-11-03 19:37:40

Can't force broadcast stream from the camera?

Settings in nginx.conf
rtmp {
access_log /var/log/nginx/rtmp_access.log;
server {
listen 1935;
ping 30s;
notify_method get;
application ii {
live on;
exec_pull ffmpeg -i rtsp://192.168.111.120:554/Streaming/Channels/1 -threads 2 -f flv -r 25 -s 1920x1080 -an rtmp://localhost:1935/ii/stream;
}
}
}
what could be the problem, I run it in the terminal:
[email protected]:/etc/nginx# ffmpeg -i rtsp://192.168.111.120:554/Streaming/Channels/2 -c copy -f flv rtmp: //localhost:1935/ii/stream
ffmpeg version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6'--build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64- linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable -gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable -libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable -libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable -libxvid--enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
libavutil 54.7.100 /54.7.100
libavcodec 56.1.100/ 56.1.100
libavformat 56.4.101/
56.4.101 .0 libswscale 3. 0.100 / 3. 0.100 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 0.100 / 53. 0.100 Input #0, rtsp, from 'rtsp://192.168.111.120:554/Streaming/Channels/2' : Metadata: title : Media Presentation Duration: N/A, start: 0.436533, bitrate: N/A Stream #0:0: Video: h264 (Main), yuv420p(tv, bt470bg), 704x576, 20 fps, 50.17 tbr, 90ktbn, 40tbc
RTMP_ReadPacket, failed to read RTMP packet header
rtmp://localhost:1935/ii/stream: Unknown error occurred

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Stepanov, 2015-11-11
@leoykt

Why didn't you specify the video codec parameters?
add to ffmpeg
ffmpeg -i rtsp://192.168.111.120:554/Streaming/Channels/1 -threads 2 -vcodec copy -r 25 -s 1920x1080 -an -f flv rtmp://localhost:1935/ii/stream;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question