Search Unity

FFmpeg for Unity

Discussion in 'Assets and Asset Store' started by Max-Bot, Jul 13, 2017.

  1. jahanzaibf8

    jahanzaibf8

    Joined:
    Oct 17, 2017
    Posts:
    2
    thanks kateryna_sloboda, link was really helpful :)
     
  2. helloworldgames

    helloworldgames

    Joined:
    Mar 16, 2017
    Posts:
    59
    Is it still active? what about 2018.3 support?
     
    jGate99 likes this.
  3. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    50
    Hi helloworldgames

    Of Course it's active. There is a package submitted to Asset Store with 2018.2.6 version which is pretty same.
    FFmpeg Unity Bind doesn't depends on Engine strongly - it's designed vice versa.

    Good luck with a project!
     
    jGate99 likes this.
  4. DSilva00

    DSilva00

    Joined:
    Jan 29, 2019
    Posts:
    4
    Hi!

    I'm trying to play a mp4 video in Android using the VideoPlayer class and I get a black screen.

    Is there any way I could use FFmpeg unity bind to fix this? get a video stream with the good format or something?
     
  5. jpienbro_apollojourney

    jpienbro_apollojourney

    Joined:
    Jul 20, 2017
    Posts:
    11
    Could you please update the ffmpeg versions used for iOS & Android? The plugin seems to be using ffmpeg versions from 2 years ago.
    I'm currently stuck, because certain ffmpeg commands only seem to work properly in newer versions of ffmpeg. I tested the commands I need with the ffmpeg 3.2 and ffmpeg 4.1 executables on Windows from the official ffmpeg site and 3.2 doesn't seem to do what I want and 4.1 does, probably something that's fixed in newer versions.
     
    jGate99 likes this.
  6. jyoti22

    jyoti22

    Joined:
    Mar 11, 2014
    Posts:
    1
    Hello,
    For Unity:Android I want the UI elements should not recorded.
    Thanks
     
  7. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    807
    I request the same upgrade.
     
  8. wang987662210

    wang987662210

    Joined:
    Jul 21, 2015
    Posts:
    1
    FFMPEG Unity Bind is a good assets.But have some problem about Mobile device。
    I write a funcation for audio amix. It can work on mac or windows pc.But can not work on Mobile device. I test it on android device, it's failed. I will test on ios device. Maybe i need help.
    this is amix function: string curCommand;
    void AmixAudio()
    {
    CurRecState = RecType.AmixAudio;
    StringBuilder command = new StringBuilder();
    //Input Audio params
    if (recAudioSource != RecAudioSource.None)
    {
    command.
    Append(" -y ").
    Append("-i ").
    // Append("\"").
    Append(AddQuotation(soundPath)).
    // Append("\"").
    Append(" -i ").
    // Append("\"").
    Append(AddQuotation(soundMicPath)).
    // Append("\"").
    Append(" -filter_complex amix=inputs=").
    Append("2").
    #if UNITY_ANDROID && !UNITY_EDITOR
    Append(":duration=first:dropout_transition=").
    Append("2").
    Append(" -f ").
    Append("wav \"").
    Append(outputAudioPath+"\"");
    #elif !UNITY_ANDROID || UNITY_EDITOR
    Append(":duration=first:dropout_transition=").
    Append("2").
    Append(" -f ").
    Append("wav \"").
    Append(outputAudioPath+"\"");
    #endif
    //Append("Amix.wav");
    //-i b.mp3 -i 111.mp3 --filter_complex amix=inputs=2:duratio n = first:dropout_transition = 2 - f wav a.wav }
    curCommand = command.ToString();
    FFmpegCommands.DirectInput(command.ToString());
    }
    that's faild log:
    [NULL@0xeba35800] Unable to find a suitable output format '':Invalid argument.
     
  9. tabulatouch

    tabulatouch

    Joined:
    Mar 12, 2015
    Posts:
    8
    Hello,
    I would like to purchase your asset initially to generate thumbnails from video files, is that possible?
    Is there a demo to try before buying, given the price is not low.
    Best Regards
     
  10. system-idle

    system-idle

    Joined:
    Dec 13, 2013
    Posts:
    11
    Hi all

    For me the plugin works very well in Unity Editor to create .mp4 video.

    When I do a test build for standalone Windows it's not working for me. What am I doing wrong?

    It gets as far as outputting image sequence but doesn't create .mp4.


    I've check file permissions.
    Used a Unity version that the plugin was submitted with.
    Downloaded newer version of FFmpeg.
    Tried builds for x86 and x64
    Tried from new project using the demo.

    Still doesn't work.

    Anyone had this issue?

    Kind regards
     
  11. Shane-Pangea

    Shane-Pangea

    Joined:
    Dec 12, 2012
    Posts:
    16
    I have a Unity mobile app (iOS/Android) that saves a MP4 file. How would I add an additional audio track to the video, and save a new video?

    Thanks so much!
     
  12. juntoalmar

    juntoalmar

    Joined:
    Dec 7, 2018
    Posts:
    6
    Hi,
    I have a project where I have one computer streaming the content of the webcam to another computer through a local network.

    Basically, a few times per second, I capture the image from the webcam, compress it in JPG and send it to the other computer, which uses it as a texture on a plane. But the quality I get is pretty poor as each frame is sent completely, even if it's 90% equal to the previous and I have to compress each frame heavily in order to fit inside a network packet. The final video ain't very fluid either.

    Can I use your asset to stream the content of the webcam in realtime from one computer to the other?
     
  13. iPedro

    iPedro

    Joined:
    Dec 28, 2011
    Posts:
    10
    The plugin still uses a version of FFmpeg from 2016. Are you going to update it to use the latest or at least a more current version of FFmpeg? I've tried contacting your support 5 times now with no response.
     
    jGate99 likes this.
  14. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    807
    @Max-Bot please sharing your plan about plugin future'd be really great.
     
  15. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    50
    The software is distributed as is.
    Currently I'm strongly focused on other projects.
    Try to find solution of your issues or needs in community, contact colleges or develop self.

    Have a great time!
     
  16. ryanreptoid

    ryanreptoid

    Joined:
    Aug 12, 2012
    Posts:
    88
  17. ryanreptoid

    ryanreptoid

    Joined:
    Aug 12, 2012
    Posts:
    88
    Cleverlie likes this.
  18. Cleverlie

    Cleverlie

    Joined:
    Dec 23, 2013
    Posts:
    194
    hey have you made any progress on that? I'm looking into something that allows me to stream a unity camera into a ffmpeg stream that is consumed and played in another device in the same LAN, but I have zero knowledge of android native development, that github repo you shared seems to be what I need but I don't know how I could use it inside unity, do you have some insights that you could share? thanks a lot
     
  19. ryanreptoid

    ryanreptoid

    Joined:
    Aug 12, 2012
    Posts:
    88
    Unfortunately no, we've shelved the Android part of the project for now. Perhaps the developer will update it someday! Otherwise, our plan is to hire a colleague to make the changes.
     
    Cleverlie likes this.