Beaglebone - streaming issue - lines in output (and if someone is good with Beaglebone live streaming P2P... please let me know...)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Beaglebone - streaming issue - lines in output (and if someone is good with Beaglebone live streaming P2P... please let me know...)

Philip Chisholm
Hi

I am trying to do a 'live stream' on a beagle bone green with wifi (http://wiki.seeedstudio.com/BeagleBone_Green_Wireless/).
Well (semi live...since RTMP has some big delays for us...)
(OH...side note - if someone is good with Beaglebone live streaming and maybe using P2P... please let me know...I need a little help...thanks!!)

And having issues with output - lines in screen.

[cid:image004.jpg@01D57ABE.9CAB8900]

1) System running
- Debian 9.9 2019-08-03 4GB SD IoT<https://debian.beagleboard.org/images/bone-debian-9.9-iot-armhf-2019-08-03-4gb.img.xz>

2) Cam
- usb webcam
- generic webcam
- format: YUYV

debian@beaglebone:~$ v4l2-ctl --device /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Index       : 0
        Type        : Video Capture
        Pixel Format: 'YUYV'
        Name        : YUYV 4:2:2
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                Size: Discrete 352x288
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                Size: Discrete 176x144
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                Size: Discrete 160x120
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)


- cam works fine with webtest (plugged into windows 10 pc - using chrome browser) - nice image
- [cid:image005.jpg@01D57ABE.9CAB8900]


ioctl: VIDIOC_ENUM_FMT
        Index       : 0
        Type        : Video Capture
        Pixel Format: 'YUYV'
        Name        : YUYV 4:2:2

3) FFmpeg script:

ffmpeg -s 320x200 -r 10 -i /dev/video0 -c:v h264 -pix_fmt yuv420p -an -sn -preset ultrafast -tune zerolatency -r 30 -f flv rtmp://165.22.232.61:1935/hls/movie

Screen shot...

[cid:image010.jpg@01D57ABE.9CAB8900]

Text:

debian@beaglebone:~$ ffmpeg -s 320x200 -r 10 -i /dev/video0 -c:v h264 -pix_fmt yuv420p -an -sn -preset ultrafast -tune zerolatency -r 30 -f flv rtmp://165.22.232.61:1935/hls/movie

ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[video4linux2,v4l2 @ 0x1027ca0] The V4L2 driver changed the video from 320x200 to 320x240
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 613.460920, bitrate: 36864 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 36864 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[libx264 @ 0x102b0b0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x102b0b0] profile Constrained Baseline, level 1.3
[libx264 @ 0x102b0b0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, flv, to 'rtmp://165.22.232.61:1935/hls/movie':
  Metadata:
    encoder         : Lavf57.56.101
    Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 320x240, q=-1--1, 30 fps, 1k tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.64.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 2943 fps= 26 q=27.0 Lsize=   14300kB time=00:04:54.20 bitrate= 398.2kbits/s speed=2.55x
video:14242kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.405315%
[libx264 @ 0x102b0b0] frame I:12    Avg QP:23.33  size: 13324
[libx264 @ 0x102b0b0] frame P:2931  Avg QP:26.40  size:  4921
[libx264 @ 0x102b0b0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x102b0b0] mb P  I16..4: 19.3%  0.0%  0.0%  P16..4: 58.3%  0.0%  0.0%  0.0%  0.0%    skip:22.4%
[libx264 @ 0x102b0b0] coded y,uvDC,uvAC intra: 66.5% 44.1% 21.7% inter: 42.8% 15.7% 5.1%
[libx264 @ 0x102b0b0] i16 v,h,dc,p: 25% 53% 10% 11%
[libx264 @ 0x102b0b0] i8c dc,h,v,p: 52% 27% 17%  5%
[libx264 @ 0x102b0b0] kb/s:1189.27
debian@beaglebone:~$




4) All the different script we try - same result...

ffmpeg -s 320x240 -r 30 -i /dev/video0 -c:v libx264 -f flv rtmp://165.22.232.61:1935/hls/movie

5) If I use a different webcam
- Logitech c905 - same same input format
- no lines...
- ffmpeg -v verbose -r 30 -s 320x240 -f v4l2 -i /dev/video0 -pix_fmt yuv422p -c:v libx264 -f flv rtmp://165.22.232.61:1935/hls/movie

[cid:image011.jpg@01D57ABE.9CAB8900]


ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[video4linux2,v4l2 @ 0x9b1ca0] The V4L2 driver changed the video from 320x200 to 320x240
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 2011.767666, bitrate: 36864 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 36864 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[libx264 @ 0x9b50b0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x9b50b0] profile Constrained Baseline, level 1.3
[libx264 @ 0x9b50b0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, flv, to 'rtmp://165.22.232.61:1935/hls/movie':
  Metadata:
    encoder         : Lavf57.56.101
    Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 320x240, q=-1--1, 30 fps, 1k tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.64.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 1769 fps= 30 q=20.0 Lsize=     527kB time=00:02:56.80 bitrate=  24.4kbits/s speed=3.04x
video:492kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 7.073783%
[libx264 @ 0x9b50b0] frame I:8     Avg QP:17.38  size: 22883
[libx264 @ 0x9b50b0] frame P:1761  Avg QP:20.09  size:   182
[libx264 @ 0x9b50b0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 0x9b50b0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4: 10.4%  0.0%  0.0%  0.0%  0.0%    skip:89.6%
[libx264 @ 0x9b50b0] coded y,uvDC,uvAC intra: 79.7% 87.9% 65.0% inter: 2.7% 2.1% 0.0%
[libx264 @ 0x9b50b0] i16 v,h,dc,p: 26% 30% 17% 28%
[libx264 @ 0x9b50b0] i8c dc,h,v,p: 42% 21% 20% 17%
[libx264 @ 0x9b50b0] kb/s:68.26



Output - no lines...see image below with Logitech webcam
(yes better webcam...but data is data...should be able to get clean stream with cheap webcam)


[cid:image016.jpg@01D57ABE.9CAB8900]

************





Stream we are getting:
- horizontal lines with cheap webcam.
- how to fix?!
[cid:image017.jpg@01D57ABE.9CAB8900]
Suggestions?

Thanks so much!

Phil


Philip Chisholm

Filzer
Halifax, NS
Canada

www.filzer.com<http://www.filzer.com/>








_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

image004.jpg (23K) Download Attachment
image005.jpg (51K) Download Attachment
image010.jpg (146K) Download Attachment
image011.jpg (107K) Download Attachment
image016.jpg (26K) Download Attachment
image017.jpg (23K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Beaglebone - streaming issue - lines in output (and if someone is good with Beaglebone live streaming P2P... please let me know...)

Carl Eugen Hoyos-2
Am Fr., 4. Okt. 2019 um 19:18 Uhr schrieb Philip Chisholm <[hidden email]>:

> debian@beaglebone:~$ ffmpeg -s 320x200 -r 10 -i /dev/video0 -c:v h264 -pix_fmt yuv420p -an -sn -preset ultrafast -tune zerolatency -r 30 -f flv rtmp://165.22.232.61:1935/hls/movie

Should be "video_size" and "framerate" instead of "s" and "r".
(Doesn't matter for "s" iirc, can matter for "r".)
More important (and sorry if you don't find this obvious):
Your command line does very different things and it is difficult for us
to guess were the issue is - do you see the same problems with
file output (and different options for v4l2)?

> ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers

Please understand that only current FFmpeg git head is supported.

It seems very unlikely to me that FFmpeg produces the lines.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Beaglebone - streaming issue - lines in output (and if someone is good with Beaglebone live streaming P2P... please let me know...)

Philip Chisholm
Hi Carl

Thanks for info.
I am working on updated build with most current ffmpeg for Beaglebone board.
And will check again.

Cheers.

Phil



-----Original Message-----
From: ffmpeg-user <[hidden email]> On Behalf Of Carl Eugen Hoyos
Sent: Friday, October 4, 2019 6:26 PM
To: FFmpeg user questions <[hidden email]>
Subject: Re: [FFmpeg-user] Beaglebone - streaming issue - lines in output (and if someone is good with Beaglebone live streaming P2P... please let me know...)

Am Fr., 4. Okt. 2019 um 19:18 Uhr schrieb Philip Chisholm <[hidden email]>:

> debian@beaglebone:~$ ffmpeg -s 320x200 -r 10 -i /dev/video0 -c:v h264
> -pix_fmt yuv420p -an -sn -preset ultrafast -tune zerolatency -r 30 -f
> flv rtmp://165.22.232.61:1935/hls/movie

Should be "video_size" and "framerate" instead of "s" and "r".
(Doesn't matter for "s" iirc, can matter for "r".) More important (and sorry if you don't find this obvious):
Your command line does very different things and it is difficult for us to guess were the issue is - do you see the same problems with file output (and different options for v4l2)?

> ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg
> developers

Please understand that only current FFmpeg git head is supported.

It seems very unlikely to me that FFmpeg produces the lines.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".