Leite-sama / lavfilters

Automatically exported from code.google.com/p/lavfilters
GNU General Public License v2.0
0 stars 0 forks source link

Lav Splitter doesn't do well with MP4 contains dual audio track #309

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Some MP4 files (especially japanese anime) have 2 audio tracks.Parts of them 
1st track is BGM on, 2nd track is BGM off. in the others 1st track is normal 
audio track,and 2nd is commendatory track.

The Lav splitter sometimes make media player or transcoder to recognize audio 
track 2 (track #3) as the primary audio track while playback or transcoding.

I'm using K-Lite and the team tells me that
"LAV Splitter selects the audio track with best quality, based on the format 
and number of channels. There is currently no option to simply select the first 
one."

I can manually change the audio track in MPC to avoid the issue during 
playback.But this is annoying while I transcode videos for my old PSP device.

Hope for the fix

Original issue reported on code.google.com by kagami0...@hotmail.com on 8 Jan 2013 at 11:47

GoogleCodeExporter commented 9 years ago
Maybe that's the problem

In the same bitrate, the 2nd Commendatory track or BGM-off track has better 
quality than the Primary track.Lav splitter sometimes picks them automatically 
rather than the 1st audio track.

Please add a setting to force pick the 1st track.

Thanks

Original comment by kagami0...@hotmail.com on 9 Jan 2013 at 3:09

GoogleCodeExporter commented 9 years ago
Such a setting doesn't make much sense, its very specific to your specific 
problem, and doesn't offer a very generic choice.

Original comment by h.lepp...@gmail.com on 9 Jan 2013 at 3:54

GoogleCodeExporter commented 9 years ago
If a MP4 have 2 audio track in same bitrate, then Lav may sometimes choose the 
2nd audio track rather than the 1st audio track.And I don't think this should 
be a specific problem.It occurs in most time.

Many people who watch anime may catch up with this issue.The first time I met 
this problem,I'd done a lot of searches in google,and tried many ways I found 
to solve.I could do nothing but install Haali Media Splitter.The people who are 
using Lav splitter do met the same problem.

The Japanese anime don't have 7.x channel,nor 5.x channel in the 1st track.They 
only have 2 channel as well as the 2nd track.You guys can simply try playback 
with some anime which contain dual audio track in the same bitrate,and then say 
this again,"Well,that's our specific problem,we don't need to fix this".

I'd like to use Lav splitter but you guys just ask me not to bother you add 
this option.Then I have no choice but get Haali Media Splitter installed.

Please do me a favor,the Option is really necessary.

Original comment by kagami0...@hotmail.com on 10 Jan 2013 at 3:31

GoogleCodeExporter commented 9 years ago
http://potplayer.5d6d.net/thread-7311-1-1.html (chinese site)
用LAV分离某些多音轨的MP4时,播放的音轨出现错误。比如说��
�面地址里的第2、3、4、6、8、10、12话用LAV分离,默认播放的�
��评论音轨,用haali或av没有这个问题
(many people discuss about this problem,their way to solve is to remux the 
video)

http://thanatos.polyzone.org/2011/03/18/k-lite/ (taiwaneese blog)
K-Lite Mega Codec Pack 安裝 (2012-03-12 更新)
雖然我的確很想說:既然來到了 10-bit 
編碼技術的現在,我們將 MKV 和 MPEG-4 分離器也改用 LAV 吧。
但因為 THORA 及 Coalgirls 這兩家壓製的動畫會外掛 OP/ED,以及 
LAV 分離器開 MP4 
內的音軌和往常慣例不同,會去選順位最後的開...
所以這邊暫時先建議別照圖上這樣設定,請你選回 Haali。
(Anime muxed by Team thora and Team coalgirls have to use Haali because of this 
problem)

http://bbs.sumisora.org/read.php?tid=11011293 (chinese site)
关于总是评论音轨的问题我没遇到过,不过你可以尝试设置��
�下优先音轨。
先把lav分离器的设置里audio那一栏填入jpn
(Sometimes your have audio priority set to jpn)

http://forum.doom9.org/showthread.php?p=1426024#post1426024
I only tested it for mkv with h264 video and multiple AAC audio tracks and 
subtitle tracks. Everything seems to work fine, except:
I found 2 problems
- the track title is not displayed anywhere (even though this filter shows much 
more info than any other)
- in mkv files, the default track flag is not respected
And a request:
- can you please implement stream selection order priority by language list?

Thank you,
PDan 
(-----but in japanese anime,both tracks are jpn,selection by language doesn't 
make sense)

There are many posts of evidence out of there.Sorry that mine are mainly in 
chinese(because I'm a chinese).Please,dev team,add a option to force the 1st 
track.it will help many people who watches anime.

Original comment by kagami0...@hotmail.com on 10 Jan 2013 at 4:02

GoogleCodeExporter commented 9 years ago
http://anago.2ch.net/test/read.cgi/software/1318122810/ (japanese chat board)
104 :名無しさん@お腹いっぱい。:2011/12/01(木) 18:56:49.10 
ID:3lpEAvX80
    誘導されて来ました。今気付いたんだけどmpcでLAV Splitter使って
    mp4再生する時にaudio1、2、ってあったら順番関係無くビットレート
    高いほうが優先されて再生されるんだけど、これをaudio1を優先
    するようにできないかな?言語で優先させる設定はあったんだけど
    全部日本語の2ch、5.1ch、コメンタリーとかあると微妙に困る。
    ってスレざっとみたら音声の問題とか書いてあるのがこれかな… 
107 :名無しさん@お腹いっぱい。:2011/12/01(木) 21:26:15.43 
ID:hOFlguU80
    ソース見てみたけど、バグというこれがより仕様のようだね。

    一応↓で、強制的に先頭のaudioストリームが選らばれるようにはなる。
    該当箇所は
    const CBaseDemuxer::stream *CLAVFDemuxer::SelectAudioStream(std::list<std::string> prefLanguages) {} の中

    LAVFilters-0.42.zip(32-bit)
    >fc /b mod\LAVSplitter.ax Orig\LAVSplitter.ax
    0001BF6C: 72 <- 75

108 :名無しさん@お腹いっぱい。:2011/12/01(木) 21:39:21.38 
ID:Tzt3u3gU0
    こんなとこでgdgd言ってないで要望出してこいよ 
(many people have the same problem.someone get one way to force the first track 
in 0.42)

http://www.cccp-project.net/forums/index.php?topic=5855.15
Thanks a lot for the update.

But I would suggest to keep using haali for mp4 files, as it's the only one 
that shows detailed information (track name, language, etc) in the systray.
LAV Splitter doesn't show anything and also doesn't make it easy to switch 
language for dual audio mp4 (like share raws who can have a commentary track 
also), you've to right click in mpc-hc go to filters then select the desired 
audio in there.

the problem happened as Lav is spreaded into the public in 2011.And in 
2013,many people still have to use Haali for Anime.Sorry for the triple 
posting,but PLEASE add the option.

Original comment by kagami0...@hotmail.com on 10 Jan 2013 at 4:28

GoogleCodeExporter commented 9 years ago
All the English posts you quoted are up to over 2 years old and no longer apply 
(and i don't understand the chinese or japanese)

I could probably remove the bitrate from the stream selection, its unreliable 
in many cases anyway, which means if the streams are otherwise the same (same 
language, same number of channels, same codec), it would pick the first.

Original comment by h.lepp...@gmail.com on 10 Jan 2013 at 7:09

GoogleCodeExporter commented 9 years ago
Sorry man for quoting old posts.But the problem had been there,and is still 
there.and I wonder if the change will be applied when the 1st and 2nd audio 
both are in the same bitrate??

PS:There should be lots of people who watch anime in the world.As you have 
said,not all of them met watches BDRIP,nor all the TEAMs' video have the 
problem.People like wait for someone to post or the dev team to fix,rather than 
come here and fire an issue.Just as the japanese chat board said 
こんなとこでgdgd言ってないで要望出してこいよ In 
english which means "Don't you guys bother complain it here,just go and fire an 
issue to the dev").

I've tried many ways except remux the video,and the only solve was to install 
Haali Media Splitter which had been out of maintenance since 2011.Lav provides 
the whole solution to the video playback,and I'd like to stick on Lav rather 
than have another splitter installed just for anime videos.It's annoying change 
settings to Haali when I want to watch anime,then change back to LAV when I 
watch movies.

Anyway,thanks your guys,really much thanks.

Original comment by kagami0...@hotmail.com on 10 Jan 2013 at 7:52

GoogleCodeExporter commented 9 years ago
I've tried the video mentioned in 
http://potplayer.5d6d.net/thread-7311-1-1.html and I have taken some pics.

It seems they are in the same bitrate in ABR mode,but the 1st have larger 
maximum bitrate than the 2nd. Lav still choose the 2nd track as default and I 
don't know if this is the issue comes with bitrate while audio selection.

PS:You can download and try it yourself it is magnet link so you have to use 
utorrent.
magnet:?xt=urn:btih:948966a0e8a78f952354c55e5deca8c871180849&tr.0=http://tracker
.ktxp.com:6868/announce&tr.1=udp://tracker.ktxp.com:6868/announce

The file name is [CASO][A-Channal][02][BDRIP][1920x1080][X264xAAC][A4D07E42].mp4

Original comment by kagami0...@hotmail.com on 10 Jan 2013 at 8:36

Attachments:

GoogleCodeExporter commented 9 years ago
i'll try to get the file and see what can be done to fix it.

Original comment by h.lepp...@gmail.com on 10 Jan 2013 at 9:06

GoogleCodeExporter commented 9 years ago
[CASO][A-Channal][02][BDRIP][1920x1080][X264xAAC][A4D07E42].mp4
[CASO][A-Channal][03][BDRIP][1920x1080][X264xAAC][2CA69A48].mp4
[CASO][A-Channal][04][BDRIP][1920x1080][X264xAAC][102D712D].mp4
[CASO][A-Channal][06][BDRIP][1920x1080][X264xAAC][9D06AFFD].mp4
[CASO][A-Channal][08][BDRIP][1920x1080][X264xAAC][C757685D].mp4
[CASO][A-Channal][10][BDRIP][1920x1080][X264xAAC][F845D611].mp4
[CASO][A-Channal][12][BDRIP][1920x1080][X264xAAC][EDB36364].mp4

All these have the same problem.Lav automatically select the 2nd track as 
default.I've uploaded 
[CASO][A-Channal][02][BDRIP][1920x1080][X264xAAC][A4D07E42].mp4 to 
ryushare.com.I hope it will help.

http://ryushare.com/b014036cdbf/test.part1.rar
http://ryushare.com/dbbbe257628/test.part2.rar

Sorry for the long waiting,My broadband is limited to 1 Mbps upload.And it's 
hard to find a hosting service that I can upload.I don't know if the upload 
have been successful.Every archive have 5% recovery record.If you can't 
decompress,please try to recover it in WinRAR.

Original comment by kagami0...@hotmail.com on 10 Jan 2013 at 10:31

GoogleCodeExporter commented 9 years ago
This issue was updated by revision b0195aaba7e8.

Original comment by h.lepp...@gmail.com on 11 Jan 2013 at 4:13

GoogleCodeExporter commented 9 years ago
This issue was closed by revision b89d2bb35a11.

Original comment by h.lepp...@gmail.com on 11 Jan 2013 at 4:33

GoogleCodeExporter commented 9 years ago
I changed two things:

- Bitrate is no longer used to select the track. This already fixes the file 
you uploaded.
- If some other files still cause issues, there is an option now to deactive 
quality-based audio stream selection.

Original comment by h.lepp...@gmail.com on 11 Jan 2013 at 4:36