2014-07-25, 20:30
Hi,
While stock video player plays HD MKV files smooth as butter, XBMC without AMCODEC is unable to play an MKV fluently. With AMCODEC enabled => black screen of curse.
I have read all the forum back and forth, and I haven't found any clue on how to fix my issue:
- I have an Amlogic AML8726-MX box, cheap generic, china brand, no support... "Ask vendor for a new firmware" is not a valid answer
- I have tested several ROMs with no success, current one is the one at http://w2comp.com/itm/700685/74585/hd-me...atid=51474 (stock Amlogic ROM 4.2.2 rooted)
- I have tested XBMC from 13.0 to 13.2 beta1 [UPDATED 2015.02.15: tested up to Kodi 14.1]
- I have given root privileges to XBMC
- I have set right permissions to right files (chmod 666 /dev/am*), and made those permissions persist trough a boot script. I have verified the permissions are right at every boot.
- Then I open XBMC, and it does its magic with some other files permissions. Enable AMCODEC at video->acceleration and... I get the same as many of us: sound is there but you are still at the XBMC UI. You can force to bring the video intent to front, but you only get a black screen.
Once checked the log file, there comes that f*cking line with every try:
ERROR: DVDVideoCodecAmlogic: Failed to open Amlogic Codec
So, if anybody could help me/us to find a cure for this issue, I am available for testing, reporting, debugging...
PS: I have even edited init.amlogic.rc to fix the permissions to each and every file needed by XBMC, but this file looks to get regenerated at each boot, so there is no effect in editing it. Anyway, mabye anybody finds a clue in it (original file in the ROM):
While stock video player plays HD MKV files smooth as butter, XBMC without AMCODEC is unable to play an MKV fluently. With AMCODEC enabled => black screen of curse.
I have read all the forum back and forth, and I haven't found any clue on how to fix my issue:
- I have an Amlogic AML8726-MX box, cheap generic, china brand, no support... "Ask vendor for a new firmware" is not a valid answer
- I have tested several ROMs with no success, current one is the one at http://w2comp.com/itm/700685/74585/hd-me...atid=51474 (stock Amlogic ROM 4.2.2 rooted)
- I have tested XBMC from 13.0 to 13.2 beta1 [UPDATED 2015.02.15: tested up to Kodi 14.1]
- I have given root privileges to XBMC
- I have set right permissions to right files (chmod 666 /dev/am*), and made those permissions persist trough a boot script. I have verified the permissions are right at every boot.
- Then I open XBMC, and it does its magic with some other files permissions. Enable AMCODEC at video->acceleration and... I get the same as many of us: sound is there but you are still at the XBMC UI. You can force to bring the video intent to front, but you only get a black screen.
Once checked the log file, there comes that f*cking line with every try:
ERROR: DVDVideoCodecAmlogic: Failed to open Amlogic Codec
So, if anybody could help me/us to find a cure for this issue, I am available for testing, reporting, debugging...
PS: I have even edited init.amlogic.rc to fix the permissions to each and every file needed by XBMC, but this file looks to get regenerated at each boot, so there is no effect in editing it. Anyway, mabye anybody finds a clue in it (original file in the ROM):
Code:
import init.amlogic.usb.rc
import init.amlogic.board.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
mount usbfs none /proc/bus/usb
symlink /initlogo.720p.rle /initlogo.rle
insmod /boot/ump.ko ump_debug_level=2
insmod /boot/mali.ko mali_debug_level=2
on init
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
mkdir /storage/external_storage 0666 system system
mount tmpfs tmpfs /storage/external_storage rec mode=0775,gid=1000
on post-fs-data
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
mkdir /data/misc/etc 0777 system pppoe
mkdir /data/misc/etc/ppp 0777 system pppoe
chown system system /etc/ppp
chmod 0770 /etc/ppp
# we will remap this as /storage/sdcard0 with the sdcard fuse tool
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media
# change back to bluetooth from system
chown bluetooth bluetooth /data/misc/bluetooth
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
on boot
# Default Read Ahead value for sdcards
write /sys/block/mmcblk0/queue/read_ahead_kb 2048
write /sys/block/mmcblk1/queue/read_ahead_kb 2048
chown media system /sys/class/tsync/pts_video
chown media system /sys/class/tsync/pts_audio
chown media system /sys/class/tsync/pts_pcrscr
chown media system /sys/class/tsync/event
chown media system /sys/class/tsync/mode
chown media system /sys/class/tsync/enable
chown media system /sys/class/tsync/av_threshold_min
chown media system /sys/class/tsync/av_threshold_max
chown system system /sys/class/graphics/fb0/blank
chown media system /sys/class/graphics/fb1/blank
chown media system /sys/class/graphics/fb0/order
chown media system /sys/class/graphics/fb1/order
chown media system /sys/class/graphics/fb0/enable_key
chown media system /sys/class/graphics/fb0/enable_key_onhold
chmod 0664 /sys/class/tsync/pts_video
chmod 0664 /sys/class/tsync/pts_audio
chmod 0664 /sys/class/tsync/pts_pcrscr
chmod 0664 /sys/class/tsync/event
chmod 0664 /sys/class/tsync/mode
chmod 0664 /sys/class/tsync/av_threshold_min
chmod 0664 /sys/class/tsync/av_threshold_max
chmod 0664 /sys/class/tsync/enable
chmod 0664 /sys/class/graphics/fb0/blank
chmod 0664 /sys/class/graphics/fb0/order
chmod 0664 /sys/class/graphics/fb1/blank
chmod 0664 /sys/class/graphics/fb1/order
chmod 0664 /sys/class/graphics/fb0/enable_key
chmod 0664 /sys/class/graphics/fb0/enable_key_onhold
chown media system /sys/class/video/blackout_policy
chown media system /sys/class/video/screen_mode
chown media system /sys/class/video/axis
chown media system /sys/class/video/disable_video
chown media system /sys/class/video/zoom
chown media system /sys/class/ppmgr/angle
chown media system /sys/class/ppmgr/disp
chown media system /sys/class/ppmgr/ppscaler
chown media system /sys/class/ppmgr/ppscaler_rect
chmod 0664 /sys/class/video/blackout_policy
chmod 0664 /sys/class/video/screen_mode
chmod 0664 /sys/class/video/axis
chmod 0664 /sys/class/video/disable_video
chmod 0664 /sys/class/video/zoom
chmod 0664 /sys/class/ppmgr/angle
chmod 0664 /sys/class/ppmgr/disp
chmod 0664 /sys/class/ppmgr/ppscaler
chmod 0664 /sys/class/ppmgr/ppscaler_rect
chown media system /sys/class/amaudio/audio_channels_mask
chown media system /sys/class/amaudio/enable_resample
chown media system /sys/class/amaudio/resample_type
chmod 0664 /sys/class/amaudio/audio_channels_mask
chmod 0664 /sys/class/amaudio/enable_resample
chmod 0664 /sys/class/amaudio/resample_type
chown system system /sys/class/audiodsp/digital_raw
chmod 0664 /sys/class/audiodsp/digital_raw
chmod 0644 /sys/class/audiodsp/ac3_drc_control
chown system system /sys/class/audiodsp/ac3_drc_control
chmod 0666 /dev/audiodsp_pcmenc
chmod 0666 /dev/audio_spdif
chmod 0666 /dev/amstream_sub_read
chmod 0666 /dev/ilitek_ctrl
chown system system /sys/class/subtitle/enable
chown system system /sys/class/subtitle/total
chown system system /sys/class/subtitle/width
chown system system /sys/class/subtitle/height
chown system system /sys/class/subtitle/type
chown system system /sys/class/subtitle/curr
chown system system /sys/class/subtitle/size
chown system system /sys/class/subtitle/data
chown system system /sys/class/subtitle/startpts
chown system system /sys/class/subtitle/fps
chown system system /sys/class/subtitle/subtype
chown media system /sys/class/audiodsp/codec_fatal_err
chown media system /sys/class/subtitle/index
chmod 0664 /sys/class/audiodsp/codec_fatal_err
chmod 0664 /sys/class/subtitle/enable
chmod 0664 /sys/class/subtitle/total
chmod 0664 /sys/class/subtitle/width
chmod 0664 /sys/class/subtitle/height
chmod 0664 /sys/class/subtitle/type
chmod 0664 /sys/class/subtitle/curr
chmod 0664 /sys/class/subtitle/size
chmod 0664 /sys/class/subtitle/data
chmod 0664 /sys/class/subtitle/startpts
chmod 0664 /sys/class/subtitle/fps
chmod 0664 /sys/class/subtitle/subtype
chmod 0664 /sys/class/subtitle/index
# DVB
chmod 0666 /dev/dvb0.frontend0
chmod 0666 /dev/dvb0.demux0
chmod 0666 /dev/dvb0.demux1
chmod 0666 /dev/dvb0.demux2
chmod 0666 /dev/dvb0.dvr0
chmod 0666 /dev/dvb0.dvr1
chmod 0666 /dev/dvb0.dvr2
chown media system /sys/class/stb/demux0_source
chown media system /sys/class/stb/demux1_source
chown media system /sys/class/stb/demux2_source
chown media system /sys/class/stb/source
chown media system /sys/class/stb/asyncfifo0_source
chown media system /sys/class/stb/asyncfifo1_source
chown media system /sys/class/stb/asyncfifo0_flush_size
chown media system /sys/class/stb/asyncfifo1_flush_size
chown media system /sys/class/stb/video_pts
chown media system /sys/class/stb/audio_pts
chown media system /sys/class/stb/dsc_source
chmod 0664 /sys/class/stb/demux0_source
chmod 0664 /sys/class/stb/demux1_source
chmod 0664 /sys/class/stb/demux2_source
chmod 0664 /sys/class/stb/source
chmod 0664 /sys/class/stb/asyncfifo0_source
chmod 0664 /sys/class/stb/asyncfifo1_source
chmod 0664 /sys/class/stb/asyncfifo0_flush_size
chmod 0664 /sys/class/stb/asyncfifo1_flush_size
chmod 0664 /sys/class/stb/video_pts
chmod 0664 /sys/class/stb/audio_pts
chmod 0644 /sys/class/stb/dsc_source
chmod 0666 /dev/ge2d
chmod 0666 /dev/amaudio_ctl
chown media system /sys/class/tsync/pcr_recover
chmod 0664 /sys/class/tsync/pcr_recover
chown media system /sys/module/amvdec_h264/parameters/dec_control
chown media system /sys/module/amvdec_mpeg12/parameters/dec_control
chown media system /sys/module/di/parameters/bypass_hd
chown media system /sys/module/di/parameters/bypass_all
chown media system /sys/module/amvideo/parameters/smooth_sync_enable
chown media system /sys/module/amvdec_h264/parameters/error_recovery_mode
chmod 0664 /sys/module/amvdec_h264/parameters/dec_control
chmod 0664 /sys/module/amvdec_mpeg12/parameters/dec_control
chmod 0664 /sys/module/di/parameters/bypass_hd
chmod 0664 /sys/module/di/parameters/bypass_all
chmod 0664 /sys/module/amvideo/parameters/smooth_sync_enable
chmod 0664 /sys/module/amvdec_h264/parameters/error_recovery_mode
chown media system /sys/module/deinterlace/parameters/deinterlace_mode
chmod 0664 /sys/module/deinterlace/parameters/deinterlace_mode
chown media system /sys/class/graphics/fb0/block_mode
chmod 0664 /sys/class/graphics/fb0/block_mode
# HDMI/LCD switch
chown system system /sys/class/display/mode
chown media system /sys/class/display/axis
chown system system /sys/class/graphics/fb0/scale
chown system system /sys/class/graphics/fb1/scale
chown system system /sys/class/graphics/fb0/scale_axis
chown system system /sys/class/graphics/fb1/scale_axis
chown system system /sys/class/amhdmitx/amhdmitx0/disp_mode
chown system system /sys/class/amhdmitx/amhdmitx0/config
chmod 0664 /sys/class/display/mode
chmod 0664 /sys/class/display/axis
chmod 0664 /sys/class/graphics/fb0/scale
chmod 0664 /sys/class/graphics/fb1/scale
chmod 0664 /sys/class/amhdmitx/amhdmitx0/disp_mode
chmod 0664 /sys/class/amhdmitx/amhdmitx0/config
chown media system /sys/class/graphics/fb0/block_mode
chmod 0664 /sys/class/graphics/fb0/block_mode
# Dual display
chown system system /sys/class/display2/mode
chown system system /sys/class/display2/axis
chown system system /sys/class/video2/clone
chown system system /sys/class/vfm/map
chown system system /sys/module/amvideo2/parameters/clone_frame_scale_width
chown system system /sys/module/amvideo2/parameters/clone_frame_rate
chown system system /sys/class/video2/screen_mode
chown system system /sys/class/video2/zoom
chmod 0664 /sys/class/display2/mode
chmod 0664 /sys/class/display2/axis
chmod 0664 /sys/class/video2/clone
chmod 0664 /sys/class/vfm/map
chmod 0664 /sys/module/amvideo2/parameters/clone_frame_scale_width
chmod 0664 /sys/module/amvideo2/parameters/clone_frame_rate
chmod 0664 /sys/class/video2/screen_mode
chmod 0664 /sys/class/video2/zoom
chown system system /sys/class/graphics/fb2/blank
chown system system /sys/class/graphics/fb2/clone
chown system system /sys/class/display2/venc_mux
chmod 0664 /sys/class/graphics/fb2/blank
chmod 0664 /sys/class/graphics/fb2/clone
chmod 0664 /sys/class/display2/venc_mux
# Free scale
chown system system /sys/class/graphics/fb0/free_scale
chown system system /sys/class/graphics/fb0/scale_width
chown system system /sys/class/graphics/fb0/scale_height
chown system system /sys/class/graphics/fb0/free_scale_axis
chown system system /sys/class/graphics/fb1/free_scale
chown system system /sys/class/graphics/fb1/scale_width
chown system system /sys/class/graphics/fb1/scale_height
chown media system /sys/class/graphics/fb0/request2XScale
chmod 0664 /sys/class/graphics/fb0/free_scale
chmod 0664 /sys/class/graphics/fb0/scale_width
chmod 0664 /sys/class/graphics/fb0/scale_height
chmod 0664 /sys/class/graphics/fb0/free_scale_axis
chmod 0664 /sys/class/graphics/fb1/free_scale
chmod 0664 /sys/class/graphics/fb1/scale_width
chmod 0664 /sys/class/graphics/fb1/scale_height
chmod 0664 /sys/class/graphics/fb0/request2XScale
# CPU scaling
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpufreq/conservative/freq_step
chown system system /sys/devices/system/cpu/cpufreq/performance2/sampling_rate
chown system system /sys/devices/system/cpu/cpufreq/performance2/down_threshold
chown system system /sys/devices/system/cpu/cpufreq/performance2/up_threshold
chown system system /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
chown system system /sys/devices/system/cpu/cpufreq/conservative/down_threshold
chown system system /sys/devices/system/cpu/cpufreq/conservative/up_threshold
chown system system /sys/class/mali_freq/max
chown system system /sys/class/freq_limit/limit
chown system system /sys/devices/system/cpu/cpu1/online
chmod 664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 664 /sys/devices/system/cpu/cpufreq/conservative/freq_step
chmod 664 /sys/devices/system/cpu/cpufreq/performance2/sampling_rate
chmod 664 /sys/devices/system/cpu/cpufreq/performance2/down_threshold
chmod 664 /sys/devices/system/cpu/cpufreq/performance2/up_threshold
chmod 664 /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
chmod 664 /sys/devices/system/cpu/cpufreq/conservative/down_threshold
chmod 664 /sys/devices/system/cpu/cpufreq/conservative/up_threshold
chmod 664 /sys/class/mali_freq/max
chmod 664 /sys/class/freq_limit/limit
chmod 664 /sys/devices/system/cpu/cpu1/online
chown system system /sys/devices/system/clocksource/clocksource0/current_clocksource
# usbpm
chown system system /sys/devices/lm0/peri_power
chown system system /sys/devices/lm0/peri_sleepm
chown system system /sys/devices/lm0/peri_otg_disable
chown system system /sys/devices/lm1/peri_sleepm
chown system system /sys/devices/lm1/peri_otg_disable
chown system system /sys/class/aml_mod/mod_off
chown system system /sys/class/aml_mod/mod_on
start sdcard
mkdir /data/media/0/external_storage 0000 system system
service display /system/bin/set_display_mode.sh panel
class core
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL -f/system/etc/dhcpcd/dhcpcd.conf
class main
disabled
oneshot
service dhcpcd_usbnet0 /system/bin/dhcpcd -d -f /system/etc/dhcpcd/dhcpcd.conf -B
class main
group dhcp system
disabled
oneshot
service smbd /system/bin/smbd
class main
group system system
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service smbd /system/bin/smbd
class main
group system system
oneshot
# remote
service remotecfg /system/bin/remotecfg /system/etc/remote.conf
class main
oneshot
service ril-daemon /system/bin/rild -l /system/lib/libaml-ril.so
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio system
disabled
service pppd_gprs /system/bin/init-pppd.sh
user root
group radio net_admin cache inet misc system
disabled
oneshot
service pppoe_wrapper /system/bin/pppoe_wrapper
class main
group system inet
oneshot
# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start
on property:hw.nophone=true
stop ril-daemon
on property:hw.nophone=false
start ril-daemon