millicast / millicast-sdk

SDK for building a realtime broadcaster using the Millicast platform.
Other
37 stars 26 forks source link

h264/avc and h265/hevc user data unregistered SEI parsing #326

Closed vincentsong closed 1 month ago

vincentsong commented 3 months ago

Prepare the test video using FFmpeg CLI

Video file must be encoded in h264/avc or h265/hevc Note: since ffmepg CLI cannot insert SEI into h265/hevc video, there is start code issue even it is converted from a h264 video, so I share the standard h265 file here for test: https://dolby.box.com/s/500ut830dtjn7n07q1h9d9jjipfenxo4

ffmpeg -i input.mp4 -c copy -bsf:v h264_metadata=sei_user_data=<uuid string e.g. 086f3693-b7b3-4f2c-9653-21492feee5b8>+<any string in utf-8>  output.h264

// then you can stream it using ffmpeg to Millicast endpoint

How to run the PoC

  1. build SDK
    npm run build --scope=@millicast/sdk
  2. install SDK
    cd packages/millicast-viewer-demo
    npm i
  3. copy Worker file
    npx copy-worker
    > Set your app's public folder path: default is [dist] ? // press [enter] to use default folder 'dist'
  4. run Viewer app
    npm run start

Todos:

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: b149fc882dc8c6847a34325371ccceaf35994f95

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vincentsong commented 3 months ago

Is this branch synced with main? It is weird that README.md from .changeset is added

Yes, I have synced it with main branch