H265 choppy playback in QuickTime on Mac
I have issues with h265 files and I've reduced the bug to just demuxing and muxing an mp4. The input file plays fine in QuickTime, but the output plays with stutters. It does play fine in another player like IINA. See here for a simple demux/mux pipeline:
https://gist.github.com/Doerge/903243abde51bda3468f20ca27fc966f
QuickTime is a piece of garbage, but it's the default player for Mac users, so I can't get around it.
Anyone experienced this, and resolved it somehow?
Files below are input and output file respectively.
9 Replies
Hi @Aske
Most probably the reason is the missing ctts (composition offset table) from the muxed MP4 (membrane muxer doesn't store this table).
I processed the input file with an updated version of membrane_mp4_plugin, I don't have a MAC, so you can try the file on your side.
Hey Billal! Thanks for your hard work on the h265 plugin!
That one plays perfectly!
GitHub
GitHub - gBillal/ex_mp4: MP4 reader and writer
MP4 reader and writer. Contribute to gBillal/ex_mp4 development by creating an account on GitHub.
Yes, it is.
I wanted something to manipulate mp4 files without using pipelines.
Super cool!
Is it possible to integrate into pipelines as well, or is this more a standalone package for other use cases?
Aka. will it be possible to drop in this as a replacement for
Membrane.MP4.Muxer.ISOM
at some point?
(sorry if this is a stupid question, I do not totally understand the dataflow in Membrane pipelines + ctts
)I'll try to create a PR in membrane_mp4_plugin to fix this issue.
Yes you can use ex_mp4 to write a muxer however membrane_mp4_plugin is more appropriate for your use case.
Ok. Thanks a lot for your replies!
I'll watch out for the PR in membrane_mp4_plugin
Thanks @Billal for handling this, I didn't know about ex_mp4! We can consider basing the mp4 plugin on it when it's ready 😉
Once I finish with my use case, I'll try to adapt it for usage with the membrane plugin.