Kodi Community Forum

Full Version: nexus 7 + rc3 + ATSC recordings?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm something of a newb with xbmc (but have a general sysadmin / *nix kernel background, so I'm somewhat technical). I'm a current SageTV user, but it is a dying ecosystem. My eventual goal is to replace my SageTV extender with a small Android box running Xbmc. To get used to xbmc on android, I've been playing with it on my wife's Nexus 7. I mostly care about playing back US "HD" over the air recordings.

Last night, I installed xbmc-12.0-Frodo_rc3-armeabi-v7a.apk on a Nexus 7 running android 4.2. I was able to access my linux SageTV server via samba, and play some of the recordings. Transcoded (mpeg4 / AVC L3.0, AAC audio, 960x540 29.97fps, 2.5Mb/s) kids recordings seemed to work fine. Mpeg2 was a mixed bag. My 720p recordings (Mpeg-PS, mpeg2 720p/59.94, 14Mb/s) sort of played, but my terrible wireless network could not keep up, so there were repeated buffering pauses. (I've been mostly a wired guy, and have just ordered a new router to hopefully solve the wireless issue.) However, the most troubling issue I had was with 1080i (Mpeg-PS, Mpeg2 720p/29.97, 12Mb/s). Xbmc would play the audio, but not the video. Is this a known issue or limit with the Nexus 7? Am I even running the best build for the Nexus 7?

Thanks,

Drew
(2013-01-15, 18:40)davilla Wrote: [ -> ]http://forum.xbmc.org/showthread.php?tid=152005

Sweet, That sounds like what I spent 2 hours looking for last night & never found Smile

BTW, I'm a big fan of your work on the CrystalHD project. Nice job with the MacOSX / Linux shims. I've done closed-source drivers that work across BSD/OSX/Solaris/Linux myself..

Thanks,

Drew
So it seems like there are a few issues. At least on the nexus7 with that stagefright build, it looks like MPEG2 is not accelerated. Some 1080i files "work", but the CPU is maxed out on a few cores, and the playback is jerky. It is not so bad with MPEG2 720p, but still noticeably jerky, with CPU cores maxed. Videos that I've transcoded to H264 play much more smoothly.

The problem with the original file remains. It appears the xbmc cannot parse out the video portion of the file. I've left a log from xbmc at http://xbmclogs.com/show.php?id=28442. Mediainfo for the problem file shows:
Code:
drogon% mediainfo /video/tv/BurnNotice-S06E13-OvertheLine-3617156-0.mpg
General
Complete name                            : /video/tv/BurnNotice-S06E13-OvertheLine-3617156-0.mpg
Format                                   : MPEG-PS
File size                                : 5.05 GiB
Duration                                 : 1h 0mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 11.8 Mbps

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@High
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Duration                                 : 1h 0mn
Bit rate mode                            : Variable
Maximum bit rate                         : 20.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 29.970 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Compression mode                         : Lossy

Audio #1
ID                                       : 128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Compression mode                         : Lossy

Audio #2
ID                                       : 129 (0x81)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Compression mode                         : Lossy

Audio #3
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 1h 0mn
Bit rate mode                            : Constant
Bit rate                                 : 384 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -428ms
Stream size                              : 167 MiB (3%)

Audio #4
ID                                       : 189 (0xBD)-129 (0x81)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 1h 0mn
Bit rate mode                            : Constant
Bit rate                                 : 384 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -428ms
Stream size                              : 167 MiB (3%)

Text #1
ID                                       : 224 (0xE0)-CC1
Format                                   : EIA-608
Muxing mode                              : A/53 / DTVCC Transport
Muxing mode, more info                   : Muxed in Video #1
Bit rate mode                            : Constant
Stream size                              : 0.00 Byte (0%)

Text #2
ID                                       : 224 (0xE0)-1
Format                                   : EIA-708
Muxing mode                              : A/53 / DTVCC Transport
Muxing mode, more info                   : Muxed in Video #1
Bit rate mode                            : Constant
Stream size                              : 0.00 Byte (0%)

FWIW, I've seen similar problems with a WDTV Live Plus. The pattern seems to be that some devices/programs hate recordings done from QAM by my HDHR, but like recordings done OTA by my DVB devices..

Drew
(2013-01-16, 16:45)drewg Wrote: [ -> ]The problem with the original file remains. It appears the xbmc cannot parse out the video portion of the file.

This turns out to be a caused by SageTV sometimes producing files that ffmpeg cannot parse. I've opened a ticket with ffmpeg. If I fix ffmpeg to parse the file, then xbmc can play it. Sigh. Here is the patch that I sent to ffmpeg..

Code:
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index cc2fe7f..d4b31df 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -416,7 +416,8 @@ static int mpegps_read_packet(AVFormatContext *s,
     }

     es_type = m->psm_es_type[startcode & 0xff];
-    if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA){
+    if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA &&
+       es_type != STREAM_TYPE_BUGGY_SAGETV){
         if(es_type == STREAM_TYPE_VIDEO_MPEG1){
             codec_id = AV_CODEC_ID_MPEG2VIDEO;
             type = AVMEDIA_TYPE_VIDEO;
diff --git a/libavformat/mpeg.h b/libavformat/mpeg.h
index ca019c9..7b4951e 100644
--- a/libavformat/mpeg.h
+++ b/libavformat/mpeg.h
@@ -55,6 +55,7 @@
#define STREAM_TYPE_VIDEO_MPEG4     0x10
#define STREAM_TYPE_VIDEO_H264      0x1b

+#define STREAM_TYPE_BUGGY_SAGETV    0x80
#define STREAM_TYPE_AUDIO_AC3       0x81
#define STREAM_TYPE_AUDIO_DTS       0x8a

Drew
hahahah STREAM_TYPE_BUGGY_SAGETV
(2013-01-16, 21:32)davilla Wrote: [ -> ]hahahah STREAM_TYPE_BUGGY_SAGETV

Assuming it gets fixed in ffmpeg, what is the procedure to get the patch into xbmc? I'm fine with building PC xbmc, but cross-building for android with a custom patch seems rather daunting..

Thanks,

Drew