Skip to content

Improve qvh by adding a more stable video integration either using mkv + tcp or ffmpeg integration #147

@danielpaulus

Description

@danielpaulus

QVH is a rock solid tool, except for the flaky gstreamer integration.
I can see two options to improve this:

  1. Integrate with ffmpeg
  2. Implement the mkv container format and export a stream via tcp so any media framework can be integrated easily

Some pointers:
We get a series of CMSampleBuf objects from the device (https://github.com/danielpaulus/quicktime_video_hack/blob/main/screencapture/coremedia/cmsamplebuf.go) which I decoded to a Golang struct. Those contain either raw h264 NaLus or PCM audio. Sometimes with a format descriptor that contains PPS Nalus needed to start a stream.

To understand how to work with this, look at the current implementations of CmSampleBufConsumer (

type CmSampleBufConsumer interface {
)

To solve this, we either need a MKVConsumer, that receives the above CMSampleBufs and turns them into an MKV stream or a FFMPEGConsumer that can use FFMPEG directly somehow to turn CMSampleBufs into a useful format.

If we have an MKVConsumer, we/me can hook it up easily to a local tCP server like f.ex. here: screencapture/gstadapter/tcp_server_adapter.go and stream it really fast to ffmpeg or gstreamer running in external processes which make everything much more stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions