[Media Flag] 5.1AC3 in m4v shows as 2.0AC3
#1
I used handbrake to encode my tv recordings as h264/m4v files.
5.1 tracks are set to AC3 passthru + one additional AAC 2.0 track.

On xbmc playback, the AC3 track is working and my receiver delivers 5.1 sound. Only the shown media flag is wrong.
If i encode the same source as mkv with the same 2 audio tracks, the media flag shows DD 5.1

is this a problem of ffmpeg/mplayer?
these 2 lines from the xbmc-debug log make me wonder (line 409-410)

INFO: ffmpeg[13F8]: Stream #0.1(deu): Audio: ac3, 48000 Hz, 2 channels, s16, 384 kb/s
INFO: ffmpeg[13F8]: Stream #0.2(deu): Audio: aac, 48000 Hz, stereo, s16, 289 kb/s

later on line 445
NOTICE: Creating audio device with codec id: 86020, channels: 6, sample rate: 48000



Media Info Output of m4v Container
http://pastebin.ubuntu.com/496502/

Media Info Output of mkv Container
http://pastebin.ubuntu.com/496505/

XBMC Debug Log when playing m4v:
http://pastebin.ubuntu.com/496512/


kind regards,
dreamkp

-----------------------------------
XBMC Versions tested:
Dharma Beta2 and SVN 33961, but happens on older versions as well

tested OS: XP/SP2 32bit and Win7 64bit
win7x64, eden pvr / frodo 12.1, mysql, aeon mq4, boblight
Reply
#2
I'm having similar problems (but not exactly the same).

I have 2 sets of Video files, both ripped from my DVD collection.
  1. Set 1 - I used ffmpegX to rip these. They are AVI's (ffmpeg codec) with passthrough AC3 audio track.
  2. Set 2 - I used HandBrake (0.9.4 64-bit) to rip these. They are M4V's (ffmpeg codec) with passthrough AC3 audio track.

Previous setup was an XBox.
Both sets of files displayed 5.1 digital audio on XBMC and sent 5.1 over the SPDIF from the XBox and decoded properly with my receiver.

Current setup is an Eee Box EB1012 running XBMC 9.11 r26018 on Ubuntu 10.04
With this setup, only Set 1, the AVI's display digital 5.1 in XBMC and send 5.1 over the SPDIF.
Set 2, the M4V files, display digital stereo in XBMC and send 2.0 over the SPDIF.

I have verified with Media Info that both sets of files do, in fact, have 6 channel audio. However, there are some differences.
AVI files: Bit Rate=448 Kbps
M4V files: Bit Rate=384 Kbps

Also, the files I record from MythTV no longer display/play 5.1 sound. They are MPG files with AC3 passthrough and also show to have a Bit Rate of 384 Kbps. Perhaps the Bit Rate is the key here, I don't know.

Can anyone think of a reason the M4V and MPG files would play 5.1 on the XBox but only 2.0 on the Linux system?

Thanks
Reply
#3
An update on this.

I re-encoded one of my .M4V files using .MKV format (still using ffmpeg codec) and just passed the AC3 stream in that file through to the new .MKV file.
The existing .M4V file is one that has 5.1 AC3 audio, but displays & plays in XBMC as 2.0.

The resulting .MKV file displays and plays the 5.1 AC3 audio just fine in XBMC.

Interesting observation. When looking at the .M4V file with MediaInfo, in the audio stream it says:
Codec (FourCC): ac-3

On the re-encoded .MKV file it says:
Codec (FourCC): A_AC3

I have no idea what this means but all the other audio stream parameters are identical. Maybe that's a clue.

Any ideas?
Reply
#4
Yes it's a clue. Please post a small sample that shows the problem.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
I'm seeing this same exact behavior as well using XBMC Dharma and M4V encodes. See my information in post:

http://forum.xbmc.org/showthread.php?tid=86426

I also have mediainfo outputs and a posted M4V file that has the problem.

I have yet to find a solution to this issue short of re-encoding all my movies (or converting them) to MKV format.

Also, this problem is obviously not limited to platform, and appears to appear regardless of hardware being used since dreamkp is using Windows hardware, and I'm using Apple hardware.
MacBook Pro 13", XBMC v12.1
AppleTV, OpenELEC v3.0.1
AppleTV2, Latest iOS
AppleTV3, Latest iOS
Reply
#6
Another odd media flag behavior I also see between M4V and MKV files is the video type for M4V shows as "WMV HD" (incorrect) but the MKV file shows "H.264" (correct). This also appears like a difference in the Codec ID in the files. Mediainfo shows:

M4V video track:
Code:
Codec ID                         : avc1

MKV video track:
Code:
Codec ID                         : V_MPEG4/ISO/AVC

I really suspect that XBMC's parsing of the codec information is not as robust as it could be someplace.
MacBook Pro 13", XBMC v12.1
AppleTV, OpenELEC v3.0.1
AppleTV2, Latest iOS
AppleTV3, Latest iOS
Reply
#7
I tried your sample, the information is misdetected in ffmpeg. Please report it to ffmpeg, there isn't much we can do here.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#8
CrystalP Wrote:I tried your sample, the information is misdetected in ffmpeg. Please report it to ffmpeg, there isn't much we can do here.

Thanks for looking at this! Can you tell me what command-line options you used to verify that it was reading it incorrectly so I can provide the necessary information to the ffmpeg group to get this fixed?
MacBook Pro 13", XBMC v12.1
AppleTV, OpenELEC v3.0.1
AppleTV2, Latest iOS
AppleTV3, Latest iOS
Reply
#9
ffmpeg is a library, and the detection happens in av_find_stream_info(). So no command line.
I don't know what the ffmpeg team expects in a bug report.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#10
CrystalP Wrote:ffmpeg is a library, and the detection happens in av_find_stream_info(). So no command line.
I don't know what the ffmpeg team expects in a bug report.

I understand that the library version of ffmpeg is being used inside XBMC, I was hoping for some command-line equivalent I could run to see the incorrect recognition.

Can you give me any specifics on what you see as being recognized wrong by ffmpeg? Maybe a C function to demonstrate the bad return value? I'm not sure what exactly it's incorrectly detecting, so I think I'll need that to report to ffmpeg.
MacBook Pro 13", XBMC v12.1
AppleTV, OpenELEC v3.0.1
AppleTV2, Latest iOS
AppleTV3, Latest iOS
Reply
#11
It's detecting an AC3 5.1 soundtrack as AC3 2.0, that's the problem you opened this thread for, isn't it?

There might be an ffmpeg.exe (or is it ffplay?) that could be used to dump file info, don't really know, never played with that.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#12
i was not able to find a direct fix for this issue, but in my case i found a workaround at last

a few months ago i switched to xbmc<->mysql setup
that introduced the possibility to modify values inside the db

i wrote myself some scripts which check the audio codec of my m4v/mp4 files lying on my nas

if 6ch ac3 is found, the script updates the audio channel field inside the xbmc db and xbmc instantly shows the correct media flag

so if you have the same problem and a similar setup, maybe this info can assist you in building your own workaround

kind regards,
dreamkp
win7x64, eden pvr / frodo 12.1, mysql, aeon mq4, boblight
Reply

Logout Mark Read Team Forum Stats Members Help
[Media Flag] 5.1AC3 in m4v shows as 2.0AC30