Log in

View Full Version : play x265 on Android smartphone


yup
10th March 2016, 09:57
Hi all!

9 month before I am encoding some footage using x265 (1.6 version) with slow preset, after muxing using mkverge, resulting file play without problem on my smartphone Sony Z3 compact (using Video, VLC and MX player with HW support).
Recently I am try reencoded the same footage using last version (1.9+54-291beccb6760:[Windows][GCC 5.3.0][64 bit] 8bit) also with low preset and the same muxing.
Now I can play new file only using MX Player using software report (Video do not open file, VLC show a lot of block, I think after intra frame).
I try find difference

new lookahead-slices=4
old lookahead-slices=0

new ref=4
old ref=3

Please explain me reason non compatibility.
File size decreased.

yup.

littlepox
10th March 2016, 10:48
ref=3

Ever dating back to AVC era, this is the parameter that mainly restrict playback compatibility. For example, Samsung Galaxy S4 cannot play AVC videos with ref>10.
Your increasing ref to 4 must have just exceeded the upper-limit of your device, so you can set --ref 3 to get it back.

StainlessS
10th March 2016, 17:12
Please explain me reason non compatibility.
File size decreased.

Smaller size but greater complexity and clock cycles to decompress.

yup
10th March 2016, 18:19
littlepox!

I am try decrease ref to 3 without success.
Full command line
old
Writing library : x265 1.6+298-4a7176bab742:[Windows][ICC 1400][64 bit]
Encoding settings : wpp / ctu=64 / min-cu-size=8 / max-tu-size=32 / tu-intra-depth=1 / tu-inter-depth=1 / me=3 / subme=3 / merange=57 / rect / no-amp / max-merge=3 / temporal-mvp / no-early-skip / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / no-fast-intra / open-gop / no-temporal-layers / interlace=0 / keyint=500 / min-keyint=50 / scenecut=40 / rc-lookahead=25 / lookahead-slices=0 / bframes=10 / bframe-bias=0 / b-adapt=2 / ref=3 / weightp / no-weightb / aq-mode=1 / aq-strength=1.00 / cbqpoffs=0 / crqpoffs=0 / rd=4 / psy-rd=0.30 / rdoq-level=2 / psy-rdoq=1.00 / signhide / deblock / sao / no-sao-non-deblock / b-pyramid / cutree / rc=crf / crf=28.0 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / ipratio=1.40 / pbratio=1.30

new
Writing library : x265 1.9+54-291beccb6760:[Windows][GCC 5.3.0][64 bit] 8bit
Encoding settings : wpp / ctu=64 / min-cu-size=8 / max-tu-size=32 / tu-intra-depth=1 / tu-inter-depth=1 / me=3 / subme=3 / merange=57 / rect / no-amp / max-merge=3 / temporal-mvp / no-early-skip / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / no-fast-intra / open-gop / no-temporal-layers / interlace=0 / keyint=500 / min-keyint=50 / scenecut=40 / rc-lookahead=25 / lookahead-slices=4 / bframes=10 / bframe-bias=0 / b-adapt=2 / ref=4 / limit-refs=3 / limit-modes / weightp / no-weightb / aq-mode=1 / qg-size=32 / aq-strength=1.00 / cbqpoffs=0 / crqpoffs=0 / rd=4 / psy-rd=2.00 / rdoq-level=2 / psy-rdoq=1.00 / no-rd-refine / signhide / deblock / sao / no-sao-non-deblock / b-pyramid / cutree / no-intra-refresh / rc=crf / crf=28.0 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / ipratio=1.40 / pbratio=1.30

StainlessS
May be developer introduce some noncompliance?
Video with old version (1.6) work properly.

yup.

benwaggoner
11th March 2016, 17:50
Or your file is coming out different due to more advanced settings. For example, maybe you're getting more B-frames because of better lookahead or something. Overall, I'd expect 1.9 to be a more compatible than 1.6 was, and I certainly don't know of any regressions.

The only differences I see that would actually change bitstream syntax are the different ref count and the use of adaptive quantization.

Also, is MKV a first-class file format in Android? I'd start with .mp4 as being the most universally supported to make sure it's a bitstream issue and not a container issue.

Also, does the file play correctly in VLC on PC?

yup
14th March 2016, 12:07
benwaggoner!

mkv play on PC in VLC without problem.
After remuxing in mp4 now all work on phone (I am changing audio track from opus to aac), thanks for tip.
How I can use opus audio track with HEVC on phone?

yup.

benwaggoner
14th March 2016, 16:54
benwaggoner!
mkv play on PC in VLC without problem.
After remuxing in mp4 now all work on phone (I am changing audio track from opus to aac), thanks for tip.
How I can use opus audio track with HEVC on phone?

I'd use AAC for maximum compatibility with phone playback and in .mp4 files.

yup
14th March 2016, 18:07
benwaggoner!

Only one problem, do not work fast forward and fast backward in mp4 container (internal application Video).
VLC show picture with a lot off block.
MX Player work in sowtware and hardware mode, fast forward and fast backward work only in software mode.
Will be waiting update to Android 6.

yup.

benwaggoner
15th March 2016, 20:00
benwaggoner!

Only one problem, do not work fast forward and fast backward in mp4 container (internal application Video).
VLC show picture with a lot off block.
MX Player work in sowtware and hardware mode, fast forward and fast backward work only in software mode.
Will be waiting update to Android 6.

yup.
Try using --no-open-gop and perhaps a lower --keyint. Both generally improve random access, particularly with less mature decoders. Having a high number of B-frames also can help.

yup
12th April 2016, 13:19
After my smartphone update up to Android 6.0 Marshmallow and MX Player to 1.8.3 (ARMv7 NEON) mkv files play without problem with HW+ support (fast forward and backward smoothly with the same source).
VLC work like in previous Android.
yup.