[mythtv] Redone FFmpeg 4.4.1

Peter Bennett pb.mythtv at gmail.com
Mon Nov 29 20:06:06 UTC 2021


On 11/29/21 1:44 PM, Klaas de Waal wrote:
> I just had this idea to look at the actual source code.
>
> I was under the impression that both the old devel/ffmpeg-resync (now 
> known as devel/ffmpeg-resync-0) and the new devel/ffmpeg-resync were 
> based on the same FFmpeg version 4.4.1 and that the difference was in 
> the way the resync had been done. So I expected the source trees of 
> both versions to be identical.
>
> However, I have now been looking at the code in FFmpeg/libavformat and 
> I see a number of differences.
> It looks like at least some MythTV-specific code has been removed just 
> like that.
> It also looks like the FFmpeg version is slightly different, as there 
> are also some changes in code that are not related to MythTV changes.
> This in turn suggests to me that different FFmpeg versions (at least 
> from different commits) have been used.
> At the same time, the version file libavcodec/version.h is identical 
> so the new code could have come from a commit not too far away in time.
>
> This makes for me the current devel/ffmpeg-resync branch suspect and I 
> think we should not waste time in debugging this. Just discard it.
>
> The way forward is to handle the following as separate tasks:
> - Update FFmpeg version
> - Develop a new workflow for creating a new MythTV version based on a 
> specific FFmpeg commit
> - Reducing the number of MythTV-specific changes
>
> The devel/ffmpeg-resync-0 that has been manually crafted by Peter uses 
> the FFmpeg 4.4.1 and works OK now so that is a good basis.
> It looks to me that this is good enough to put in master. This then 
> also decouples the FFmpeg update to 4.4.1 from other changes.
>
> The next step is to create a workflow that copies the FFmpeg code from 
> a specific commit and then applies all MythTV fixes.
> This should then, in this stage, create a source tree that is 
> identical to what is now devel/ffmpeg-resync-0.
> The check if the new source tree is identical to Peter's hand-crafted 
> version is then a good test for the new workflow.
>
> When that has been done it is a good moment to investigate replacing 
> the MythTV extensions to the code one by one while at the same time 
> keeping the functionality intact without causing regressions.
>
> Klaas.
>
>
This is a good approach. I did start with FFmpeg n4.4.1 in both cases. 
The differences you see between the devel/ffmpeg-resync and 
devel/ffmpeg-resync-0 are due to changes made by Scott Theisen to remove 
unused or no longer necessary FFmpeg customizations. It is likely 
something fell through the cracks there.

Scott's changes to MythTV are in his pull request 
https://github.com/MythTV/mythtv/pull/416

Scott's changes to FFmpeg are in the branch 
https://github.com/ulmus-scott/FFmpeg/tree/rebase/4.4m3
I put the FFmpeg changes here, for reference. There are 30 commits:
https://drive.google.com/drive/folders/1td5LLfcfQG4wjpKmKP_GfughRtB1gkr-

If nobody disagrees I will rename devel/ffmpeg-resync to 
devel/ffmpeg-resync-1 devel/ffmpeg-resync-0 to devel/ffmpeg-resync, with 
the plan to merge devel/ffmpeg-resync into master.

I still don't understand why some people have problems with skipping and 
others do not, on the same file and the same profile.

Peter



More information about the mythtv-dev mailing list