Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generating multiple videotracks and single audio from from a mp4 file using FFmpeg #183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TilsonJoji
Copy link
Contributor

@TilsonJoji TilsonJoji commented Aug 23, 2024

Hello Luke @kixelated , in context to the PR in moq-js , this PR holds the changes done to ./dev/pub to enable us to create 3 video renditions for a video file that could be ingested for a single namespace via moq-pub.

I have tried to optimize FFmpeg args to help us get the best of video quality and latency and also tried to make the config parameters in the script readable, at times occasionally I have observed video artefacts at higher video quality track. Since the context is the same I added the changes in ./dev/pub , please let me know if you would like me to keep this as a separate file like ./dev/pub_multi

Script usage scenarios:

  • Scenario 1:
    • Without any arguments, the legacy flow of 1 video and 1 audio will be executed
  • Scenario 2:
    • With argument "multi" ( eg: ./dev/pub multi ) , 3 video tracks and 1 audio track will be ingested into moq-pub
    • Default video quality parameters are:
      • 1920x1080:6000K:60
      • 1280x720:5000K:30
      • 640x480:4000K:25
  • Scenario 3
    • With argument multi and video quality of the 3 tracks specified in arguments
      • ./dev/pub multi 1920x1080:6000K:60 1280x720:5000K:30 360x480:4000K:25

With "multi" mode enabled, a realtime live video track stream will be simulated and the video will be watermarked/overlayed with real-time UTC clock from the server on the top left corner that can be visually compared with https://time.is/UTC to check real-time latency and the videoresolition-bitrate will be watermarked/overlayed at the bottom right corner to assist in visually identifying the track.

./dev/pub script had an "$@" as the last argument to moq-pub , which passes all the arguments to the script to moq-pub , had to remove it to incorporate the current implementation and legacy flow works without it, to my understanding moq-pub usage is moq-pub --name <NAME> <URL> , so we can safely remove "$@" . Kindly advise if I overlooked this.

Kindly review and let me know your thoughts and amendments to be done.

…mp4 file using FFmpeg (#6)

* committosupport-generatingMultipleVideotracksFromaSinglefileusingFFmpeg

* committosupport-generatingMultipleVideotracksFromaSinglefileusingFFmpeg2
@TilsonJoji
Copy link
Contributor Author

UT

VideoTrack-swap-UT.mp4

@TilsonJoji TilsonJoji marked this pull request as ready for review August 23, 2024 19:47
@kixelated
Copy link
Owner

Oh wow sorry somehow I missed this PR. I'll take a look at it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants