[FFmpeg-user] Beaglebone - streaming issue - horizontal lines in output
Philip Chisholm
phil at filzer.com
Wed Oct 23 23:22:58 EEST 2019
Hi
Still having weird horizontal lines...
So using a beaglebone board (similar to raspberry pi board..) with web cam attached.
Running Debian.
I also had to sync the frame framerate (input and output) since it was running super fast....and that seemed to help the speed issue
I tried -re but that didn't work...
From the video - looks like a frame index (or interlacing) problem...see attached video - if you look at the video full screen and pause - looks like every 40 lines or so I get a horizontal line (which is shifted left/right about 50%) then image is good again for a bit - then another horizontal line...
I tried using this command line:
ffmpeg -re -framerate 30 -video_size 320x240 -i /dev/video0 -pix_fmt yuv422p -c:v libx264 -r 30 -vf fieldorder=tff testvd.mp4
with a -vf fieldorder=tff >>> and bff >>> but that didn't work. 11.70 fieldorder https://www.ffmpeg.org/ffmpeg-filters.html#fieldorder
Got this output (and the attached video):
debian at beaglebone:~/ffmpeg$ ffmpeg -re -framerate 30 -video_size 320x240 -i /dev/video0 -pix_fmt yuv422p -c:v libx264 -r 30 -vf fieldorder=tff testvd.mp4
ffmpeg version N-95495-gf7f4691f9f Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --enable-shared --enable-libx264 --enable-gpl --enable-neon
libavutil 56. 35.101 / 56. 35.101
libavcodec 58. 59.102 / 58. 59.102
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 64.100 / 7. 64.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 13226.625336, bitrate: 36864 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 36864 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
File 'testvd.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x7ae580] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x7ae580] profile High 4:2:2, level 1.3, 4:2:2, 8-bit
[libx264 @ 0x7ae580] 264 - core 157 r2969 d4099dd - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'testvd.mp4':
Metadata:
encoder : Lavf58.33.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv422p, 320x240, q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc58.59.102 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 1042 fps= 11 q=29.0 Lsize= 732kB time=00:00:34.63 bitrate= 173.1kbits/s dup=784 drop=0 speed=0.367x
video:719kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.746207%
[libx264 @ 0x7ae580] frame I:5 Avg QP:21.03 size: 8585
[libx264 @ 0x7ae580] frame P:308 Avg QP:24.18 size: 2038
[libx264 @ 0x7ae580] frame B:729 Avg QP:27.52 size: 89
[libx264 @ 0x7ae580] consecutive B-frames: 0.9% 11.9% 17.0% 70.2%
[libx264 @ 0x7ae580] mb I I16..4: 14.6% 36.3% 49.1%
[libx264 @ 0x7ae580] mb P I16..4: 5.5% 1.7% 6.2% P16..4: 34.1% 12.4% 7.5% 0.0% 0.0% skip:32.6%
[libx264 @ 0x7ae580] mb B I16..4: 0.4% 0.0% 0.1% B16..8: 9.8% 0.5% 0.1% direct: 0.2% skip:89.0% L0:41.2% L1:57.2% BI: 1.6%
[libx264 @ 0x7ae580] 8x8 transform intra:14.6% inter:46.3%
[libx264 @ 0x7ae580] coded y,uvDC,uvAC intra: 43.2% 64.6% 39.5% inter: 5.8% 11.8% 1.9%
[libx264 @ 0x7ae580] i16 v,h,dc,p: 4% 88% 1% 7%
[libx264 @ 0x7ae580] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 17% 21% 3% 6% 14% 4% 5% 6%
[libx264 @ 0x7ae580] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 42% 25% 2% 2% 3% 2% 2% 3%
[libx264 @ 0x7ae580] i8c dc,h,v,p: 52% 22% 19% 7%
[libx264 @ 0x7ae580] Weighted P-Frames: Y:3.6% UV:1.9%
[libx264 @ 0x7ae580] ref P L0: 57.3% 9.5% 18.3% 14.5% 0.4%
[libx264 @ 0x7ae580] ref B L0: 85.0% 11.1% 3.9%
[libx264 @ 0x7ae580] ref B L1: 97.1% 2.9%
[libx264 @ 0x7ae580] kb/s:169.45
Thanks!
Phil
-----Original Message-----
From: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> On Behalf Of Moritz Barsnick
Sent: Tuesday, October 22, 2019 5:10 PM
To: FFmpeg user discussions <ffmpeg-user at ffmpeg.org>
Subject: Re: [FFmpeg-user] Beaglebone - streaming issue - horizontal lines in output
On Tue, Oct 22, 2019 at 18:06:29 +0000, Philip Chisholm wrote:
> The issue is the weird horizontal lines.
> See attached video.
> I am guess some sort of pixel indexing - issue...
Peculiar.
It is still extremely unlikely that it's ffmpeg's fault, unless v4l2 support is extremely broken. But who knows...
Have you tried playing or recording that video device with some other tool, such as luvcview or guvcview, or camorama, or the likes?
Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testvd.mp4
Type: video/mp4
Size: 749255 bytes
Desc: testvd.mp4
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20191023/8295a481/attachment.mp4>
More information about the ffmpeg-user
mailing list