Recherche avancée

Médias (1)

Mot : - Tags -/copyleft

Autres articles (68)

Sur d’autres sites (11230)

  • ClickOnce Deployment looking for manifest signature on an nuget sourced .exe (FFMPEG #) as if it is a .csproj output. Deployment fails

    9 octobre 2019, par M_Ryce

    I have a C# forms app which utilizes the nuget package "FFMPEG Sharp" (Nuget Github) to generate video from a sequence of images.

    Unlike most nuget packages which simply pull in a .dll, installing FFMPEG Sharp places an "FFMPEG" folder into the .csproj root directory, in addition to bringing the appropriate .dll into "packages"

    Inside this folder are a few FFMPEG artifacts and a /bin folder containing FFMPEG executables. According to the project’s Github readme, this /bin directory needs to be specified in the app.config.

    From Github Readme example :

    <appsettings>
     <add key="ffmpegRoot" value="C:\ffmpeg\bin\"></add>
    </appsettings>`

    Adjusting the above to work in alignment with the default location Nuget placed the dependency artifacts :

    <appsettings>
     <add key="ffmpegRoot" value="..\..\FFMPEG\bin"></add>
    </appsettings>`

    Everything related to this dev effort has been smooth sailing, until I tried to utilize the existing Clickonce deployment for the app. The FFMPEG folder in my .csproj root wasn’t making it to the build output and therefore the application’s call to the FFMPEG .exe was throwing a null reference error. Understandable result, given that I had not set up any method of ensuring the FFMPEG artifacts made it to the build output with the same folder structure as existed on my local dev box.

    To counter this, I set a POST-build command to XCOPY....

    XCOPY "$(SolutionDir)MyApp\FFMPEG" "$(TargetDir)FFMPEG" /S /Y /I

    ...the nuget-provisioned FFMPEG artifacts into the build output root, and adjusted the config setting accordingly (see below)

    <appsettings>
     <add key="ffmpegRoot" value=".\FFMPEG\bin"></add>
    </appsettings>`

    This worked like a dream when building/running locally. The XCOPY succeeded in placing FFMPEG folder contents into the compiled solution’s Debug/Release bin and the updated config referenced them. No errors.

    Attempting to deploy with the .NET ClickOnce tool has created a rather befuddling error though.

    (Apologies for formatting ugliness below. I tried but didn’t succeed. The important parts are in bold)

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    Activation of https://MySite/MyApp/Install/MyApp.application resulted in exception. Following failure messages were detected :
    + Downloading https://MySite/MyApp/Install/Application Files/MyApp/FFMPEG/bin/x86/ffmpeg.exe.deploy did not succeed.
    + The remote server returned an error : (404) Not Found.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.
    WARNINGS
    The manifest for this application does not have a signature. Signature validation will be ignored.
    * The manifest for this application does not have a signature. Signature validation will be ignored.
    OPERATION PROGRESS STATUS
    * [10/8/2019 2:03:37 PM] : Activation of https://MySite/MyApp/Install/MyApp.application has started.
    * [10/8/2019 2:03:37 PM] : Processing of deployment manifest has successfully completed.
    * [10/8/2019 2:03:37 PM] : Installation of the application has started.
    * [10/8/2019 2:03:37 PM] : Processing of application manifest has successfully completed.
    * [10/8/2019 2:03:40 PM] : Found compatible runtime version 4.0.30319.
    * [10/8/2019 2:03:40 PM] : Request of trust and detection of platform is complete.
    ERROR DETAILS
    Following errors were detected during this operation.
    * [10/8/2019 2:03:40 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
    - Downloading https://MySite/MyApp/Install/Application Files/MyApp/FFMPEG/bin/x86/ffmpeg.exe.deploy did not succeed.*

    ...

    My interpretation of this is that the ClickOnce deployment is treating the Nuget-sourced .exe’s as if they are compiled code from this very project, and checking for a signed manifest.

    This ClickOnce deployment was not set up by me, and had not needed to account for such external artifacts existing in the output previously. I do not believe turning off signed assemblies is an option for me, for security reasons.

    Is there a way to make ClickOnce deployments ignore a specific .exe when checking for signed manifests ? I think the "correct" intended usage is for FFMPEG to be pre-installed on the machine as a stand-alone application, but This is not an option for me at this time. I will need FFMPEG to be brought in by the ClickOnce.

  • How to add overlay image on Video in Android and remove it after certain time interval ?

    19 août 2018, par Alok Gupta

    I have been working on an Android app where I need to display an image (which is basically a Summary of the video) on the video. So, when we play video an Image will be displayed for 5 seconds and then video will start playing.

    I am using FFMPEG for this (I am a very beginner to it). I have identified how to add overlay image on video and below is the code that I am using, but somehow it is not giving me correct results. Please refer to the code that I have currently :

    String[] cmd = new String[]{"-i", finalVideoPath, "-stream_loop", "1", "-t", "15", "-i", summaryImagePath,
               "-filter_complex", "[1:v]format=rgba,fade=in:st=1:d=1:alpha=1,fade=out:st=6:d=1:alpha=1 [ovr]; [0][ovr] overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2",
               "-preset", "ultrafast", "-acodec", "copy", "-map", "0:a?", finalOutputVideo};

    I am expecting that the command that I wrote above will :
    1. Open the video and will pick up the image and apply on it for sometime.
    2. The image will fade out after sometime (given in st and d parameters.
    3. Image will come centered on the screen.

    The output is exact opposite :
    What happens is - The video is overlaid on the image, the video gets hidden after a few seconds (whereas it should be opposite). I tried replacing the values of image and video in the command but started getting error.

    Can someone guide me here. I would really be Thankful.

  • Video processing / playback with alpha channel in C# or C++ [closed]

    2 avril 2013, par Corylulu

    WHAT I'M AFTER

    I've been exploring the best ways to do this, but seem to keep running into hiccups when trying to playback video and then grab the frame with an alpha channel (ARGB) to then be further manipulated.

    I've gotten everything to work with AForge to then find out that the Alpha gets stripped out during the process. I considered OpenCV, but the Emgu CV has a different license that I can't use and I can't verify that OpenCV can read Alpha channels as well.

    I looked into FFMPEG .NET wrappers, but haven't found any that are out of their alpha phase or have a license I can use them with (since this could be used for commercial purposes and can't be open sourced)

    So I'm looking for a library that is preferably C# or C++ that can play a .MOV or .AVI while preserving it's alpha channel when I make it into a Bitmap.

    SUMMARY [TL ;DR]

    I'm looking for library / sample code

    • Written preferably in C#, C++ as a fallback. Hopefully easy enough to use.
    • Can playback AVI and MOV files
    • Will preserve the alpha channel
    • Will allow me to access each frame's ARGB values directly
    • Preferably something that uses the FFMPEG library since it's able to read most formats I need