XBMC: Difference between revisions
→Patch for MPEG2 & VC1 Codecs
Line 268:
= Patch for MPEG2 & VC1 Codecs =
Source: [https://www.reddit.com/r/raspberry_pi/comments/8sg0a6/patch_for_mpeg2_vc1_license_again_for_osmc/#bottom-comments reddit.com]
== Verify patching ==
*Convert Binary to Hex & grep the file contents:
Line 273 ⟶ 275:
grep '47 *E9 *33 *36 *32 *48' /tmp/start_x.elf.hex
00b9db0: 47E9 4341 4C46 2118 47E9 3336 3248 1D18 G.CALF!.G.362H..
== Method 1 ==
*Backup files:
Line 288 ⟶ 292:
reboot
== Method 2 ==
*Check Codecs:▼
*Create script:
nano patch_codec.sh
<syntaxhighlight lang="bash">
#!/bin/bash
function do_patch() {
if [ -f "/boot/${1}" ]; then
cp "/boot/${1}" "/boot/${1}_backup"
perl -pne 's/\x47\xE9362H\x'${2}'\x18/\x47\xE9362H\x'${2}'\x1F/g' < "/boot/${1}_backup" > "/boot/${1}"
echo "Patched /boot/${1}..."
fi
}
do_patch start.elf 3C
do_patch start_x.elf 1D
</syntaxhighlight>
*Execute it:
sudo chmod +x patch_codec.sh
sudo ./patch_codec.sh
sudo reboot
for codec in H264 MPG2 WVC1 MPG4 MJPG WMV9; do echo -e "$codec:\t$(vcgencmd codec_enabled $codec)"; done
<br>
{{DISQUS}}
|