[FFmpeg-devel] Blackmagic DeckLink indev

JULIAN GARDNER joolzg at btinternet.com
Thu Mar 29 01:26:54 CEST 2012


OK i have this working sort of so was wondering if there is anybody out there that can help.

OK working bit, source 1080i 50

ncoder at encoder0:~/ffmpeg$ ./ffmpeg -threads 2 -f decklink -input_format 10 -i "" -vcodec libx264 -preset faster -x264opts keyint=75 -x264opts vbv-maxrate=850 -s 720x576 -bufsize 1M -r 25 -acodec libfaac -ab 96k -ar 32k -ac 2 -async 1 -y -f mpegts a.ts
ffmpeg version N-39366-g247fbf0 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 28 2012 19:06:56 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264 --extra-libs=/usr/lib/libssl.so.0.9.8 --extra-libs=/usr/lib/libcrypto.so.0.9.8
  libavutil      51. 44.100 / 51. 44.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 66.101 /  2. 66.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
[decklink @ 0x29c56c0] DeckLink grabbber BETA
[decklink @ 0x29c56c0] Video num:1000, den:25000
[decklink @ 0x29c56c0] Estimating duration from bitrate, this may be inaccurate
Input #0, decklink, from '':
  Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
    Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1920x1080, -2147483 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Incompatible pixel format 'uyvy422' for codec 'libx264', auto-selecting format 'yuv422p'
[buffer @ 0x29d61a0] w:1920 h:1080 pixfmt:uyvy422 tb:1/1000000 sar:0/1 sws_param:
[scale @ 0x29cff60] w:1920 h:1080 fmt:uyvy422 sar:0/1 -> w:720 h:576 fmt:yuv422p sar:0/1 flags:0x4
[libx264 @ 0x29d90e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x29d90e0] profile High 4:2:2, level 3.0, 4:2:2 8-bit
[mpegts @ 0x29d8920] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'a.ts':
  Metadata:
    encoder         : Lavf54.3.100
    Stream #0:0: Video: h264, yuv422p, 720x576, q=-1--1, 90k tbn, 25 tbc
    Stream #0:1: Audio: aac, 32000 Hz, 2 channels, s16, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> libx264)
  Stream #0:1 -> #0:1 (pcm_s16le -> libfaac)
Press [q] to stop, [?] for help
frame=  187 fps= 25 q=32766.0 Lsize=     146kB time=00:00:07.40 bitrate= 162.0kbits/s dup=1 drop=0    
video:93kB audio:18kB global headers:0kB muxing overhead 31.440853%
[libx264 @ 0x29d90e0] frame I:1     Avg QP:24.05  size: 44419
[libx264 @ 0x29d90e0] frame P:47    Avg QP:20.53  size:   925
[libx264 @ 0x29d90e0] frame B:139   Avg QP:22.49  size:    53
[libx264 @ 0x29d90e0] consecutive B-frames:  0.5%  1.1%  0.0% 98.4%
[libx264 @ 0x29d90e0] mb I  I16..4: 26.5% 17.0% 56.5%
[libx264 @ 0x29d90e0] mb P  I16..4:  0.4%  0.1%  0.0%  P16..4: 17.4%  1.2%  0.5%  0.0%  0.0%    skip:80.4%
[libx264 @ 0x29d90e0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.1%  0.0%  0.0%  direct: 1.0%  skip:98.9%  L0:49.1% L1:50.5% BI: 0.4%
[libx264 @ 0x29d90e0] 8x8 transform intra:18.3% inter:42.1%
[libx264 @ 0x29d90e0] coded y,uvDC,uvAC intra: 73.3% 34.4% 0.0% inter: 1.0% 2.7% 0.0%
[libx264 @ 0x29d90e0] i16 v,h,dc,p: 42% 22% 26% 10%
[libx264 @ 0x29d90e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 13% 39%  6%  6%  4%  6%  6%  5%
[libx264 @ 0x29d90e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 15% 17% 10% 11%  8%  8%  7%  7%
[libx264 @ 0x29d90e0] i8c dc,h,v,p: 85%  5%  9%  0%
[libx264 @ 0x29d90e0] Weighted P-Frames: Y:14.9% UV:10.6%
[libx264 @ 0x29d90e0] ref P L0: 81.2% 18.8%
[libx264 @ 0x29d90e0] ref B L0: 96.5%  3.5%
[libx264 @ 0x29d90e0] ref B L1: 97.9%  2.1%
[libx264 @ 0x29d90e0] kb/s:101.84



But on another machine with another card 720p 59.94
./ffmpeg -threads 3 -f decklink -input_format 14 -i "" -metadata service_provider="TV" -metadata service_name="#Test Country" -vcodec libx264 -preset veryfast -x264opts keyint=75 -x264opts bitrate=1100 -s 1280x720 -bufsize 2M -r 25 -acodec libfaac -ab 128k -ar 32k -ac 2 -async 1 -f mpegts "udp://225.171.246.1:1234?pkt_size=1316;buffer_size=1048576"
ffmpeg version N-39366-g247fbf0 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 28 2012 19:06:56 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264 --extra-libs=/usr/lib/libssl.so.0.9.8 --extra-libs=/usr/lib/libcrypto.so.0.9.8
  libavutil      51. 44.100 / 51. 44.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 66.101 /  2. 66.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
[decklink @ 0x18b26c0] DeckLink grabbber BETA
[decklink @ 0x18b26c0] Video num:1001, den:60000
[decklink @ 0x18b26c0] max_analyze_duration 5000000 reached at 16700017
[decklink @ 0x18b26c0] Estimating duration from bitrate, this may be inaccurate
Input #0, decklink, from '':
  Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
    Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720, -2147483 kb/s, 0.06 fps, 59.94 tbr, 59.94 tbn, 59.94 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Incompatible pixel format 'uyvy422' for codec 'libx264', auto-selecting format 'yuv422p'
[buffer @ 0x18c3a00] w:1280 h:720 pixfmt:uyvy422 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x18c3ae0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0x18bd2a0] w:1280 h:720 fmt:uyvy422 sar:0/1 -> w:1280 h:720 fmt:yuv422p sar:0/1 flags:0x4
[libx264 @ 0x18b0b40] VBV maxrate unspecified, assuming CBR
[libx264 @ 0x18b0b40] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x18b0b40] profile High 4:2:2, level 3.1, 4:2:2 8-bit
[mpegts @ 0x18c5dc0] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'udp://225.171.246.1:1234?pkt_size=1316;buffer_size=1048576':
  Metadata:
    service_provider: TV
    service_name    : #Test Country
    encoder         : Lavf54.3.100
    Stream #0:0: Video: h264, yuv422p, 1280x720, q=-1--1, 1100 kb/s, 90k tbn, 25 tbc
    Stream #0:1: Audio: aac, 32000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> libx264)
  Stream #0:1 -> #0:1 (pcm_s16le -> libfaac)
Press [q] to stop, [?] for help
frame= 1670 fps=262 q=32766.0 Lsize=    9537kB time=00:00:00.00 bitrate=   0.0kbits/s dup=1666 drop=0    
video:8666kB audio:0kB global headers:0kB muxing overhead 10.054924%
[libx264 @ 0x18b0b40] frame I:7     Avg QP:12.44  size:118864
[libx264 @ 0x18b0b40] frame P:421   Avg QP: 5.72  size: 18067
[libx264 @ 0x18b0b40] frame B:1242  Avg QP:12.67  size:   351
[libx264 @ 0x18b0b40] consecutive B-frames:  0.8%  0.1%  0.2% 98.9%
[libx264 @ 0x18b0b40] mb I  I16..4:  7.3% 38.3% 54.4%
[libx264 @ 0x18b0b40] mb P  I16..4:  0.1%  0.1%  0.0%  P16..4: 45.9%  0.3%  0.2%  0.0%  0.0%    skip:53.6%
[libx264 @ 0x18b0b40] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  2.4%  0.0%  0.0%  direct: 1.4%  skip:96.2%  L0: 6.0% L1:93.9% BI: 0.1%
[libx264 @ 0x18b0b40] 8x8 transform intra:38.7% inter:17.0%
[libx264 @ 0x18b0b40] coded y,uvDC,uvAC intra: 92.7% 78.5% 65.0% inter: 5.4% 5.0% 3.9%
[libx264 @ 0x18b0b40] i16 v,h,dc,p:  7% 76%  8%  9%
[libx264 @ 0x18b0b40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 29% 18%  7%  3%  3%  3%  5% 10%
[libx264 @ 0x18b0b40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 40%  6%  8%  4%  4%  4%  5% 10%
[libx264 @ 0x18b0b40] i8c dc,h,v,p: 14% 82%  3%  2%
[libx264 @ 0x18b0b40] Weighted P-Frames: Y:0.2% UV:0.2%
[libx264 @ 0x18b0b40] kb/s:1062.71

Now if you look you will see that i get a very high FPS (262) and a lot of dropped frams 1666, and 0.06 fps as input? also if i leave it for a short time i get these
DTS 5, next:100086 st:1 invalid droping (dropping)????

i can post the code to anybody that wants it.

joolz


More information about the ffmpeg-devel mailing list