I am seeing the AVC1 Streams aren’t hardware accelerated when playing this file. Should this work or not? w/o hardware accel this is using ff-h264 and swamps the CPU. sample here
General
Complete name : avc1.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 18.9 MiB
Duration : 2mn 0s
Overall bit rate mode : Variable
Overall bit rate : 1 319 Kbps
Writing application : Lavf53.32.100
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3.1
Format settings, CABAC : No
Format settings, ReFrames : 3 frames
Format settings, GOP : M=1, N=125
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 2mn 0s
Bit rate : 1 232 Kbps
Nominal bit rate : 1 500 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
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.053
Stream size : 17.6 MiB (93%)
Writing library : x264 core 136 r63M 8fcf9de
Encoding settings : cabac=0 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=125 / keyint_min=12 / scenecut=0 / intra_refresh=0 / rc_lookahead=40 / rc=cbr / mbtree=1 / bitrate=1500 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=1500 / vbv_bufsize=3000 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 81.6 Kbps
Maximum bit rate : 128 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 1.17 MiB (6%)
Does that change also apply to the following file, which software decodes on my Vero ?
General
Format : Matroska
Format version : Version 2
File size : 3.02 GiB
Duration : 2h 2mn
Overall bit rate : 3 530 Kbps
Writing application : HandBrake 0.9.9
Writing library : libmkv 0.6.5
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3.1
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : V_MPEG4/ISO/AVC
Duration : 2h 2mn
Bit rate : 3 100 Kbps
Width : 1 280 pixels
Height : 536 pixels
Display aspect ratio : 2.40:1
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.188
Stream size : 2.57 GiB (85%)
Writing library : x264 core 130 r2273 b3065e6
Encoding settings : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=240 / keyint_min=24 / scenecut=0 / intra_refresh=0 / rc_lookahead=0 / rc=abr / mbtree=0 / bitrate=3100 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=14000 / vbv_bufsize=14000 / nal_hrd=none / ip_ratio=1.40 / aq=0
Language : English
Default : Yes
Forced : No
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Color range : Limited
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : A_AC3
Duration : 2h 2mn
Bit rate mode : Constant
Bit rate : 448 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
Stream size : 392 MiB (13%)
Language : English
Default : Yes
Forced : No
Menu
00:00:00.000 : Chapter 1
00:03:35.131 : Chapter 2
00:06:58.543 : Chapter 3
00:10:56.697 : Chapter 4
00:16:00.709 : Chapter 5
00:20:51.708 : Chapter 6
00:25:05.962 : Chapter 7
00:29:24.345 : Chapter 8
00:34:20.391 : Chapter 9
00:37:46.806 : Chapter 10
00:40:27.299 : Chapter 11
00:44:05.225 : Chapter 12
00:49:24.795 : Chapter 13
00:53:16.443 : Chapter 14
00:57:40.874 : Chapter 15
01:08:28.395 : Chapter 16
01:13:37.621 : Chapter 17
01:19:51.828 : Chapter 18
01:25:59.070 : Chapter 19
01:32:28.167 : Chapter 20
01:39:10.569 : Chapter 21
01:42:49.413 : Chapter 22
01:51:49.536 : Chapter 23
01:54:55.597 : Chapter 24
I’m curious why there was a special case there to disable hardware decoding - is the hardware now able to decode this format due to firmware/kernel improvements ?
Another format that doesn’t seem to be hardware decoded currently is wmv3 - is a simple fix possible for this too ?
Example file:
General
Format : Windows Media
File size : 84.5 MiB
Duration : 1mn 25s
Overall bit rate mode : Constant
Overall bit rate : 8 295 Kbps
Maximum Overall bit rate : 8 447 Kbps
Encoded date : UTC 2003-10-29 20:41:26.546
Video
ID : 2
Format : VC-1
Format profile : MP@HL
Codec ID : WMV3
Codec ID/Info : Windows Media Video 9
Codec ID/Hint : WMV3
Description of the codec : Windows Media Video 9 - Professional
Duration : 1mn 25s
Bit rate mode : Constant
Bit rate : 8 000 Kbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 4:3
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.215
Stream size : 81.5 MiB (96%)
Language : English (US)
Audio
ID : 1
Format : WMA
Format profile : Pro
Codec ID : 162
Codec ID/Info : Windows Media Audio
Description of the codec : Windows Media Audio 9 Professional - 384 kbps, 48 kHz, 5.1 channel 24 bit (A/V) 1-pass CBR
Duration : 1mn 25s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Stream size : 3.91 MiB (5%)
Language : English (US)
@fritsch, i am just getting into the vero stuff, I want need to recompile for arm, do you know of any pointers as to how I get started with a build environment and begin building the arm kodi packages? I would rather do this not on the Vero for speed reasons, and on my desktop amd64 ubuntu.
The OSMC build scripts are not set up for cross compiling Kodi for a few reasons but if you don’t mind compiling on the Vero it’s very easy, and can be done under OSMC itself.
Install git and build-essential:
sudo apt-get install git build-essential
Then git clone the OSMC repository:
git clone https://github.com/samnazarko/osmc.git
change to the kodi build dir:
cd osmc/packages/mediacenter-osmc
Then to build kodi for Vero:
sudo make vero
It will probably take close to 3 hours the first time because it will automatically install and set up the build environment but subsequent builds will be under 2 hours. You will end up with a .deb that you can install directly with dpkg -i.
If you want to make changes the best way is to create unified diffs and put them in the patches directory from which they will be automatically applied as the kodi source is re-downloaded, extracted and patched each build.
You can also build the Vero version of Kodi on a Pi 2 running OSMC by the way. (Vero and Pi 2 can both build Pi1, Pi 2 and Vero builds, Pi 1 can only build Pi 1 builds)
Thanks - I will give both these changes a try and see if they work. I will probably not have a chance until tomorrow though. (Plus ~2 hour compile time assuming it builds on first attempt)
I think Sam will know the answer to 1 better - we did start off with a cross compiling environment but switched to native building on a Vero because there were some compatibility issues that were causing trouble. (I don’t remember the exact issue)
For 2 - after the first complete build you can manually chroot into the build environment, cd to the kodi source directory (which will be already patched from the previous run) and run make, then copy just the kodi.bin - so for testing multiple small changes you’re only talking about a few minutes compile time each as only changed files are recompiled. Something like this:
mount --bind /home/osmc/osmc /opt/osmc-tc/armv7-toolchain-osmc/mnt
chroot /opt/osmc-tc/armv7-toolchain-osmc
cd mnt/package/mediacenter-osmc/kodi/*
Then run Make (for Kodi’s makefile, not ours) and when finished exit the chroot and copy the resulting kodi.bin over the one at /usr/lib/kodi/
Yes I see this over and over in the logs, 578, so your suggestion should help. I have maybe 2-5% of my lib in this format, also have a number of live streams that I watch are using this profile, so this will make the vero perfect in terms of playback.
Don’t hold your breath. There is a reason this format is disabled. Back at that time, we found a large number of such files that just played with “black screen” and the decoder did not tell, what it did not like …
Indeed. I think SW decode may be a better option here. My understanding is that while WMV is basically a simpler/simplest profile of VC1. Will give it a go but suspect it will not be that easy.
Playback will be hit and miss, because it seems the VPU needs some kind of set up or alignment for this.
We’ve never used CC to build OSMC at all with the exception of the Buildroot target installers as everything is quite nicely self-contained.
sorry think I am missing something. I am trying to compile this on my desktop, rather than on the arm powered vero, are you saying that, on the vero (i.e. natively) it will be faster?