[FFmpeg-user] Errors transcoding Astra DVB-S channels via UDP

Eanna Sheehan eanna.apple at gmail.com
Thu Jun 9 15:21:28 CEST 2011


Hi,

I am inputting a UDP multicast stream (containing UK TV channels from the
Astra 2D satellite) to FFmpeg and transcoding it to H264 + AAC. On some
channels (the Channel-4 family) everything is OK, but on most other channels
I can see a lot of errors in the FFmpeg log output, and the quality of the
transcoded video output is not so good (there's a strip of distortion along
the bottom edge of the picture, and occasionally some distortion blocks in
other parts of the picture when there's fast motion). Increasing the output
H264 bitrate doesn't solve the problem.

My FFmpeg and x264 came from git yesterday, and I've also seen the problem
with FFmpeg 0.7.

As a test I have used FFmpeg  to grab the original stream to a file (using
-acodec copy -vcodec copy) and viewed it using vlc. It looks OK. If I then
transcode this file to H264 + AAC I get the same problems as if I
was transcoding the live stream.

Some background info:
The stream is originating on a different server, from MuMuDVB reading
a Mystique
SaTiX-S2 Dual DVB-S card. I have several of these cards, and the problem
happens on all of them. I have also tried DVBlast instead of MuMuDVB, but I
get the same problem. In the server where I am running FFmpeg, there is 2
quad-core CPUs, and they are only being utilised 15% so I don't think it's a
problem with lack of CPU power. The OS is Ubuntu 10.04 LTS.


My FFmpeg command is:

ffmpeg -v 9 -loglevel 99  -er 4 -y -t 40 -i udp://224.201.0.19:1234
-threads 0   -f mpegts -acodec libfaac -ar 48000 -ab 64k -s 640x360
-vcodec
libx264 -profile baseline -preset fast -b 800k -bt 250k -maxrate 800k
-bufsize 800k -aspect 16:9 -g 10 -r 30 -async 2 /home/omni/test19h.ts


Here are some excerpts from the log output ( [--snip--] indicates where I
have cut it):

ffmpeg version git-N-30644-gd552f61, Copyright (c) 2000-2011 the FFmpeg
developers
  built on Jun  8 2011 14:25:19 with gcc 4.4.3
  configuration: --arch=x86_64 --enable-gpl --enable-version3
--enable-nonfree --enable-postproc --enable-libfaac
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-libmp3lame
  libavutil    51.  7. 0 / 51.  7. 0
  libavcodec   53.  6. 1 / 53.  6. 1
  libavformat  53.  2. 0 / 53.  2. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 14. 0 /  2. 14. 0
  libswscale    0. 14. 1 /  0. 14. 1
  libpostproc  51.  2. 0 / 51.  2. 0
[NULL @ 0x1540820] Format mpegts probed with size=2048 and score=100
[mpegts @ 0x1540820] Unable to seek back to the start
[mpegts @ 0x1540820] stream=0 stream_type=0 pid=d0d prog_reg_desc=
[mpegts @ 0x1540820] stream=1 stream_type=0 pid=d0c prog_reg_desc=
[mpegts @ 0x1540820] probing stream 0 pp:2500
[mpegts @ 0x1540820] Probe with size=5872, packets=1 detected mp3 with
score=25
[mpegts @ 0x1540820] probing stream 1 pp:2500
[mpegts @ 0x1540820] Probe with size=204773, packets=1 detected mpegvideo
with score=51
[mpegts @ 0x1540820] probed stream 1
[mpegts @ 0x1540820] probing stream 0 pp:2499
[mpegts @ 0x1540820] Probe with size=11744, packets=2 detected mp3 with
score=25
[mpegts @ 0x1540820] probing stream 0 pp:2498
[mpegts @ 0x1540820] Probe with size=17616, packets=3 detected mp3 with
score=25
[mpegts @ 0x1540820] probing stream 0 pp:2497
[mpegts @ 0x1540820] probing stream 0 pp:2496
[mpegts @ 0x1540820] probing stream 0 pp:2495
[mpegts @ 0x1540820] Probe with size=35232, packets=6 detected mp3 with
score=25
[mpegts @ 0x1540820] probing stream 0 pp:2494
[mpegts @ 0x1540820] probing stream 0 pp:2493
[mpegts @ 0x1540820] probing stream 0 pp:2492
[mpegts @ 0x1540820] probing stream 0 pp:2491
[mpegts @ 0x1540820] probing stream 0 pp:2490
[mpegts @ 0x1540820] probing stream 0 pp:2489
[mpegts @ 0x1540820] Probe with size=70464, packets=12 detected mp3 with
score=25
[mpegts @ 0x1540820] probing stream 0 pp:2488
[mpegts @ 0x1540820] probing stream 0 pp:2487
[mpegts @ 0x1540820] probing stream 0 pp:2486
[mpegts @ 0x1540820] probing stream 0 pp:2485
[mpegts @ 0x1540820] probing stream 0 pp:2484
[mpegts @ 0x1540820] probing stream 0 pp:2483
[mpegts @ 0x1540820] probing stream 0 pp:2482
[mpegts @ 0x1540820] probing stream 0 pp:2481
[mpegts @ 0x1540820] Probe with size=117440, packets=20 detected mp3 with
score=25
[mpegts @ 0x1540820] probed stream 0
[mp2 @ 0x1556e40] Header missing
[mpegts @ 0x1540820] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 0x1540820] Estimating duration from bitrate, this may be
inaccurate
Input #0, mpegts, from 'udp://224.201.0.19:1234':
  Duration: N/A, start: 74264.775856, bitrate: 10192 kb/s
  Program 10060
    Metadata:
      service_name    : ITV1 London
      service_provider: BSkyB
  Program 10070
    Metadata:
      service_name    : ITV2
      service_provider: BSkyB
  Program 10071
    Metadata:
      service_name    : CITV
      service_provider: BSkyB
  Program 10072
    Metadata:
      service_name    : ITV4
      service_provider: BSkyB
  Program 10079
    Metadata:
      service_name    : ITVi Stream 44
      service_provider: BSkyB
  Program 10080
    Metadata:
      service_name    : ITV1 Granada
      service_provider: BSkyB
  Program 10090
    Metadata:
      service_name    : ITV1 Anglia E
      service_provider: BSkyB
  Program 10100
    Metadata:
      service_name    : ITV1 Central W
      service_provider: BSkyB
  No Program
    Stream #0.0[0xd0d], 211, 1/90000: Audio: mp2, 48000 Hz, stereo, s16, 192
kb/s
    Stream #0.1[0xd0c], 119, 1/90000: Video: mpeg2video (Main), yuv420p,
704x576 [PAR 16:11 DAR 16:9], 1/50, 10000 kb/s, 25 fps, 25 tbr, 90k tbn, 50
tbc
[buffer @ 0x1556120] w:704 h:576 pixfmt:yuv420p tb:1/1000000 sar:16/11
sws_param:
[scale @ 0x1723940] w:704 h:576 fmt:yuv420p -> w:640 h:360 fmt:yuv420p
flags:0x4
[libx264 @ 0x153a680] using mv_range_thread = 24
[libx264 @ 0x153a680] using SAR=1/1
[libx264 @ 0x153a680] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.1 Cache64
[libx264 @ 0x153a680] profile Constrained Baseline, level 3.0
[mpegts @ 0x153a120] muxrate VBR, pcr every 3 pkts, sdt every 200, pat/pmt
every 40 pkts
Output #0, mpegts, to '/home/omni/test19h.ts':
  Metadata:
    encoder         : Lavf53.2.0
    Stream #0.0, 0, 1/90000: Video: libx264, yuv420p, 640x360 [PAR 1:1 DAR
16:9], 1/30, q=2-31, 800 kb/s, 90k tbn, 30 tbc
    Stream #0.1, 0, 1/90000: Audio: libfaac, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
Press [q] to stop, [?] for help
[mp2 @ 0x1556e40] Header missing
Error while decoding stream #0.0
discarding 1142 audio samples
[mpeg2video @ 0x15572e0] end mismatch left=27 0
[mpeg2video @ 0x15572e0] Warning MVs not available
[mpeg2video @ 0x15572e0] concealing 44 DC, 44 AC, 44 MV errors
*** 14 dup!
    Last message repeated 7 times
[mpeg2video @ 0x15572e0] end mismatch left=26 0
[mpeg2video @ 0x15572e0] Warning MVs not available
[mpeg2video @ 0x15572e0] concealing 44 DC, 44 AC, 44 MV errors
*** 1 dup!
compensating audio timestamp drift:2304.000000 compensation:2 in:48000
compensating audio timestamp drift:2303.000000 compensation:2 in:48000
compensating audio timestamp drift:2303.000000 compensation:2 in:48000
compensating audio timestamp drift:2303.000000 compensation:2 in:48000
compensating audio timestamp drift:2303.000000 compensation:2 in:48000
compensating audio timestamp drift:2303.000000 compensation:2 in:48000
compensating audio timestamp drift:2303.000000 compensation:2 in:48000
compensating audio timestamp drift:2303.000000 compensation:2 in:48000
compensating audio timestamp drift:2303.000000 compensation:2 in:48000
[mpeg2video @ 0x15572e0] end mismatch left=23 0
[mpeg2video @ 0x15572e0] concealing 44 DC, 44 AC, 44 MV errors
[mpeg2video @ 0x15572e0] end mismatch left=28 0
[mpeg2video @ 0x15572e0] concealing 44 DC, 44 AC, 44 MV errors
[mpeg2video @ 0x15572e0] end mismatch left=19 0
[mpeg2video @ 0x15572e0] concealing 44 DC, 44 AC, 44 MV errors
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (13 573)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (95 568)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (232 567)
    Last message repeated 1 times
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (476 574)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (627 572)
    Last message repeated 1 times
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (23 562)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (33 573)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (216 567)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (248 567)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (242 567)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (227 562)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (242 567)
[mpeg2video @ 0x15572e0] MPEG motion vector out of boundary (392 572)
    Last message repeated 1 times

[--snip--]

[libx264 @ 0x153a680] frame=1196 QP=24.21 NAL=2 Slice:P Poc:110 I:188  P:524
 SKIP:208  size=4253 bytes
[libx264 @ 0x153a680] frame=1197 QP=22.88 NAL=2 Slice:P Poc:112 I:210  P:544
 SKIP:166  size=5437 bytes
[libx264 @ 0x153a680] frame=1198 QP=21.26 NAL=2 Slice:P Poc:114 I:12   P:293
 SKIP:615  size=1366 bytes
[libx264 @ 0x153a680] frame=1199 QP=24.75 NAL=2 Slice:P Poc:116 I:175  P:528
 SKIP:217  size=4033 bytes
[libx264 @ 0x153a680] frame=1200 QP=24.76 NAL=2 Slice:P Poc:118 I:126  P:546
 SKIP:248  size=3507 bytes
[libx264 @ 0x153a680] frame=1201 QP=26.30 NAL=2 Slice:P Poc:120 I:229  P:515
 SKIP:176  size=4735 bytes
frame= 1202 fps= 34 q=191999.0 Lsize=    4643kB time=00:00:40.00 bitrate=
950.9kbits/s dup=212 drop=0
video:3847kB audio:313kB global headers:0kB muxing overhead 11.597043%
frame I:11    Avg QP:22.95  size: 21453
[libx264 @ 0x153a680] frame P:1191  Avg QP:27.41  size:  3110
[libx264 @ 0x153a680] mb I  I16..4: 22.9%  0.0% 77.1%
[libx264 @ 0x153a680] mb P  I16..4:  3.0%  0.0%  2.6%  P16..4: 37.2% 11.3%
 3.4%  0.0%  0.0%    skip:42.5%
[libx264 @ 0x153a680] coded y,uvDC,uvAC intra: 44.1% 51.7% 14.9% inter:
14.1% 18.6% 1.1%
[libx264 @ 0x153a680] i16 v,h,dc,p: 27% 29%  9% 35%
[libx264 @ 0x153a680] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 23% 21%  5%  8%  6%
 7%  4%  5%
[libx264 @ 0x153a680] i8c dc,h,v,p: 65% 18% 14%  3%
[libx264 @ 0x153a680] ref P L0: 79.5% 20.5%
[libx264 @ 0x153a680] kb/s:786.64

Any help much appreciated.

Thanks.

Eanna


More information about the ffmpeg-user mailing list