运行设备:易视腾机顶盒
测试软件:Exoplayer 官方Demo https://github.com/google/ExoPlayer
视频文件:局域网HTTP服务中的M3U8文件,切片前视频属性如下:一般关注的主要信息为 Format : HEVC,Bit rate : 37.6 Mb/s
General
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/mp41)
File size : 2.41 GiB
Duration : 9 min 9 s
Overall bit rate mode : Variable
Overall bit rate : 37.7 Mb/s
Writing application : Lavf58.35.101
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L5@High
Codec ID : hev1
Codec ID/Info : High Efficiency Video Coding
Duration : 9 min 9 s
Bit rate : 37.6 Mb/s
Width : 3 840 pixels
Height : 1 920 pixels
Display aspect ratio : 2.000
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.204
Stream size : 2.40 GiB (100%)
Writing library : x265 3.2+15-04db2bfee5d6:[Windows][GCC 9.2.1][64 bit] 8bit+10bit
Encoding settings : cpuid=1111039 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x1920 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=8 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=1 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / selective-sao=4 / early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=cbr / bitrate=40000 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=40000 / vbv-bufsize=60000 / vbv-init=0.9 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qp
Language : English
Color range : Limited
Codec configuration box : hvcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 9 min 9 s
Bit rate mode : Variable
Bit rate : 126 kb/s
Maximum bit rate : 128 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 8.29 MiB (0%)
Language : English
Default : Yes
Alternate group : 1
报错信息:
05-13 15:10:32.536 4997-4997/com.google.android.exoplayer2.demo E/ViewRootImpl: 20170727 enable acc for view = com.google.android.exoplayer2.demo/com.google.android.exoplayer2.demo.PlayerActivity
05-13 15:10:33.023 4997-5142/com.google.android.exoplayer2.demo E/ACodec: [OMX.hisi.video.decoder.hevc] storeMetaDataInBuffers failed w/ err -2147483648
05-13 15:11:48.196 4997-5137/com.google.android.exoplayer2.demo E/dalvikvm-heap: Out of memory on a 65552-byte allocation.
05-13 15:11:48.199 4997-5137/com.google.android.exoplayer2.demo E/LoadTask: OutOfMemory error loading stream
java.lang.OutOfMemoryError
at com.google.android.exoplayer2.upstream.DefaultAllocator.allocate(DefaultAllocator.java:102)
at com.google.android.exoplayer2.source.SampleDataQueue.preAppend(SampleDataQueue.java:392)
at com.google.android.exoplayer2.source.SampleDataQueue.sampleData(SampleDataQueue.java:199)
at com.google.android.exoplayer2.source.SampleQueue.sampleData(SampleQueue.java:476)
at com.google.android.exoplayer2.extractor.ts.H265Reader.consume(H265Reader.java:121)
at com.google.android.exoplayer2.extractor.ts.PesReader.consume(PesReader.java:136)
at com.google.android.exoplayer2.extractor.ts.TsExtractor.read(TsExtractor.java:338)
at com.google.android.exoplayer2.source.hls.HlsMediaChunk.feedDataToExtractor(HlsMediaChunk.java:376)
at com.google.android.exoplayer2.source.hls.HlsMediaChunk.loadMedia(HlsMediaChunk.java:343)
at com.google.android.exoplayer2.source.hls.HlsMediaChunk.load(HlsMediaChunk.java:314)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:391)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
05-13 15:11:48.247 4997-4997/com.google.android.exoplayer2.demo E/EventLogger: internalError [eventTime=75.71, mediaPos=56.25, window=0, period=0, loadError
com.google.android.exoplayer2.upstream.Loader$UnexpectedLoaderException: Unexpected OutOfMemoryError: null
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:421)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.OutOfMemoryError
at com.google.android.exoplayer2.upstream.DefaultAllocator.allocate(DefaultAllocator.java:102)
at com.google.android.exoplayer2.source.SampleDataQueue.preAppend(SampleDataQueue.java:392)
at com.google.android.exoplayer2.source.SampleDataQueue.sampleData(SampleDataQueue.java:199)
at com.google.android.exoplayer2.source.SampleQueue.sampleData(SampleQueue.java:476)
at com.google.android.exoplayer2.extractor.ts.H265Reader.consume(H265Reader.java:121)
at com.google.android.exoplayer2.extractor.ts.PesReader.consume(PesReader.java:136)
at com.google.android.exoplayer2.extractor.ts.TsExtractor.read(TsExtractor.java:338)
at com.google.android.exoplayer2.source.hls.HlsMediaChunk.feedDataToExtractor(HlsMediaChunk.java:376)
at com.google.android.exoplayer2.source.hls.HlsMediaChunk.loadMedia(HlsMediaChunk.java:343)
at com.google.android.exoplayer2.source.hls.HlsMediaChunk.load(HlsMediaChunk.java:314)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:391)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
]
分析结论:
PS:在开发机顶盒这类设备时,特别要注意技术与硬件的兼容性,因为盒子的设备性能一般都远低于同时期同系统其他设备