1. 測試用視頻:DTS-HDMA的demo視頻轉壓
► 显示剧情透露 MediaInfo
代码: 全选
General
Complete name : D:\Program Files\Media\MeGUI\tools\lsmash\x86\test-rem.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 35.2 MiB
Duration : 21s 140ms
Overall bit rate mode : Variable
Overall bit rate : 14.0 Mbps
Encoded date : UTC 2012-06-24 20:09:50
Tagged date : UTC 2012-06-24 20:09:50
Writing application : qaac 1.38, CoreAudioToolbox 7.9.7.9, Apple Lossless Encoder
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 17s 650ms
Bit rate : 6 000 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 29.970 fps
Minimum frame rate : 29.412 fps
Maximum frame rate : 30.303 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.097
Stream size : 12.0 MiB (34%)
Writing library : x264 core 94 r1583 7608d73
Encoding settings : cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=2 / deadzone=6,4 / fast_pskip=0 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=2pass / mbtree=0 / bitrate=6000 / ratetol=1.0 / qcomp=1.00 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.50
Language : English
Encoded date : UTC 2012-06-24 20:09:50
Tagged date : UTC 2012-06-24 20:09:50
Audio
ID : 2
Format : ALAC
Codec ID : alac
Codec ID/Info : Apple Lossless Format
Duration : 21s 140ms
Duration_LastFrame : -21ms
Bit rate mode : Variable
Bit rate : 9 199 Kbps
Channel(s) : 8 channels
Channel positions : Front: L Lc Rc R, Side: L R, LFE
Sampling rate : 96.0 KHz
Bit depth : 24 bits
Stream size : 23.2 MiB (66%)
Encoded date : UTC 2012-06-24 20:09:50
Tagged date : UTC 2012-06-24 20:09:50
首先看解碼。LAV Filters的解碼核心是ffmpeg,這裡我的patch也只修改了ffmpeg部分,所以只看用這個patch編譯出來的ffmpeg解碼能力:
格式:test_alac-${ENCODER}-dec-${DECODER}.wav
解碼出來的wav,用QuickTime(qaac),refalac和lavf解碼結果是完全一樣的。實際上用foobar2000對alac和用lavf做decoder後的wav做bit comparison的結果也是相同的。本身解碼上沒有問題。
再看播放:
ASIO Renderer:
Reclock(WASAPI):
MPC Renderer(WASAPI):
全都沒有問題(我的聲卡不支持超過2.0ch,走ffdshow的mixer)。
只要能正確處理解碼,audio renderer面對的都是解碼後的PCM(非bitstream的話),所以同樣的解碼器+渲染器組合能處理一個格式就不應該處理不了其他格式,自己設置錯了是自己的事情…
唯一和其他格式不同的是ALAC如果是24bit的話,ffmpeg內部始終pad到32bit。這個在官方版LAV裡就是這樣(拿2.0ch的自己去測去),我只是把處理能力從2.0ch增加到7.1ch,bit depth處理邏輯我沒有也不會去改,因為沒必要,在ffmpeg內部24->32然後LAV裡32->24沒有任何損失,速度差距也幾乎可以忽略不計(兩次都是直接bit shift,而且LAV直接訪問ffmpeg解碼出來的相同內存地址,不會出現ffdshow->renderer那樣數據複製導致的內存帶寬消耗上漲,所以我沒像ffdshow那樣直接修改邏輯),所以沒必要對ALAC加一個workaround。我相信不會有人在使用Kernel Streaming或者ASIO的時候明明聲卡只支持到24bit卻不去掉解碼器裡32bit輸出的支持吧,雖然從你的錯誤報告裡我非常懷疑你的輸出bit depth就是這樣設置的…還有就是ALAC相比於其他lossless解碼速度相當糟糕,HD規格的alac遇到CPU解碼瓶頸也不是沒可能(和其壓縮率相當糟糕、容錯能力一般、編碼速度RP、支持度極低等問題一起在很多年內都阻礙了ALAC的發展,遠不是沒開源這種在APE、TAK裡都存在的問題,所以就算現在開源了以後發展也很難說,等fhg的HD-AAC正式搞出來後說不定就可以淘汰了)…如果是其他WASAPI通用性的問題就更沒啥好說的了…
2. m4a的外掛,在MPC-HC內默認使用的是quicktime,和其他的dshow解碼方式沒有相性,需要將m4a等從quicktime改成directshow。我這裡外掛m4a沒有任何問題。當然m4a的dshow分離器/解碼器也必須是LAV,要是設成了BASS之類不支持multi channel的ALAC的東西就更和LAV沒關係了…
3. bass不僅僅是decoder,它更準確地說是source filter。你讓bass接管的話,從file source到splitter到後面decoder一條龍都會接管,甚至還會影響mpc的v/a sync,所以如果m4a用bass作為source filter的話,絕對不可能在解碼的時候換成其他decoder的,不是詭異,bass就是這樣的東西,如果不理解它的工作方式就不要用它。同樣這也是為什麼我給LAV添加multi channel alac支持的原因。如果僅僅是要在mpc-hc內播放multi-channel的alac的話,直接在設置的formats頁面把包含這個音軌的格式從directshow調整到quicktime然後系統裡安裝好quicktime就行了。如果要走directshow的話,現在有很多directshow的quicktime wrapper,都可以支持把quicktime用在directshow機制裡。問題是不管哪種方式,quicktime都是作為source filter的。前者會接管包括渲染在內的整個播放流程,而後者至少會接管source/splitter/decoder流程。而且與bass這種純音頻的source filter不同的是quicktime連視頻都會接管,而quicktime的視頻解碼器能力太有限了。所以我才會想搞一個僅僅在decoder層接管音頻的解碼器。因此在針對視頻播放的應用裡沒事幹別用bass,LAV除了TAK之外沒有哪個解碼能力不如bass的。你要是用bass去解碼DTS-HD的話連HD部分都不支持。這當然不關LAV的事情。自己系統內的濾鏡優先級不調教好,就不要怪其中某個具體的濾鏡。
嘛…反正怎麼設置導致問題不關我事,愛用就用,不用等官方的請自便…官方要支持,至少要等ffmpeg/libav正式支持,而libav今年GSoC裡做ALAC的學生已經很久沒出現過了,ffmpeg又在等libav,會不會像x264的trellis-me那樣沒人管直接坑掉就不知道了…
つまんねー事聞くなよ!
I, personally, for me, believe (
obviously sometimes) that my
OS choice is right. That's me. I'm not telling you that you should believe it. Learn the facts, and the origins behind the facts, and make up your own damn mind. That's why you have one. (
source)
Follow me:
@06_taro
世界304日——
为纪念伟大的宇宙史上最强压制
304先生,联合国教科文组织决定,将每年的第304天,即平年的10月31日或者闰年的10月30日,定为世界304日。