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:
    60
    Is it still active? what about 2018.3 support?
     
    jGate99 likes this.
  3. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    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:
    1,945
    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:
    23
    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:
    26
    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:
    38
    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:
    14
    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:
    1,945
    @Max-Bot please sharing your plan about plugin future'd be really great.
     
  15. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    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. ryanmillerca

    ryanmillerca

    Joined:
    Aug 12, 2012
    Posts:
    143
  17. ryanmillerca

    ryanmillerca

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

    Cleverlie

    Joined:
    Dec 23, 2013
    Posts:
    219
    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. ryanmillerca

    ryanmillerca

    Joined:
    Aug 12, 2012
    Posts:
    143
    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.
  20. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Hello, so does this project work? I want to buy it so i can put FFMPEG into Android 64 bit, and iOS app.
     
  21. Shane-Pangea

    Shane-Pangea

    Joined:
    Dec 12, 2012
    Posts:
    38
    Haven't tried it. But it seem like there is next to no support for it from the developer. I reached out directly multiple times and only received a canned message saying they are too busy to help. I've seem similar reports from others on this thread as well.
     
  22. vn_man

    vn_man

    Joined:
    Jun 7, 2017
    Posts:
    24
    Hi everyone,
    I am woking on live stream project in ios, and someone said FFmpeg can use to live stream video to Youtube
    so How to do it with Unity? or this plugin can use for do it?
    I stuck few month, so very hope about it
    Thank all!
     
  23. Lordmin

    Lordmin

    Joined:
    Mar 9, 2017
    Posts:
    62
    I want to adjust 'Bitrate' to reduce capacity.
    How can I reduce 'Bitrate'?

    Can I adjust the bitrate using the 'FFmpeg Unity Bind' asset in a windows program?
     
  24. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    243
    Is this suitable for encoding a unity texture to a streaming video that I stream to Azure Media Services? Or is streaming video a whole different ball game?

    The output I'm hoping for is:
    • an ingest URL
    • format: RTMP or Smooth video (whatever that is?)
     
    Last edited: Dec 23, 2019
  25. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    71
    Why this asset removed from the unity asset store?
     
  26. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
  27. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    Max-Bot likes this.
  28. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    By notification to email used for order.
     
    jGate99 likes this.
  29. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    So i email you with my invoice/order id? and then you will keep sending me updates
     
    Max-Bot likes this.
  30. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Yeap. If there are some updates. Solution is ultimate and complete.
    Also it is distributed AS IS. This means that any additional development requests are not included.
     
  31. fizzbuzzph

    fizzbuzzph

    Joined:
    Jul 4, 2018
    Posts:
    2
    got permission error on android 10/Q
     
  32. Ikaro88

    Ikaro88

    Joined:
    Jun 6, 2016
    Posts:
    300
    Max-Bot likes this.
  33. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Yeah, sure. FFmpeg Unity Bind allows do every possible media encoding / decoding operation.
     
  34. seanmars

    seanmars

    Joined:
    Jun 7, 2011
    Posts:
    14
    Hi, is FFmpeg Unity Bind can push data by rtmp?
     
  35. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    This is not media encoding / decoding operation.
    Sending pieces of data or stream can be easily achieved with network engineering.
     
  36. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Dear Unity FFmpeg Community!
    And everyone who may be interested.

    I proud to present you the result of GigaNeo Team hard work.
    Absolutely amazing, brand new product.
    Totally remastered FFmpeg for Unity - FFmpeg Bind 2.
    ffmpeg2.giganeomarket.com



    It has hundreds of big and small features (see product description), improvements, optimization and clean code architecture.

    FFmpeg Bind 2 is written in 5 languages:
    • C - FFmpeg Lib part.
    • C++" - FFmpeg Lib wrapper.
    • Objective-C - IOS Native Part.
    • Java - Android Native Part
    • C# - Unity Cross Platform Part.
    There is a Limited Offer right now at Market Page - you get additional packages from GigaNeo:
    • Video Packer - Video Encoder which allows you convert Sprite Animations into efficient, optimized Video Clip, dramatically reduce build size from unoptimized Textures memory (90%+ size save).
    • GIGA Video Streamer - Real Time Networks protocol to Send and Receive Realtime Picture for Unity. Build can act as a Client or Server - both.
    I would be happy if GigaNeo Team's packages make world better and help You with Your Projects!
    Cheers!
     
    Mr-Mechanical likes this.
  37. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Im making a MAC desktop app with Unity, and i need FFMPEG - can i t work with MAC?
     
    Max-Bot likes this.
  38. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Sure. MAC is under supported platforms in the description.
    Good luck with a project.
    Cheers!
     
  39. Mr-Mechanical

    Mr-Mechanical

    Joined:
    May 31, 2015
    Posts:
    507
    Ffmpeg Bind 2 is very exciting! I have a question: Does FFmpeg Bind 2 support Android API level 21? What is the minimum Android API level required for FFmpeg Bind 2? Thank you so much for providing this amazing plugin for the community.
     
    Max-Bot likes this.
  40. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    If i'm not mistaken, this is also provided As-IS
    People were not happy with support of earlier version, and will be hesistant to buy this one fearing the same old response
     
    ArthurMWM likes this.
  41. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Thank you.
    API level 24.

    Good luck with the project!
     
    Mr-Mechanical likes this.
  42. Yann

    Yann

    Joined:
    Oct 20, 2007
    Posts:
    432
    Hi @Max-Bot and others,

    I purchased FFmpeg Bind 2 from the Unity Asset Store, and have a question about the "System audio" recording capacities that are mentioned both on the product page and in the demo scene.

    When inspecting the RecSystemAudio.cs script, I see it relies on OnAudioFilterRead which only manages Unity's internal audio. And indeed, at least on macOS, the demo scene captures Unity's audio output correctly but totally ignores System audio - which seems logical, since the code doesn't appear to use any low-level native plugin that would really allow capturing the System audio, like in a standard screen recording app.

    I understand that FFmpeg Bind 2 is just a bridge between Unity and ffmpeg, but speaking of "System audio" recording can be quite misleading for potential users who need this feature.

    Or did I miss something ?
     
    jGate99 likes this.
  43. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Hey, FFmpeg Bind 2 records System Audio and Microphone.
    If you need meet some special conditions please modify existing solution or develop custom one.
    Cheers!

    Good luck with the project!
     
    jGate99 likes this.
  44. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,945
    This is why i didnt upgraded to v2.
    A good supportive reply should be providing a sample project that showcase "System Audio" working, this would have gotten you a 5 stars review easily.
     
    Yann likes this.
  45. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Hey @Max-Bot ! I am considering purchasing v2 for my project, but had a quick question:
    Does the asset include everything needed to get started? I read on the FFMpeg website that there might be legal issues with using FFMpeg in a commercial app. If I use v2 and sell my app that uses it, will there be any legal trouble?
    Thanks!
     
    Last edited: May 25, 2021
    Max-Bot likes this.
  46. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Asset includes everything needed to get started. Including Android 64 bit support, as many asked.
    FFmpeg Bind 2 is a library binding directly into Unity Engine.
    It is totally up to you which library version you want to use in your app.
     
  47. jordan-pickett

    jordan-pickett

    Joined:
    Jan 30, 2017
    Posts:
    4
    Hey @Max-Bot! I recently purchased v2 for a project I am working on but am running into some issues. When I build to iOS I get lots of issues:

    upload_2021-5-27_13-14-18.png

    Is there anything extra that needs to be done to ensure that I can build to iOS?
    Thanks!
     
    Max-Bot likes this.
  48. jordan-pickett

    jordan-pickett

    Joined:
    Jan 30, 2017
    Posts:
    4
    Just a follow up in case others were running into the same problem. I was able to resolve my issue by removing timer.h from FFmpegUnityBind2 > Plugins > IOS > include > libavutil
     
    Max-Bot likes this.
  49. v_ribeiro

    v_ribeiro

    Joined:
    Mar 9, 2021
    Posts:
    4
    Its possible to record only one layer/camera and ignore others?

    Thanks.
     
    Max-Bot likes this.
  50. Max-Bot

    Max-Bot

    Joined:
    Sep 25, 2013
    Posts:
    83
    Yes.