[FFmpeg-user] wmalossless - a/v sync issue

David Hahn ddhahn at gmail.com
Wed Feb 27 02:03:13 CET 2013


Carl Eugen Hoyos said.

> Does kaltura really distribute FFmpeg binaries with
> libfaac enabled? That would be a copyright violation
> (that automatically makes them loose the right to
> distribute FFmpeg).

Thanks for replying. I appreciate your time.

I found that interesting as well and, yes, libfaac is enabled in
Kaltura CE v5. They distribute a build of version 0.6 with it.  At
least it was configured with --enable-libfaac. They also ship with
--disable-optimizations, which someone on #ffmpeg called out as odd..

> I tested the following two command lines:
> $ ffmpeg -i testfile3.wmv -qscale 2 outac3.avi
> $ ffmpeg -i testfile3.wmv -qscale 2 -acodec mp2 outmp2.avi
>
> The output files play fine with ffplay.

Thanks for testing it out.. was their any output in the logs similar
to what I've pasted below? Does that sort of output typically matter
in output quality?

> > transcoded to H.264 and AAC:
> > http://jabba.servebeer.com:51234/store/output-testfile3.mp4
>
> Plays fine here with MPlayer and ffplay.

You're right, they do. At least MPlayer for me. I hadn't tried that
previously, only VLC which seemed to show some audio artifacts and
skipping for me. Is is plausable that some players can overcome sync
issues on playback while others have a harder time?

> Please always post command line together with console output
> (at least the first 50 and the last 50 lines) on this mailing
> list, please do not use external resources.

OK thanks for the clarification. Here is the command line Kaltura uses.

/opt/kaltura/bin/ffmpeg -i
/opt/kaltura/web//content/entry/data/4/267/0_xnr6203m_0_7qwjyc3p_2.wmv
-vcodec  libx264 -subq 2 -qcomp 0.6 -qmin 10 -qmax 50 -qdiff 4 -b 750k
-s 624x352 -r 24 -g 60 -acodec libfaac -ab 96k -ar 44100 -f mp4 -y
/opt/kaltura/tmp/convert/tmp_convert_512cc478225d0 >>
"/opt/kaltura/tmp/convert/convert_0_xnr6203m_21f37.log" 2>&1

Here is the FFmpeg output. To be honest, I am not sure if my problem
lies in Kaltura's players or in the transcoded files or a combo. The
kaltura players video freezes for a moment with the video we're
speaking of, but the audio continues, leading to a sync issue.

The reason I am starting with ffmpeg is that there are some messages
in the log files that I haven't seen before I started using my own
build of ffmpeg and trying to transcode wmalossless files.

ffmpeg version N-50309-gaf0e814 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 25 2013 13:25:44 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
  configuration: --extra-cflags=-O2 --enable-bzlib --disable-devices
--enable-libfaac --enable-libgsm --enable-libmp3lame
--enable-libschroedinger --enable-libtheora --enable-libvorbis
--enable-libx264 --enable-libxvid --enable-avfilter
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-libvpx --enable-libspeex
--enable-postproc --enable-pthreads --disable-static --enable-shared
--enable-gpl --disable-debug --disable-stripping --extra-cflags=-fPIC
--extra-ldflags=-fPIC --enable-nonfree --enable-version3
--libdir=/usr/local/lib
  libavutil      52. 17.103 / 52. 17.103
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 41.100 /  3. 41.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[wmv3 @ 0xe3ad80] Extra data: 8 bits left, value: 0
Input #0, asf, from
'/opt/kaltura/web//content/entry/data/4/267/0_xnr6203m_0_7qwjyc3p_2.wmv':
  Metadata:
    WMFSDKNeeded    : 0.0.0.0000
    DeviceConformanceTemplate: MP at HL
    WM/WMADRCPeakReference: 327
    WM/WMADRCPeakTarget: 327
    WM/WMADRCAverageReference: 432
    WM/WMADRCAverageTarget: 432
    NumberOfFrames  : 1393
    WMFSDKVersion   : 12.0.7600.16385
    IsVBR           : 0
  Duration: 00:00:58.50, start: 0.000000, bitrate: 5265 kb/s
    Stream #0:0: Audio: wmalossless (c[1][0][0] / 0x0163), 44100 Hz,
stereo, s16p, 1152 kb/s
    Stream #0:1: Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p,
1280x720, 5000 kb/s, SAR 1:1 DAR 16:9, 24 tbr, 1k tbn, 1k tbc
Please use -b:a or -b:v, -b is ambiguous
[libx264 @ 0xe3c8e0] using SAR=352/351
[libx264 @ 0xe3c8e0] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.2
[libx264 @ 0xe3c8e0] profile High, level 3.0
[libx264 @ 0xe3c8e0] 264 - core 129 r2245 bc13772 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html -
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2
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=0
threads=3 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=60
keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr
mbtree=1 bitrate=750 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=50 qpstep=4
ip_ratio=1.40 aq=1:1.00
[wmv3 @ 0xe3ad80] Extra data: 8 bits left, value: 0
Output #0, mp4, to '/opt/kaltura/tmp/convert/tmp_convert_512cc478225d0':
  Metadata:
    WMFSDKNeeded    : 0.0.0.0000
    DeviceConformanceTemplate: MP at HL
    WM/WMADRCPeakReference: 327
    WM/WMADRCPeakTarget: 327
    WM/WMADRCAverageReference: 432
    WM/WMADRCAverageTarget: 432
    NumberOfFrames  : 1393
    WMFSDKVersion   : 12.0.7600.16385
    IsVBR           : 0
    encoder         : Lavf54.63.100
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p,
624x352 [SAR 352:351 DAR 16:9], q=10-50, 750 kb/s, 12288 tbn, 24 tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz,
stereo, s16, 96 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (wmv3 -> libx264)
  Stream #0:0 -> #0:1 (wmalossless -> libfaac)
Press [q] to stop, [?] for help
Multiple frames in a packet from stream 0
frame=   49 fps=0.0 q=32.0 size=       7kB time=00:00:04.64 bitrate=
13.1kbits/s
frame=  112 fps=111 q=10.0 size=      28kB time=00:00:06.22 bitrate=
36.8kbits/s
Queue input is backward in time
[mp4 @ 0xe3c080] st:0 PTS: 272362 DTS: 272362 < 277465 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 273386 DTS: 273386 < 277466 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 274410 DTS: 274410 < 277467 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 275434 DTS: 275434 < 277468 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 276458 DTS: 276458 < 277469 invalid, clipping
[libfaac @ 0xe5af40] Queue input is backward in time
[mp4 @ 0xe3c080] st:0 PTS: 278492 DTS: 278492 < 334825 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 279516 DTS: 279516 < 334826 invalid, clipping
[libfaac @ 0xe5af40] Queue input is backward in time
[mp4 @ 0xe3c080] st:0 PTS: 280539 DTS: 280539 < 334827 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 281563 DTS: 281563 < 334828 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 282587 DTS: 282587 < 334829 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 283611 DTS: 283611 < 334830 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 282549 DTS: 282549 < 334831 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 283573 DTS: 283573 < 334832 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 284597 DTS: 284597 < 334833 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 285621 DTS: 285621 < 334834 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 288723 DTS: 288723 < 334835 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 289747 DTS: 289747 < 334836 invalid, clipping
[libfaac @ 0xe5af40] Queue input is backward in time
[mp4 @ 0xe3c080] st:0 PTS: 290771 DTS: 290771 < 334837 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 291795 DTS: 291795 < 334838 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 292819 DTS: 292819 < 334839 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 293843 DTS: 293843 < 334840 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 292824 DTS: 292824 < 334841 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 293848 DTS: 293848 < 334842 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 294872 DTS: 294872 < 334843 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 295896 DTS: 295896 < 334844 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 298954 DTS: 298954 < 334845 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 299978 DTS: 299978 < 334846 invalid, clipping
[libfaac @ 0xe5af40] Queue input is backward in time
[mp4 @ 0xe3c080] st:0 PTS: 301002 DTS: 301002 < 334847 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 302026 DTS: 302026 < 334848 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 303050 DTS: 303050 < 334849 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 304074 DTS: 304074 < 334850 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 303055 DTS: 303055 < 334851 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 304079 DTS: 304079 < 334852 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 305103 DTS: 305103 < 334853 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 306127 DTS: 306127 < 334854 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 309185 DTS: 309185 < 334855 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 310209 DTS: 310209 < 334856 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 311233 DTS: 311233 < 334857 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 312257 DTS: 312257 < 334858 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 313281 DTS: 313281 < 334859 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 314305 DTS: 314305 < 334860 invalid, clipping

... (similar output until..)

[libfaac @ 0xe5af40] Queue input is backward in time
[mp4 @ 0xe3c080] st:0 PTS: 2512818 DTS: 2512818 < 2513882 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 2513842 DTS: 2513842 < 2513883 invalid, clipping
frame= 1327 fps= 51 q=26.0 size=    5752kB time=00:00:57.25 bitrate=
822.9kbits/s
Queue input is backward in time
[mp4 @ 0xe3c080] st:0 PTS: 2533325 DTS: 2533325 < 2534344 invalid, clipping
[libfaac @ 0xe5af40] Queue input is backward in time
[mp4 @ 0xe3c080] st:0 PTS: 2543556 DTS: 2543556 < 2544619 invalid, clipping
[mp4 @ 0xe3c080] st:0 PTS: 2544580 DTS: 2544580 < 2544620 invalid, clipping
frame= 1346 fps= 51 q=26.0 size=    5850kB time=00:00:58.00 bitrate=
826.3kbits/s
frame= 1374 fps= 51 q=26.0 size=    5958kB time=00:00:58.00 bitrate=
841.4kbits/s
frame= 1393 fps= 50 q=-1.0 Lsize=    6298kB time=00:00:58.09 bitrate=
888.1kbits/s
video:5562kB audio:679kB subtitle:0 global headers:0kB muxing overhead 0.907448%
[libx264 @ 0xe3c8e0] frame I:24    Avg QP:16.84  size: 35683
[libx264 @ 0xe3c8e0] frame P:459   Avg QP:19.91  size:  8289
[libx264 @ 0xe3c8e0] frame B:910   Avg QP:22.39  size:  1136
[libx264 @ 0xe3c8e0] consecutive B-frames:  2.2%  4.3% 83.1% 10.3%
[libx264 @ 0xe3c8e0] mb I  I16..4: 18.6% 15.6% 65.8%
[libx264 @ 0xe3c8e0] mb P  I16..4:  3.1%  1.3%  0.1%  P16..4: 47.7%
20.8% 14.3%  0.0%  0.0%    skip:12.7%
[libx264 @ 0xe3c8e0] mb B  I16..4:  0.2%  0.0%  0.0%  B16..8: 13.9%
4.3%  0.7%  direct: 7.8%  skip:73.2%  L0:31.0% L1:42.3% BI:26.7%
[libx264 @ 0xe3c8e0] final ratefactor: 19.04
[libx264 @ 0xe3c8e0] 8x8 transform intra:21.4% inter:26.9%
[libx264 @ 0xe3c8e0] coded y,uvDC,uvAC intra: 56.8% 86.1% 55.7% inter:
17.5% 26.9% 3.2%
[libx264 @ 0xe3c8e0] i16 v,h,dc,p: 45% 20% 28%  7%
[libx264 @ 0xe3c8e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 15% 36%  3%
5%  5%  5%  3%  5%
[libx264 @ 0xe3c8e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 22% 10%  5%
7%  8%  8%  6%  8%
[libx264 @ 0xe3c8e0] i8c dc,h,v,p: 52% 20% 22%  7%
[libx264 @ 0xe3c8e0] Weighted P-Frames: Y:2.8% UV:0.0%
[libx264 @ 0xe3c8e0] ref P L0: 50.0%  9.0% 29.8% 11.1%  0.1%
[libx264 @ 0xe3c8e0] ref B L0: 66.6% 28.7%  4.7%
[libx264 @ 0xe3c8e0] ref B L1: 83.8% 16.2%
[libx264 @ 0xe3c8e0] kb/s:784.93

Thank you for any direction on where to go from here.

David Hahn


More information about the ffmpeg-user mailing list