FFMpeg Object: Synchronous Video Player

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • FFMpeg Object

    Please login to see this picture.

    Description

    Talking about the ADS...Tired about the uncontrollable gap before playing? Don't want the micro-stuttering when VSync is on? Want to play other formats like mp4? Need to protect your precious cut scenes? Then try this object!

    Special thanks to @SelfReflection31 (From Github) and @Ruthoranium (From Discord), who help a lot to polishing this extension.

    This object is based on cross platform lib, FFMpeg & SDL, in theory there is not too difficult to bring it to other platforms like Android.

    Please login to see this link.
    Please login to see this link.

    Please login to see this link.

    Free and open source

    If you find some issues or have a new idea, you can modify the source code directly, and don't need to wait for author to make an update.

    Prop & A/C/E List

    ============

    Enjoy!

    X)

  • YES PLEASE! Giving it a Go. Thank You!

  • It's a wonderful object for me. Unfortunately, it doesn't work on Android.
    Any idea?

    I'm not targeting Android so most of my extensions are windows only.

    For this object, FFMpeg & SDL need to rebuild for Android, and this is not an issue as they're popular opensource lib.
    The encrypt part now using Windows CNG, so this part must be ported, move to a compatible cross platform lib (or a new one that breaks existing projects).
    On Android Fusion uses another method for display so surface class we familiar on Windows is not exist. Display part must be ported.
    I'm not sure if now jni supports Cpp 20, do have used some latest features. And another issue is code is 32bit, I'm not sure if can be ported to 64bit with out any conversion (e.g., assume pointer is 32byte)
    The last thing is an interface is needed to communicate with java runtime.

    Or wait of F3 then use the general SDK to build for all platforms.

  • A GREAT extension, however, the stretch function is a bit lackluster since it only stretches videos to the width of the object disregarding its height and keeping the original aspect ratio of the video.

  • Hi, could you please provide a mfa for this?
    Just checked the code and do have a mixed usage of scale.

    Here it is (Drop a random video with a name "NGGYU" into the folder. Couldn't attach it due to its large size)

    Please login to see this attachment.

    And here are results of changing width and height on my end:

    Please login to see this attachment.
    Please login to see this attachment.
    Please login to see this attachment.

    Also apparently videos continue to play even when the app is paused which sometimes crashes it for me.

    Please login to see this attachment.

    Edited once, last by MGilbas (April 16, 2023 at 11:39 AM).

  • Hmm, it's due to a stupid typo, passed both x scale in, sorry for that.

    Please login to see this picture.

    Please check the latest commit in repo.
    If you don't familiar with how to use GitHub, you can just simply download entire repo:

    Please login to see this picture.

    then copy files under Extensions/FFMpeg/ToInstall/Files to fusion root.

  • Hmm, it's due to a stupid typo, passed both x scale in, sorry for that.

    Please login to see this picture.

    Please check the latest commit in repo.
    If you don't familiar with how to use GitHub, you can just simply download entire repo:

    Please login to see this picture.

    then copy files under Extensions/FFMpeg/ToInstall/Files to fusion root.

    Thanks a lot, everything's working perfectly now!

  • B230520

    Please login to see this link.

    New feature
    - Set override codec to force extension to use it, e.g., use libvpx to support alpha channel of WebM files

    Bug fix
    - Fix SDL_Mixer pause when loading new video. old packet queue will block audio thread and which causes pause gap when SDL_Mixer is playing, as both shares the same backend. use spin lock to get rid of that pause.
    - crash if video file has no audio channel

    Enhancement
    - Add popup for deprecated Force no audio checkbox.

    Edited once, last by defisym (May 20, 2023 at 11:25 AM).

  • B230620

    Please login to see this link.

    New feature
    - Get override codec name
    - Reset display

    Bug fix
    - Pause in debugger or using pause action won't pause audio
    - fix external clock sync issue
    - fix clean cache crash if cache is empty

    Enhancement
    - ForceNoAudio is not marked as deprecated as external sync is fixed

    Edited 2 times, last by defisym (July 18, 2023 at 4:26 PM).

  • So is it beta? And if so, what are known issues not currently fixed?

    Really need that object as lack of ability to play modern video formats is one of the few issues I have with Fusion.

    There are no impossible things, there is only lack of skill needed to complete the task.

  • So is it beta? And if so, what are known issues not currently fixed?

    Really need that object as lack of ability to play modern video formats is one of the few issues I have with Fusion.

    I'm using it in my game, and it seems to be fine for most cases. AFAIK:

    - Hardware decoding is not rendered to surface directly; it has a copy routine so it's not fully hardware. You may get performance issues if playing multiple files together.
    - For some video formats you need to set override codec names to play properly, e.g., default codec will ignore webm's alpha channel.
    - Decrypt stream didn't implemented so if you are playing encrypted large files it will take more time to load, and may crash if file is too big to put in memory, but usually it's fast enough.

    Edited once, last by defisym (July 18, 2023 at 10:37 AM).

  • Hello,

    Is it possible to add the ability to open network streams instead of just files?

    I would very much like to be able to open rtsp streams (that has username and password in the link) as well as MPEG-TS UDP Multicast streams.

  • Hello,

    Is it possible to add the ability to open network streams instead of just files?

    I would very much like to be able to open rtsp streams (that has username and password in the link) as well as MPEG-TS UDP Multicast streams.

    FFMpeg supports open from URL, but this object is designed to decode synchronously, to make sure there is something to display without gap.
    Tested and it do can open but soon app freezes due to current packet queue & sync didn't take this case into account.
    So it's a bit complex to implement this, using the multi-thread way ffplay uses, which means rewrite most parts of it.
    Anyway, it's open source, you can implement it and open PRs :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!