Tente executar o seguinte comando:
avconv -rtsp_transport tcp -i
Isso funciona para mim.
Estou tentando simplesmente gravar um fluxo de câmera IP no meu disco rígido no Ubuntu Linaro. Funciona muito bem durante 4 segundos e depois pára. Não há erros e a reprodução é perfeita. Parece que está fazendo isso intencionalmente. No entanto, não posso para a vida ver onde esse tamanho de arquivo é definido. Para depois de aproximadamente 280k. Se eu diminuir o tamanho do fluxo, ele apenas registra por mais tempo, mas sempre para quando o arquivo é aproximadamente 280k. Se eu reduzir o tamanho do arquivo com as opções -fs e posso forçá-lo menor, mas qualquer valor acima do 280k deixa o arquivo em 280k. Aqui está minha saída:
avconv -y -i 'rtsp://192.168.0.100:554/axis-media/media.amp?videocodec=h264&streamprofile=Quality' -benchmark -loglevel debug -c copy test.mpg
Produz:
avconv version 0.8-4:0.8-1ubuntu1linaro1, Copyright (c) 2000-2011 the Libav developers built on Jan 26 2012 15:06:17 with gcc 4.6.1 configuration: --extra-version='4:0.8-1ubuntu1linaro1' --arch=arm --prefix=/usr --libdir=/usr/lib/arm-linux-gnueabi --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --extra-cflags='-marm -fPIC -DPIC' --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/arm-linux-gnueabi/neon/vfp --extra-cflags='-mfpu=neon -fPIC -DPIC' --enable-shared --disable-static libavutil 51. 21. 0 / 51. 21. 0 libavcodec 53. 34. 0 / 53. 34. 0 libavformat 53. 20. 0 / 53. 20. 0 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter 2. 15. 0 / 2. 15. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 52. 0. 0 / 52. 0. 0 [rtsp @ 0x26aa0] SDP: v=0 o=- 1343234035552520 1343234035552520 IN IP4 192.168.0.100 s=Media Presentation e=NONE b=AS:50000 t=0 0 a=control:rtsp://192.168.0.100:554/axis-media/media.amp?videocodec=h264&streamprofile=Quality a=range:npt=0.000000- m=video 0 RTP/AVP 96 c=IN IP4 0.0.0.0 b=AS:50000 a=framerate:30.0 a=transform:1,0,0;0,1,0;0,0,1 a=control:rtsp://192.168.0.100:554/axis-media/media.amp/trackID=1?videocodec=h264&streamprofile=Quality a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1; profile-level-id=420029; sprop-parameter-sets=Z0IAKeKQCgDLYC3AQEBpB4kRUA==,aM48gA== [rtsp @ 0x26aa0] video codec set to: h264 [NULL @ 0x2a800] RTP Packetization Mode: 1 [NULL @ 0x2a800] RTP Profile IDC: 42 Profile IOP: 0 Level: 29 [NULL @ 0x2a800] Extradata set to 0x2ad80 (size: 29)!hello state=0 [h264 @ 0x2a800] err{or,}_recognition separate: 1; 1 [h264 @ 0x2a800] err{or,}_recognition combined: 1; 1 [h264 @ 0x2a800] Unsupported bit depth: 0 [rtsp @ 0x26aa0] All info found [rtsp @ 0x26aa0] Estimating duration from bitrate, this may be inaccurate Input #0, rtsp, from 'rtsp://192.168.0.100:554/axis-media/media.amp?videocodec=h264&streamprofile=Quality': Metadata: title : Media Presentation Duration: N/A, start: 0.039989, bitrate: N/A Stream #0.0, 22, 1/90000: Video: h264 (Baseline), yuvj420p, 1280x800 [PAR 1:1 DAR 8:5], 1/180000, 90k tbr, 90k tbn, 180k tbc [mpeg @ 0x2fac0] VBV buffer size not set, muxing may fail Output #0, mpeg, to 'test.mpg': Metadata: title : Media Presentation encoder : Lavf53.20.0 Stream #0.0, 0, 1/90000: Video: [0][0][0][0] / 0x0000, yuvj420p, 1280x800 [PAR 1:1 DAR 8:5], 1/90000, q=2-31, 90k tbn, 90k tbc Stream mapping: Stream #0:0 -> #0:0 (copy) Press ctrl-c to stop encoding Received BYE for stream 0 (1/1)= 208kB time=1.36 bitrate=1252.6kbits/s frame= 49 fps= 49 q=-1.0 Lsize= 286kB time=1.88 bitrate=1245.9kbits/s video:283kB audio:0kB global headers:0kB muxing overhead 0.902341%
Obrigado antecipadamente.
Tente executar o seguinte comando:
avconv -rtsp_transport tcp -i
Isso funciona para mim.