dimanche 27 avril 2014

Raspberry pi - impossible de lire les flux rtp de ffmpeg/avconv, aucune donnée reçue - Stack Overflow


I started avserver on my Raspberry Pi, webcam attached I read from /dev/video0 with


pi@raspberrypi $ avconv -f video4linux2 -i /dev/video0 -vcodec mpeg2video -r 25 - pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.0.124:8090

avconv version 0.8.6-6:0.8.6-1+rpi1, Copyright (c) 2000-2013 the Libav developers
built on Mar 31 2013 13:58:10 with gcc 4.6.3
[video4linux2 @ 0x17c1720] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2, from '/dev/video0':
Duration: N/A, start: 615.594215, bitrate: 36864 kb/s
Stream #0.0: Video: rawvideo, yuyv422, 320x240, 36864 kb/s, 30 tbr, 1000k tbn, 30 tbc
[buffer @ 0x17c16e0] w:320 h:240 pixfmt:yuyv422
[avsink @ 0x17c2f00] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x17c34c0] w:320 h:240 fmt:yuyv422 -> w:320 h:240 fmt:yuv420p flags:0x4
Output #0, rtp, to 'rtp://192.168.0.124:8090':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Video: mpeg2video, yuv420p, 320x240, q=2-31, 2600 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.0.124
t=0 0
a=tool:libavformat 53.21.1
m=video 8090 RTP/AVP 32
b=AS:2600

Press ctrl-c to stop encoding
frame= 576 fps= 25 q=2.0 size= 2133kB time=23.00 bitrate= 759.8kbits/s dup=390 drop=0
frame= 590 fps= 25 q=2.0 size= 2191kB time=23.56 bitrate= 762.0kbits/s dup=400 drop=0
frame= 1320 fps= 25 q=2.0 size= 4932kB time=52.76 bitrate= 765.8kbits/s dup=908 drop=0
...

Seems to work fine, it reads data from the webcam.


Now I'm trying to simply play with ffplay from my Mac with


$ ffplay rtp://192.168.0.124:8090
ffplay version 1.2.4 Copyright (c) 2003-2013 the FFmpeg developers
built on Mar 1 2014 15:18:21 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
nan A-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan A-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan A-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
...

The video doesn't open and it seems to not reading any data from the Raspberry Pi.


I use the default configuration for avserver. The webcam is definitely working as I managed to just write out images with avconv from it.


What did I miss?



I started avserver on my Raspberry Pi, webcam attached I read from /dev/video0 with


pi@raspberrypi $ avconv -f video4linux2 -i /dev/video0 -vcodec mpeg2video -r 25 - pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.0.124:8090

avconv version 0.8.6-6:0.8.6-1+rpi1, Copyright (c) 2000-2013 the Libav developers
built on Mar 31 2013 13:58:10 with gcc 4.6.3
[video4linux2 @ 0x17c1720] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2, from '/dev/video0':
Duration: N/A, start: 615.594215, bitrate: 36864 kb/s
Stream #0.0: Video: rawvideo, yuyv422, 320x240, 36864 kb/s, 30 tbr, 1000k tbn, 30 tbc
[buffer @ 0x17c16e0] w:320 h:240 pixfmt:yuyv422
[avsink @ 0x17c2f00] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x17c34c0] w:320 h:240 fmt:yuyv422 -> w:320 h:240 fmt:yuv420p flags:0x4
Output #0, rtp, to 'rtp://192.168.0.124:8090':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Video: mpeg2video, yuv420p, 320x240, q=2-31, 2600 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.0.124
t=0 0
a=tool:libavformat 53.21.1
m=video 8090 RTP/AVP 32
b=AS:2600

Press ctrl-c to stop encoding
frame= 576 fps= 25 q=2.0 size= 2133kB time=23.00 bitrate= 759.8kbits/s dup=390 drop=0
frame= 590 fps= 25 q=2.0 size= 2191kB time=23.56 bitrate= 762.0kbits/s dup=400 drop=0
frame= 1320 fps= 25 q=2.0 size= 4932kB time=52.76 bitrate= 765.8kbits/s dup=908 drop=0
...

Seems to work fine, it reads data from the webcam.


Now I'm trying to simply play with ffplay from my Mac with


$ ffplay rtp://192.168.0.124:8090
ffplay version 1.2.4 Copyright (c) 2003-2013 the FFmpeg developers
built on Mar 1 2014 15:18:21 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
nan A-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan A-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan A-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
...

The video doesn't open and it seems to not reading any data from the Raspberry Pi.


I use the default configuration for avserver. The webcam is definitely working as I managed to just write out images with avconv from it.


What did I miss?


Related Posts:

0 commentaires:

Enregistrer un commentaire