ffmpeg zum Nginx-Streaming zurückgewiesen, Verbindung abgelehnt

572
hans gerte

Neu bei ffmpeg und lesen Sie ein Dutzend Anleitungen und Anleitungen, können es aber trotzdem nicht zum Laufen bringen.

Ich habe einen Tvheadend-Server, der Kanäle von DVB empfängt. Die Kanäle funktionieren problemlos, aber ich muss ihn transcodieren, damit Sie den Kanal außerhalb meines Hauses sehen können.

Ich habe versucht, nginx + rtmp module mit ffmpeg auf einem leistungsfähigeren Server zu installieren (ubuntu 18.08), aber was auch immer ich tue, ich kann es nicht schaffen, damit es funktioniert.

Folgendes versuche ich:

ffmpeg -f mpegts -i http://username:password@192.168.0.14:4445/stream/channelid/9 -deinterlace -vcodec libx264 -vb 1000k -acodec libfacc -ar 48000 -ab 48k -f flv rtmp://192.168.0.58:1935/test 

Die Quelle ist ein tvheadend-Server und der RTMP-Server ist das ffmpeg, wo die Transcodierung durchgeführt wird.

ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-16ubuntu2) configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 [h264 @ 0x557f8caccca0] SPS unavailable in decode_picture_timing [h264 @ 0x557f8caccca0] non-existing PPS 0 referenced [h264 @ 0x557f8caccca0] SPS unavailable in decode_picture_timing [h264 @ 0x557f8caccca0] non-existing PPS 0 referenced [h264 @ 0x557f8caccca0] decode_slice_header error [h264 @ 0x557f8caccca0] no frame! [h264 @ 0x557f8caccca0] SPS unavailable in decode_picture_timing [h264 @ 0x557f8caccca0] non-existing PPS 0 referenced [h264 @ 0x557f8caccca0] SPS unavailable in decode_picture_timing [h264 @ 0x557f8caccca0] non-existing PPS 0 referenced [h264 @ 0x557f8caccca0] decode_slice_header error [h264 @ 0x557f8caccca0] no frame! [h264 @ 0x557f8caccca0] SPS unavailable in decode_picture_timing [h264 @ 0x557f8caccca0] non-existing PPS 0 referenced [h264 @ 0x557f8caccca0] SPS unavailable in decode_picture_timing [h264 @ 0x557f8caccca0] non-existing PPS 0 referenced [h264 @ 0x557f8caccca0] decode_slice_header error [h264 @ 0x557f8caccca0] no frame! [h264 @ 0x557f8caccca0] SPS unavailable in decode_picture_timing [h264 @ 0x557f8caccca0] non-existing PPS 0 referenced [h264 @ 0x557f8caccca0] SPS unavailable in decode_picture_timing [h264 @ 0x557f8caccca0] non-existing PPS 0 referenced [h264 @ 0x557f8caccca0] decode_slice_header error [h264 @ 0x557f8caccca0] no frame! [mp3 @ 0x557f8cacdee0] Header missing Input #0, mpegts, from 'http://username:password@192.168.0.14:4445/stream/channelid/14': Duration: N/A, start: 71505.814511, bitrate: N/A Program 1  Metadata: service_name : ? service_provider: ? Stream #0:0[0x50f]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 704x576 [SAR 16:11 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xd10](dan): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s Unknown encoder 'libfacc' 

Update: Ändere einfach den Audiocodec in aac, aber jetzt bekomme ich das

ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-16ubuntu2) configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 [mp3 @ 0x5572191f6de0] Header missing [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] SPS unavailable in decode_picture_timing [h264 @ 0x5572191f5ba0] non-existing PPS 0 referenced [h264 @ 0x5572191f5ba0] decode_slice_header error [h264 @ 0x5572191f5ba0] no frame! [h264 @ 0x5572191f5ba0] Increasing reorder buffer to 2 Input #0, mpegts, from 'http://username:password@192.168.0.14:4445/stream/channelid/9': Duration: N/A, start: 79841.014511, bitrate: N/A Program 1  Metadata: service_name : ? service_provider: ? Stream #0:0[0x50f]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 704x576 [SAR 16:11 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0xd10](dan): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s [tcp @ 0x5572194ef060] Connection to tcp://192.168.0.58:1935 failed: Connection refused [rtmp @ 0x5572194b65e0] Cannot open connection tcp://192.168.0.58:1935 rtmp://192.168.0.58:1935/test: Connection refused 
0
Hallo slhck, sorry, habe gerade die Frage mit mehr Informationen aktualisiert hans gerte vor 5 Jahren 0
"Unbekannter Encoder 'libfacc'" - beginnen Sie mit diesem Problem. Verwenden Sie stattdessen "-acodec aac". slhck vor 5 Jahren 0
Wenn Sie das nächste Mal Ihre Frage bearbeiten, stellen Sie sicher, dass Sie die richtige Grammatik und Formatierung verwenden. Verwenden Sie die Codetaste (`{}`) zum Formatieren der Konsolenausgabe. Danke im Voraus. slhck vor 5 Jahren 0
Die AAC-Syntax hat funktioniert, aber jetzt bekomme ich einen Verbindungsfehler hans gerte vor 5 Jahren 0
Haben Sie einen Server, der auf 192.168.0.58 läuft und TCP-Port 1935 überwacht? Wenn nicht, müssen Sie den Server entsprechend konfigurieren und starten. slhck vor 5 Jahren 0
Ich habe versucht, Nginx-RTMP auf dem gleichen Server zu installieren. nginx läuft, der Standard-nginx wird angezeigt. aber nicht sicher, ob die nginx.conf curret ist. hans gerte vor 5 Jahren 0
Sie haben Ihre `nginx.conf` nicht angezeigt, daher ist es schwer zu sagen. Schauen Sie in Ihre Nginx-Protokolle - und "netstat -altun" kann Ihnen offene Ports anzeigen. Beachten Sie, dass es sich nicht um eine Site zur Live-Fehlerbehebung handelt. Es wäre besser, wenn Sie mehr Informationen darüber anzeigen könnten, was Sie versucht haben und was das Problem ist. slhck vor 5 Jahren 0
Wie haben Sie das Problem gelöst? Andere Leser würden von der Lösung profitieren. Sie können es als Antwort auf Ihre eigene Frage weiter unten posten. slhck vor 5 Jahren 0
Ich installierte das nginx-rtmp-Modul erneut und stellte sicher, dass der RTMP-Port mit `netstat - altun` geöffnet war, und stellte sicher, dass die Zeichenfolge von ffmpeg mit dem nignx-Server identisch war. hans gerte vor 5 Jahren 0

1 Antwort auf die Frage

0
slhck

Das OP löste das Problem, indem das nginx-rtmpModul erneut installiert wurde und sichergestellt wurde, dass der RTMP-Port mit geöffnet war netstat -altun. Er stellte außerdem sicher, dass die Zeichenfolge von ffmpeg mit dem nignx-Server identisch war.