Advertisement
Guest User

Untitled

a guest
Apr 17th, 2015
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.13 KB | None | 0 0
  1. Hi I am able to stream video successfully from my IP Camera with VLC using the URL: rtsp://192.168.0.6:554/cam/realmonitor
  2.  
  3. When attempting to use FFMPEG it is failing with the following errors: I have attached successful VLC comms and also the conversation of the failing FFMPEG comms.
  4.  
  5. How can i make FFMPEG behave like VLC to successfully capture the stream?
  6.  
  7. Thank you in advance for any assistance
  8.  
  9. C:\ffmpeg-20150415-git-fbdaebb-win64-static\ffmpeg-20150415-git-fbdaebb-win64-static\bin>ffmpeg -i rtsp://admin:admin@192.168.0.6:554/cam/realmonitor -rtsp_transport tcp -f image2 -threads 4 -t 14400 -async 1 -r 1/5 -q 1.5 -vcodec mjpeg c:\Test.jpg
  10. ffmpeg version N-71455-gfbdaebb Copyright (c) 2000-2015 the FFmpeg developers
  11. built with gcc 4.9.2 (GCC)
  12. configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass
  13. --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --e
  14. nable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
  15. --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-l
  16. ibx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  17. libavutil 54. 22.101 / 54. 22.101
  18. libavcodec 56. 34.100 / 56. 34.100
  19. libavformat 56. 30.100 / 56. 30.100
  20. libavdevice 56. 4.100 / 56. 4.100
  21. libavfilter 5. 14.100 / 5. 14.100
  22. libswscale 3. 1.101 / 3. 1.101
  23. libswresample 1. 1.100 / 1. 1.100
  24. libpostproc 53. 3.100 / 53. 3.100
  25. Invalid interval end specification ''
  26. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  27. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  28. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  29. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  30. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  31. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  32. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  33. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  34. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  35. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  36. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  37. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  38. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  39. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  40. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  41. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  42. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  43. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  44. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  45. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  46. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  47. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  48. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  49. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  50. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  51. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  52. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  53. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  54. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  55. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  56. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  57. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  58. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  59. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  60. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  61. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  62. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  63. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  64. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  65. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  66. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  67. [mjpeg @ 0000000000312fa0] RTP: missed 14 packets
  68. [rtsp @ 0000000000330c40] Received packet without a start chunk; dropping frame.
  69. [rtsp @ 0000000000330c40] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown)): unspecified size
  70. Consider increasing the value for the 'analyzeduration' and 'probesize' options
  71. Guessed Channel Layout for Input Stream #0.1 : mono
  72. Input #0, rtsp, from 'rtsp://admin:admin@192.168.0.6:554/cam/realmonitor':
  73. Metadata:
  74. title : RTSP Session of ZheJiang Dahua Technology CO.,LTD.
  75. Duration: -187967:-4:-22.-32, start: 676681462.328875, bitrate: N/A
  76. Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 90k tbr, 90k tbn, 90k tbc
  77. Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s
  78. Codec AVOption threads () specified for output file #0 (c:\Test.jpg) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video str
  79. eams) or that it is a private option of some encoder which was not actually used for any stream.
  80. Output #0, image2, to 'c:\Test.jpg':
  81. Metadata:
  82. title : RTSP Session of ZheJiang Dahua Technology CO.,LTD.
  83. Output file #0 does not contain any stream
  84. Received signal 2: terminating.
  85.  
  86. FFMPEG wireshark conversation:
  87.  
  88. OPTIONS rtsp://192.168.0.6:554/cam/realmonitor RTSP/1.0
  89.  
  90. CSeq: 1
  91.  
  92. User-Agent: Lavf56.30.100
  93.  
  94.  
  95.  
  96. RTSP/1.0 401 Unauthorized
  97.  
  98. WWW-Authenticate: Basic realm="Dahua"
  99.  
  100. Server: Dahua Rtsp Server
  101.  
  102. Content-Length: 0
  103.  
  104. CSeq: 1
  105.  
  106.  
  107.  
  108. OPTIONS rtsp://192.168.0.6:554/cam/realmonitor RTSP/1.0
  109.  
  110. CSeq: 2
  111.  
  112. User-Agent: Lavf56.30.100
  113.  
  114. Authorization: Basic YWRtaW46YWRtaW4=
  115.  
  116.  
  117.  
  118. RTSP/1.0 200 OK
  119.  
  120. Server: Dahua Rtsp Server
  121.  
  122. Content-Length: 0
  123.  
  124. CSeq: 2
  125.  
  126. Public: OPTIONS,DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN,SET_PARAMETER
  127.  
  128.  
  129.  
  130. DESCRIBE rtsp://192.168.0.6:554/cam/realmonitor RTSP/1.0
  131.  
  132. Accept: application/sdp
  133.  
  134. CSeq: 3
  135.  
  136. User-Agent: Lavf56.30.100
  137.  
  138. Authorization: Basic YWRtaW46YWRtaW4=
  139.  
  140.  
  141.  
  142. RTSP/1.0 200 OK
  143.  
  144. Server: Dahua Rtsp Server
  145.  
  146. CSeq: 3
  147.  
  148. Content-Base: rtsp://192.168.0.6:554/cam/realmonitor/
  149.  
  150. Content-Type: application/sdp
  151.  
  152. Content-Length: 339
  153.  
  154. Cache-Control: must-revalidate
  155.  
  156. x-Accept-Dynamic-Rate: 1
  157.  
  158.  
  159.  
  160. v=0
  161.  
  162. o=- 2251938208 2251938208 IN IP4 0.0.0.0
  163.  
  164. s=RTSP Session of ZheJiang Dahua Technology CO.,LTD.
  165.  
  166. c=IN IP4 0.0.0.0
  167.  
  168. t=0 0
  169.  
  170. a=control:*
  171.  
  172. a=range:now-
  173.  
  174. a=packetization-supported:DH
  175.  
  176. m=video 0 RTP/AVP 26
  177.  
  178. a=control:trackID=0
  179.  
  180. a=framerate:25.000000
  181.  
  182. a=rtpmap:26 JPEG/90000
  183.  
  184. m=audio 0 RTP/AVP 8
  185.  
  186. a=control:trackID=1
  187.  
  188. a=rtpmap:8 PCMA/8000
  189.  
  190.  
  191.  
  192. SETUP rtsp://192.168.0.6:554/cam/realmonitor/trackID=0 RTSP/1.0
  193.  
  194. Transport: RTP/AVP/UDP;unicast;client_port=19420-19421
  195.  
  196. x-Dynamic-Rate: 0
  197.  
  198. CSeq: 4
  199.  
  200. User-Agent: Lavf56.30.100
  201.  
  202. Authorization: Basic YWRtaW46YWRtaW4=
  203.  
  204.  
  205.  
  206. RTSP/1.0 200 OK
  207.  
  208. Server: Dahua Rtsp Server
  209.  
  210. Content-Length: 0
  211.  
  212. CSeq: 4
  213.  
  214. Transport: RTP/AVP;unicast;client_port=19420-19421;server_port=20004-20005;ssrc=4BC14B3E
  215.  
  216. x-dynamic-rate: 1
  217.  
  218. Session: 1429257645838106;timeout=90
  219.  
  220.  
  221.  
  222. SETUP rtsp://192.168.0.6:554/cam/realmonitor/trackID=1 RTSP/1.0
  223.  
  224. Transport: RTP/AVP/UDP;unicast;client_port=19422-19423
  225.  
  226. x-Dynamic-Rate: 0
  227.  
  228. CSeq: 5
  229.  
  230. User-Agent: Lavf56.30.100
  231.  
  232. Session: 1429257645838106
  233.  
  234. Authorization: Basic YWRtaW46YWRtaW4=
  235.  
  236.  
  237.  
  238. RTSP/1.0 200 OK
  239.  
  240. Server: Dahua Rtsp Server
  241.  
  242. Content-Length: 0
  243.  
  244. CSeq: 5
  245.  
  246. Transport: RTP/AVP;unicast;client_port=19422-19423;server_port=20006-20007;ssrc=4BC14B29
  247.  
  248. x-dynamic-rate: 1
  249.  
  250. Session: 1429257645838106;timeout=90
  251.  
  252.  
  253.  
  254. PLAY rtsp://192.168.0.6:554/cam/realmonitor/ RTSP/1.0
  255.  
  256. Range: npt=0.000-
  257.  
  258. CSeq: 6
  259.  
  260. User-Agent: Lavf56.30.100
  261.  
  262. Session: 1429257645838106
  263.  
  264. Authorization: Basic YWRtaW46YWRtaW4=
  265.  
  266.  
  267.  
  268. RTSP/1.0 200 OK
  269.  
  270. Server: Dahua Rtsp Server
  271.  
  272. RTP-Info: url=trackID=0;seq=26201;rtptime=253800,url=trackID=1;seq=25939;rtptime=22560
  273.  
  274. Range: npt=0.000000-
  275.  
  276. Content-Length: 0
  277.  
  278. CSeq: 6
  279.  
  280. Session: 1429257645838106
  281.  
  282. In Wireshark i can see the successful conversation between VLC and the IP Camera.
  283.  
  284. RTSP/1.0 200 OK
  285.  
  286. Server: Dahua Rtsp Server
  287.  
  288. Content-Length: 0
  289.  
  290. CSeq: 5
  291.  
  292. Public: OPTIONS,DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN,SET_PARAMETER
  293.  
  294.  
  295.  
  296. DESCRIBE rtsp://192.168.0.6:554/cam/realmonitor RTSP/1.0
  297.  
  298. CSeq: 6
  299.  
  300. Authorization: Basic YWRtaW46YWRtaW4=
  301.  
  302. User-Agent: LibVLC/2.1.5 (LIVE555 Streaming Media v2014.05.27)
  303.  
  304. Accept: application/sdp
  305.  
  306.  
  307.  
  308. RTSP/1.0 200 OK
  309.  
  310. Server: Dahua Rtsp Server
  311.  
  312. CSeq: 6
  313.  
  314. Content-Base: rtsp://192.168.0.6:554/cam/realmonitor/
  315.  
  316. Content-Type: application/sdp
  317.  
  318. Content-Length: 339
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement