Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Registered User
Join Date: Oct 2014
Posts: 7
|
How should I mux a mkv file so that sound could be played on Android?
Hi,
I have a H.264 video source and a PCM audio source. I want to mux them into a mkv file by myself so that it can be played properly on Android. But, the mkv file generated can be played well on Windows (either with WMP or with VLC) and Ubuntu (either with the default player or with VLC) only. There is no sound when playing with the default player on Android but it is fine when playing with MX Player. Also, if I mux the mkv file with some existing software like MKVToolNix with the same source, the generated mkv file could be played well on android (even with the default player). So, I believe that it is the mkv format's problem. I somehow mux them so that the android's default player can't analyze the audio frames. How can I fix the problem? Thanks! (Edit: Some more information provided on #3.) PS. Am I posting on the right forum? Last edited by Hello, World; 27th January 2015 at 02:43. Reason: additional info |
![]() |
![]() |
![]() |
#3 | Link | |
Registered User
Join Date: Oct 2014
Posts: 7
|
Quote:
My generated mkv files have a structure very similar to a normal mkv file - a EBML & a Segment. For the segment, there are a SeekHead, a Tags, a Info, a Tracks, some Cluster blocks and a CUES. The difference to a normal mkv file may be in cluster. For some reasons, I wanna pack 1 video frame and 1 audio block in a cluster. The mkv files are in 20fps with a 16k sampling rate PCM. So, in one cluster, there are a video frame (i.e. 1 NALU for non-ref frame) and a audio block with 800 samples. Simple Block Header for the video block and the audio block in a cluster (suppose the Timecode is 0): video: 0x81 0x00 0x00 0x80 audio: 0x82 0x00 0x00 0x84 0x0F (0x0F means 16 frames) I am sure that it's not the offset problem and those mkv analyzer, like Elecard, can analyze my videos. Thanks! Last edited by Hello, World; 27th January 2015 at 02:59. |
|
![]() |
![]() |
![]() |
#6 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,373
|
I have noticed PCM is not well supported on mobile devices. According to developer.android.com PCM is only supported in WAV.
Except mkvmerge can generate mkvs with PCM that play well on Android. ![]() |
![]() |
![]() |
![]() |
#7 | Link | |
Registered User
Join Date: Oct 2014
Posts: 7
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 | Link |
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,768
|
One should not look for a reason, in particular when the things cannot be changed. Surely one may complain, scream, cry, but eg Microsoft will do still how she likes.
I assume the reason is that WAV (PCM) is too big to be handled on portables, and the quality difference (inaudible) will not justify it. There can also be some "conspiracy theories" involved ... ![]()
__________________
Born in the USB (not USA) |
![]() |
![]() |
![]() |
#9 | Link | |
Registered User
Join Date: Oct 2014
Posts: 7
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 | Link | |
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,768
|
Quote:
Remember that the same chaos was also last decade and before on PC, one had to find various "codec packs" to make an AVI play on their PC.
__________________
Born in the USB (not USA) |
|
![]() |
![]() |
![]() |
#11 | Link | |
Registered User
Join Date: Oct 2014
Posts: 7
|
Quote:
I am talking about why mkvmerge can generate mkvs with PCM playing well on Andriod but the mkv generated by myself cannot play well on the SAME phone(s). I believe that this is not because of the build / the codec / anything of the os. Last edited by Hello, World; 2nd February 2015 at 10:58. |
|
![]() |
![]() |
![]() |
#15 | Link | |
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,768
|
Quote:
You should post a sample of your MKV so that able people may find the issue.
__________________
Born in the USB (not USA) |
|
![]() |
![]() |
![]() |
Tags |
android, audio, mkv, pcm |
Thread Tools | Search this Thread |
Display Modes | |
|
|