Need help with ffmpeg to crtmpserver issue H.264 video

451 views
Skip to first unread message

Henry Umbocv

unread,
Aug 20, 2014, 2:41:57 AM8/20/14
to c-rtmp...@googlegroups.com
Hi all, newbie to crtmpserver and ffmpeg here:

I'm trying to stream my RTMP feed with H.264 video from my ip camera
to the crtmpserver (as an rtmp server)  but still struggling
with trying to get the video part to work.

I'm using ffmpeg on the ip camera that will convert the camera's internal
RTSP feed into RTMP before sending that out to an rtmp server.
The issue I see is that when I connect
ffmpeg to the crtmpserver, they will dump errors to console and then ffmpeg will exit out
in maybe about 10 seconds or so.  I don't see any video running on jwplayer wizard (http://www.jwplayer.com/wizard).

Now, I verified this ffmpeg command works fine (both video and audio) with nginx as the rtmp server,
so I'm not sure why it's not working for crtmpserver.

Anyway,
the ip camera is using an embedded linux OS,
and the crtmpserver (and nginx) are running on a separate linux box (Ubuntu).

The commands I run are:

crtmpservrer:

/opt/crtmpserver/crtmpserver  --use-implicit-console-appender /opt/crtmpserver/configs/flvplayback.lua

ffmpeg on ip cam:

ffmpeg -rtsp_transport tcp \
  -i rtsp://localhost:8557/PSIA/Streaming/channels/2?videoCodecType=H.264 \
  -vcodec copy -f flv -ar 44100 -r 5  rtmp://192.168.0.43:1935/live/test1



The error message upon connecting ffmpeg to crtmpserver:

crtmpservrer console output:


/thelib/src/netio/epoll/iohandlermanager.cpp:120 Handlers count changed: 3->4 IOHT_TCP_CARRIER
/thelib/src/netio/epoll/iohandlermanager.cpp:120 Handlers count changed: 3->4 IOHT_TCP_CARRIER
/thelib/src/netio/epoll/tcpacceptor.cpp:185 Client connected: 192.168.0.26:58439 -> 192.168.0.43:1935
/thelib/src/netio/epoll/tcpacceptor.cpp:185 Client connected: 192.168.0.26:58439 -> 192.168.0.43:1935
/thelib/src/application/baseclientapplication.cpp:257 Stream NR(13) with name `` registered to application `flvplayback` from protocol IR(12)
/thelib/src/application/baseclientapplication.cpp:257 Stream NR(13) with name `` registered to application `flvplayback` from protocol IR(12)
/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:1462 Default implementation of ProcessInvokeGeneric: Request: _checkbw
/thelib/src/protocols/rtmp/basertmpappprotocolhandler.cpp:1462 Default implementation of ProcessInvokeGeneric: Request: _checkbw
/thelib/src/application/baseclientapplication.cpp:268 Stream NR(13) with name `` unregistered from application `flvplayback` from protocol IR(12)
/thelib/src/application/baseclientapplication.cpp:268 Stream NR(13) with name `` unregistered from application `flvplayback` from protocol IR(12)
/thelib/src/application/baseclientapplication.cpp:257 Stream INR(14) with name `test1` registered to application `flvplayback` from protocol IR(12)
/thelib/src/application/baseclientapplication.cpp:257 Stream INR(14) with name `test1` registered to application `flvplayback` from protocol IR(12)
/thelib/src/streaming/streamcapabilities.cpp:313 Unable to read `constrained_intra_pred_flag` value. Not enough bits. Wanted: 1; Have: 0
/thelib/src/streaming/streamcapabilities.cpp:313 Unable to read `constrained_intra_pred_flag` value. Not enough bits. Wanted: 1; Have: 0
/thelib/src/streaming/streamcapabilities.cpp:704 Unable to partse PPS
/thelib/src/streaming/streamcapabilities.cpp:704 Unable to partse PPS
/thelib/src/streaming/streamcapabilities.cpp:1767 Unable to initialize VideoCodecInfoH264
/thelib/src/streaming/streamcapabilities.cpp:1767 Unable to initialize VideoCodecInfoH264
/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp:658 Unable to parse SPS/PPS for input RTMP stream
/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp:658 Unable to parse SPS/PPS for input RTMP stream
/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp:366 Unable to initialize video capabilities
/thelib/src/protocols/rtmp/streaming/innetrtmpstream.cpp:366 Unable to initialize video capabilities
/thelib/src/protocols/rtmp/basertmpprotocol.cpp:912 Unable to feed video
/thelib/src/protocols/rtmp/basertmpprotocol.cpp:912 Unable to feed video
/thelib/src/netio/epoll/tcpcarrier.cpp:89 Unable to signal data available
/thelib/src/netio/epoll/tcpcarrier.cpp:89 Unable to signal data available
/thelib/src/netio/epoll/iohandlermanager.cpp:130 Handlers count changed: 4->3 IOHT_TCP_CARRIER
/thelib/src/netio/epoll/iohandlermanager.cpp:130 Handlers count changed: 4->3 IOHT_TCP_CARRIER
/thelib/src/protocols/protocolmanager.cpp:45 Enqueue for delete for protocol [IR(12)]
/thelib/src/protocols/protocolmanager.cpp:45 Enqueue for delete for protocol [IR(12)]
/thelib/src/application/baseclientapplication.cpp:268 Stream INR(14) with name `test1` unregistered from application `flvplayback` from protocol IR(12)
/thelib/src/application/baseclientapplication.cpp:268 Stream INR(14) with name `test1` unregistered from application `flvplayback` from protocol IR(12)
/thelib/src/application/baseclientapplication.cpp:246 Protocol [IR(12)] unregistered from application: flvplayback
/thelib/src/application/baseclientapplication.cpp:246 Protocol [IR(12)] unregistered from application: flvplayback


ffmpeg console output:

ffmpeg started on 2014-08-20 at 13:14:30
Report written to "ffmpeg-20140820-131430.log"
ffmpeg version N-65616-g7cdef77 Copyright (c) 2000-2014 the FFmpeg developers
  built on Aug 14 2014 12:21:48 with gcc 4.5.3 (GCC) 20110311 (prerelease)
  configuration: --arch=arm --cross-prefix=arm-arago-linux-gnueabi- --host-os=arm-arago-linux-gnueabi --prefix=arm_local --enable-cross-compile --target-os=linux --disable-outdev=xv --disable-indev=jack --disable-bzlib
  libavutil      54.  3.100 / 54.  3.100
  libavcodec     56.  0.100 / 56.  0.100
  libavformat    56.  1.100 / 56.  1.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.100 /  5.  0.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  0.100 /  1.  0.100
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 1233 DC, 1233 AC, 1233 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 379 DC, 379 AC, 379 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 2980 DC, 2980 AC, 2980 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 2671 DC, 2671 AC, 2671 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 3033 DC, 3033 AC, 3033 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 1774 DC, 1774 AC, 1774 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 2353 DC, 2353 AC, 2353 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 723 DC, 723 AC, 723 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 7780 DC, 7780 AC, 7780 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 5249 DC, 5249 AC, 5249 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 5064 DC, 5064 AC, 5064 MV errors in P frame
[h264 @ 0x131d100] cabac decode of qscale diff failed at 49 48
[h264 @ 0x131d100] error while decoding MB 49 48, bytestream 17757
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 2400 DC, 2400 AC, 2400 MV errors in P frame
[h264 @ 0x131d100] Cannot use next picture in error concealment
[h264 @ 0x131d100] concealing 3889 DC, 3889 AC, 3889 MV errors in P frame
[rtsp @ 0x131a740] decoding for stream 0 failed
Guessed Channel Layout for  Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://localhost:8557/PSIA/Streaming/channels/2?videoCodecType=H.264':
  Metadata:
    title           : RTSP/RTP stream from IPNC
    comment         : PSIA/Streaming/channels/2?videoCodecType=H.264
  Duration: N/A, start: 0.000000, bitrate: 128 kb/s
    Stream #0:0: Video: h264 (High), yuvj420p(pc), 1920x1080, 15 fps, 15 tbr, 90k tbn, 30 tbc
    Stream #0:1: Audio: pcm_mulaw, 16000 Hz, 1 channels, s16, 128 kb/s
[rtmp @ 0x15030b0] Server error: Specified stream not found in call to releaseStream
[rtmp @ 0x15030b0] Server error: call to function _checkbw failed
Output #0, flv, to 'rtmp://192.168.0.43:1935/live/blah1':
  Metadata:
    title           : RTSP/RTP stream from IPNC
    comment         : PSIA/Streaming/channels/2?videoCodecType=H.264
    encoder         : Lavf56.1.100
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuvj420p, 1920x1080, q=2-31, 15 fps, 1k tbn, 5 tbc
    Stream #0:1: Audio: adpcm_swf ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 176 kb/s
    Metadata:
      encoder         : Lavc56.0.100 adpcm_swf
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (pcm_mulaw (native) -> adpcm_swf (native))
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Connection reset by peer
frame=    1 fps=0.0 q=-1.0 Lsize=      78kB time=00:00:00.20 bitrate=3183.6kbits/s
video:76kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.720053%
<exit>



Other notes:
1) If I disable video from ffmpeg sending to crtmpserver with the -vn option, I do successfully hear the sound only.
2) This exact command works if I replace crtmpserver with nginx rtmpserver module.
3) The flvplayback.lua I'm using is the default one that came with crtmpserver.  If you need to see the contents, let me konw.
4) Version of crtmpserver is version 1.1_beta build 784.



Thanks for any ideas!

Henry






Reply all
Reply to author
Forward
Message has been deleted
0 new messages