v20 Compiling Kodi 20.0 Nexus branch with DV support
#1
Hi,
I need help compiling APK Kodi 20.0 Nexus with DV support which won’t be backported from the master branch.

I need to clone Kodi Nexus branch and apply this PR code:
https://github.com/xbmc/xbmc/pull/22423
(not problem for me it's same repostiory)

But I'm not sure what to do in the following instructions:
https://github.com/xbmc/xbmc/pull/22423#...1416764974


But the comment there:

"To get V20 (Nexus) to work with DV, you need to patch FFmpeg that Kodi builds against with xbmc/FFmpeg#24 (https://github.com/xbmc/FFmpeg/pull/24)
Then build Kodi using that patched FFmpeg and DV will work in v20."


I don't know how to do it because I only use the main xmbc/xmbc repo for the compilation process, as instructed here:
https://github.com/xbmc/xbmc/blob/master...Android.md
Reply
#2
My bad, I’ve meant to open the post here:

https://forum.kodi.tv/forumdisplay.php?fid=184
Reply
#3
(2023-02-05, 11:37)barronen1 Wrote: My bad, I’ve meant to open the post here:

Thread moved.
Reply
#4
Clone the xbmc/FFmpeg repo and apply the patch.  Build it and install it to some path (might not have to actually do that, but IIRC I did)

Build Kodi and point it to the patched ffmpeg with -DWITH_FFMPEG=/path/to/patched/ffmpeg as part of your cmake stanza.  Note that this will disable any version checking for ffmpeg, but thats ok in this case.
Learning Linux the hard way !!
Reply
#5
(2023-02-05, 11:48)black_eagle Wrote: Clone the xbmc/FFmpeg repo and apply the patch.  Build it and install it to some path (might not have to actually do that, but IIRC I did)

Build Kodi and point it to the patched ffmpeg with -DWITH_FFMPEG=/path/to/patched/ffmpeg as part of your cmake stanza.  Note that this will disable any version checking for ffmpeg, but thats ok in this case.

Thank you for the comment, you’re a life saver. 3 Questions:

1. Do I need to clone a specific branch if ffmpeg for Kodi Nexus? or clone the master branch?

2. I don’t know how to build and install ffmpeg, will just the clone + applying the code patch be enough?

3. Just to verify, you mean to run step 7 with this command:
make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build DWITH_FFMPEG=/path/to/patched/ffmpeg

And that would be the only change in the Kodi build instructions?
Reply
#6
(2023-02-05, 12:02)barronen1 Wrote: 1. Do I need to clone a specific branch if ffmpeg for Kodi Nexus? or clone the master branch?

You need to clone release/4.4-kodi.  I believe that it says which branch you need in the PR as it includes the branch it's raised against.
 
(2023-02-05, 12:02)barronen1 Wrote: 2. I don’t know how to build and install ffmpeg, will just the clone + applying the code patch be enough?

Yes probably.  The build system builds ffmpeg if you tell it to, and generally that is downloaded as a zip from our mirrors, but you can also zip it up locally and point the build system to use that version.  I think that's what I did after I'd patched it, but it's been a year !!!
 
(2023-02-05, 12:02)barronen1 Wrote: 3. Just to verify, you mean to run step 7 with this command:
make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build DWITH_FFMPEG=/path/to/patched/ffmpeg

Close.  Its -DWITH_FFMPEG=/foo/etc  The - matters !!
Learning Linux the hard way !!
Reply
#7
(2023-02-05, 14:48)black_eagle Wrote:
(2023-02-05, 12:02)barronen1 Wrote: 1. Do I need to clone a specific branch if ffmpeg for Kodi Nexus? or clone the master branch?

You need to clone release/4.4-kodi.  I believe that it says which branch you need in the PR as it includes the branch it's raised against.
 
(2023-02-05, 12:02)barronen1 Wrote: 2. I don’t know how to build and install ffmpeg, will just the clone + applying the code patch be enough?

Yes probably.  The build system builds ffmpeg if you tell it to, and generally that is downloaded as a zip from our mirrors, but you can also zip it up locally and point the build system to use that version.  I think that's what I did after I'd patched it, but it's been a year !!!
 
(2023-02-05, 12:02)barronen1 Wrote: 3. Just to verify, you mean to run step 7 with this command:
make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build DWITH_FFMPEG=/path/to/patched/ffmpeg

Close.  Its -DWITH_FFMPEG=/foo/etc  The - matters !!


About question 2:
After I clone the ffmpeg branch “release/4.4-kodi” and apply the code patch,

Do I need to use the entire cloned directory and run the command:
make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build -DWITH_FFMPEG=/path/to/cloned/ffmpeg.zip

Or point it to the cloned directory itself, unzipped:
make -C tools/depends/target/cmakebuildsys BUILD_DIR=$HOME/kodi-build -DWITH_FFMPEG=/path/to/cloned/ffmpeg

Bar
Reply
#8
-DWITH_FFMPEG expects ffmpeg binaries, not source code.
The easiest option to use your patched ffmpeg is to adjust https://github.com/xbmc/xbmc/blob/Nexus/...VERSION#L2 to point to your own fork that has the patches applied
Reply
#9
(2023-02-05, 21:52)wsnipex Wrote: -DWITH_FFMPEG expects ffmpeg binaries, not source code.


Thanks, I just didn’t fully understand what he meant by building ffmpeg with zipping it locally
Reply
#10
(2023-02-05, 21:52)wsnipex Wrote: -DWITH_FFMPEG expects ffmpeg binaries, not source code.


Are there instructions for that?
Reply
#11
(2023-02-05, 21:52)wsnipex Wrote: -DWITH_FFMPEG expects ffmpeg binaries, not source code.
The easiest option to use your patched ffmpeg is to adjust https://github.com/xbmc/xbmc/blob/Nexus/...VERSION#L2 to point to your own fork that has the patches applied


Thank you looks easier. Just to verify this method is instead of using “ -DWITH_FFMPEG” parameter. correct?
Reply
#12
(2023-02-05, 21:52)wsnipex Wrote: -DWITH_FFMPEG expects ffmpeg binaries, not source code.
The easiest option to use your patched ffmpeg is to adjust https://github.com/xbmc/xbmc/blob/Nexus/...VERSION#L2 to point to your own fork that has the patches applied
@black_eagle 
Sorry for comments spam, can't see how to delete old comments. What about this line:
https://github.com/xbmc/xbmc/blob/Nexus/...VERSION#L5

Do I need to change SHA512 if I'm using my own fork ffmpeg url?
If so, how?
Reply
#13
I'm not sure it has any difference, because:

In addition to the repository URL, it specifies a version to download:
https://github.com/xbmc/xbmc/blob/Nexus/...VERSION#L3

I've changed BASE_URL to: https://github.com/TwillightMercy/FFmpeg
(The patch applied in release/4.4-kodi branch)

But it will still download the same version from forked repo, which is this URL:
https://github.com/TwillightMercy/FFmpeg...xus-Alpha1
Which is the same zip file and has the same code as the original repo..

What do you think?
Reply
#14
When you have patched FFmpeg, zip it up again, psuh it to your repo as a release (different version name), point the build script to it (along with the new sha) and it should download and build against that.
Learning Linux the hard way !!
Reply
#15
(2023-02-07, 09:50)black_eagle Wrote: When you have patched FFmpeg, zip it up again, psuh it to your repo as a release (different version name), point the build script to it (along with the new sha) and it should download and build against that.
Excatly what I was thinking, so far I pushed my pattched FFmpeg as a release to my fork here: (I overrided the tag to use same release name I wasn't sure if it matters)
https://github.com/TwillightMercy/FFmpeg...xus-Alpha1

This is my current FFMPEG-VERSION file:
Quote:LIBNAME=ffmpeg
BASE_URL=https://github.com/TwillightMercy/FFmpeg
VERSION=4.4.1-Nexus-Alpha1
ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
SHA512=<still_old_sha>

Only thing wasn't sure about how to update the sha512, can you tell me? probably something simple
Reply

Logout Mark Read Team Forum Stats Members Help
Compiling Kodi 20.0 Nexus branch with DV support0