> Hi,
>
> I would like to run RTMP server with either ffmpeg or vlc feeding a
> MP4 stream from an IP camera via UDP/TCP or RTP.
>
> I tried the below command but didn't work.
>
> openRTSP -v rtsp://ipcamera:7070/ | ffmpeg -i - -f flv
> rtmp://localhost:1935/flvplayback/demo1
.... | ffmpeg -i - -f flv -metadata streamName=demo1 "tcp://localhost:6666"
You must either specify -f flv and put the output in the liveFLV acceptor in crtmpserver (like I just did), or go with RTMP approach without specifying -f flv, just the RTMP uri.
But I have one question... Why don't you put the rtsp URI directly into the externalStreams section in the config file? No external tools required
>
> messages on the rtmp server
> /opt/crtmpserver/sources/thelib/src/application/
> baseclientapplication.cpp:161 Stream 7 of type NR with name ``
> registered to application `flvplayback`
>
> messages on the client side
>
> Receiving streamed data (signal with "kill -HUP 8198" or "kill -USR1
> 8198" to terminate)...
> [h264 @ 0x9d46340] max_analyze_duration 5000000 reached at 5000000
> [h264 @ 0x9d46340] Estimating duration from bitrate, this may be
> inaccurate
>
> Seems stream 0 codec frame rate differs from container frame rate:
> 30.00 (30/1) -> 15.00 (30/2)
> Input #0, h264, from 'pipe:':
> Duration: N/A, bitrate: N/A
> Stream #0.0: Video: h264 (Baseline), yuvj420p, 640x480 [PAR 1:1
> DAR 4:3], 15 fps, 15 tbr, 1200k tbn, 30 tbc
>
> Thanks
> Jay
>
> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to
> c-rtmp-serve...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/c-rtmp-server?hl=en
------
Eugen-Andrei Gavriloaie
Web: http://www.rtmpd.com
Thank you for the report. It seems to me that the camera considers one of the crtmpserver's RTSP request as bogus:
<STR name="reason">Bad Request</STR>
<UINT32 name="statusCode">400</UINT32>
Unfortunately, I didn't log that request inside the server. If you can, please create a complete dump of the network traffic and send it to me. You can do that with either wireshark or with the command below:
tcpdump -ni eth0 -w /tmp/dump.pcap tcp port 5544
Thank you for your patience
Cheers,
Andrei
On Jul 17, 2011, at 4:42 PM, jay wrote:
> I tried that first. I am getting the error below.
>
> http://pastebin.com/cFWN2PUd
>
tcpdump -ni eth0 -w /tmp/dump.pcap tcp port 7070
(I typed in the wrong port number)
On Jul 17, 2011, at 4:42 PM, jay wrote:
> I tried that first. I am getting the error below.
>
> http://pastebin.com/cFWN2PUd
>
Either cases, that pcap is no use to me :(
Can you by chance make that camera available via internet? Can you do a simple port forward? If that is not possible, can I gat ssh access to your machine?
This is a very interesting situation that I want to investigate
So, please let me know by sending a response directly to me with the contact details, not to the mailing list
Cheers,
Andrei
On Jul 17, 2011, at 5:37 PM, jay wrote:
> Thanks Andrei. Here is the attachment.
>
> http://static.ezcamlive.com/dump.pcap
>
The camera doesn't support RTSP over TCP only over UDP. So. put forceTcp=false in config file
I'll make the final commit with the crtmpserver bug later this evening. I'll let you know when.
Thank you for the support
Cheers,
Andrei
Try it now. Is working fine now. However, I still have some errors on SPS/PPS deep parsing. I don't know yet what's the cause: camera sending bogus packets or crtmpserver having a bug.
Don't forget about forceTcp=false because the RTSP server inside the camera doesn't support RTP over RTSP (implicitly TCP). It only does RTSP over TCP and RTP over UDP
Can you please let the camera rolling for the next 2 or 3 days? (I have some other stuff to do in the mean time :( )
Cheers,
Andrei
Cheers,
Andrei
Are you sure you did the update? Because I made pretty important changes and the new pcap file is looking identical to the old one. Besides, here is working just fine now.
Cheers,
Andrei
To shade some light on that matter, I manually parsed SPS NAL and indeed, according to ISO 14496 part 10, the SPS ends prematurely. I tend to believe the camera is doing something nasty in there... Fortunately, the bug is not so critical and quicktime/vlc/crtmpserver/flashplayer can handle that. ffmpeg on the other hand, is not capable of doing playback from it :(
Cheers,
Andrei