久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Ffmpeg 在 Electron 沙盒應用程序中被中止

Ffmpeg gets aborted in an Electron sandboxed application(Ffmpeg 在 Electron 沙盒應用程序中被中止)
本文介紹了Ffmpeg 在 Electron 沙盒應用程序中被中止的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個 Electron 應用,在 Mac AppStore 上發(fā)布,并且是沙盒的.

I have an Electron app, published on the Mac AppStore, and sandboxed.

我正在嘗試添加一項新功能,該功能將動態(tài)編碼/解碼視頻,以便我可以在 Electron 上下文中流式傳輸更多視頻格式.

I'm trying to add a new feature that will encode/decode videos on the fly so I can stream more video formats in an Electron context.

我正在使用 fluent-ffmpeg 和一個 ffmpeg的靜態(tài)執(zhí)行.

I'm using fluent-ffmpeg and a static exec of ffmpeg.

一切都很棒,我已將沙盒應用程序上傳到 Apple,但被拒絕了,因為 ffmpeg 默認使用使用非公共 API 的安全傳輸協(xié)議,這是他們發(fā)送給我的拒絕信息:

Everything works awesomely, I've uploaded the sandboxed app to Apple, and got rejected because ffmpeg is using by default a secure transport protocol which is using non-public API, this is what they've sent me with the rejection:

您的應用使用或引用以下非公共 API:

Your app uses or references the following non-public API(s):

'/System/Library/Frameworks/Security.framework/Versions/A/Security'

'/System/Library/Frameworks/Security.framework/Versions/A/Security'

: SecIdentityCreate

: SecIdentityCreate

好的,經(jīng)過大量調(diào)查,看來我必須使用 --disable-securetransport 標志自己編譯 ffmpeg.很簡單,我使用與我下載的靜態(tài)構建相同的配置來完成它,只需添加新標志.

Alright, after much investigation, it appears that I have to compile ffmpeg myself with a --disable-securetransport flag. Easy enough, I do it using the same config as the static build I've downloaded simply adding the new flag.

我設法安裝了所有需要的依賴項,除了 libxavs,我猜沒什么大不了的,只需從配置命令中刪除它的標志:

I manage to install every dependencies needed, except libxavs, no big deal I guess and simply remove its flag from the configure command:

./configure 
--cc=/usr/bin/clang 
--prefix=/opt/ffmpeg 
--extra-version=tessus 
--enable-avisynth 
--enable-fontconfig 
--enable-gpl 
--enable-libass 
--enable-libbluray 
--enable-libfreetype 
--enable-libgsm 
--enable-libmodplug 
--enable-libmp3lame 
--enable-libopencore-amrnb 
--enable-libopencore-amrwb 
--enable-libopus 
--enable-libsnappy 
--enable-libsoxr 
--enable-libspeex 
--enable-libtheora 
--enable-libvidstab 
--enable-libvo-amrwbenc 
--enable-libvorbis 
--enable-libvpx 
--enable-libwavpack 
--enable-libx264 
--enable-libx265 
--enable-libxvid 
--enable-libzmq 
--enable-libzvbi 
--enable-version3 
--pkg-config-flags=--static 
--disable-securetransport 
--disable-ffplay

使用新的 ffmpeg exec,一切仍按預期工作.但是,一旦我對應用程序進行打包、簽名和沙盒化,一旦我嘗試啟動 ffmpeg 并拋出此錯誤,它就會停止工作:

With the new ffmpeg exec, everything still works as expected. But once I'm packaging, signing and sandboxing the app, ffmpeg stops working as soon as I try to launch it throwing this error:

An error occurred ffmpeg was killed with signal SIGABRT Error: ffmpeg was killed with signal SIGABRT
    at ChildProcess.eval (webpack:///../node_modules/fluent-ffmpeg/lib/processor.js?:180:22)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

我試圖刪除 --disable-securetransport 標志,看看它是否會弄亂某些東西,同樣的結果.

I've tried to remove the --disable-securetransport flag, see if it could have messed with something, same result.

我嘗試在 Linux 機器上編譯,只是想看看它是否有幫助,同樣的事情.

I've tried to compile on a Linux machine, just to see if it could help, same thing.

一旦我使用自定義編譯的 exec,它就不能在沙箱中工作,但是當使用靜態(tài)的時,一切正常(在我 xattr 之后,因為 它在沙盒中被隔離和阻止).

As soon as I'm using my custom compiled exec it doesn't work in the sandbox, but when using the static one, everything is ok (after I xattr it, because it's quarantined and blocked in sandbox).

我注意到的唯一一件奇怪的事情是我的自定義編譯只有 20 個月左右,而我下載的靜態(tài)安裝是 43 個月.

The only thing I've noticed that seems odd is that my custom compilation is only 20mo or so, when the static install I've downloaded is 43mo.

我真的被這個困住了.

推薦答案

所以我終于能夠編譯我的靜態(tài) ffmpeg 可執(zhí)行文件了.

So I finally was able to compile my static ffmpeg executable.

感謝這個答案,我找到了我的解決方案.

I've found my solution thanks to this answer.

顯然,OSX 的動態(tài)庫位于 /usr/local/bin 中,它們優(yōu)先于其他所有內(nèi)容.因此,即使您嘗試將 ffmpeg 編譯為靜態(tài)的,它也無法與這些庫一起使用.

Apparently, OSX has dynamic libraries located in /usr/local/bin which take precedence over everything else. So even if you try to compile your ffmpeg to be static, it won't work with these libraries on the way.

一旦我刪除了所有這些 /usr/local/bin/*.dylib,我的構建就變成了完全靜態(tài)的并且在沙盒中完美運行.

Once I've removed all those /usr/local/bin/*.dylib my build became fully static and worked perfectly in the sandbox.

這篇關于Ffmpeg 在 Electron 沙盒應用程序中被中止的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

How to fix BrowserWindow is not a constructor error when creating child window in Electron renderer process(在 Electron 渲染器進程中創(chuàng)建子窗口時如何修復 BrowserWindow 不是構造函數(shù)錯誤) - IT屋-程序員軟件開發(fā)技術
mainWindow.loadURL(quot;https://localhost:3000/quot;) show white screen on Electron app(mainWindow.loadURL(https://localhost:3000/) 在 Electron 應用程序上顯示白屏)
Electron webContents executeJavaScript : Cannot execute script on second on loadURL(Electron webContents executeJavaScript:無法在第二個 loadURL 上執(zhí)行腳本)
how to use electron browser window inside components in angular-cli?(如何在angular-cli的組件內(nèi)使用電子瀏覽器窗口?)
ElectronJS - sharing redux store between windows?(ElectronJS - 在 Windows 之間共享 redux 存儲?)
How to access camera/webcamera inside electron app?(如何在電子應用程序中訪問相機/網(wǎng)絡攝像頭?)
主站蜘蛛池模板: 欧美区在线 | 91精品久久久久久久99 | 一级毛片免费看 | 伊人春色在线 | 久久精品一区二区 | 国产精品大全 | 日本一二三区在线观看 | 国产91丝袜在线播放 | 欧美一二三| a黄视频 | 99精品国产成人一区二区 | 在线日韩精品视频 | 欧美精品一区三区 | 91久久久久久久久久久 | 国产免费一区二区 | 欧美日韩精品一区二区 | www.日韩系列 | 久久av在线播放 | 久色激情 | 一区二区三区欧美 | 亚洲精品女人久久久 | 成人福利影院 | 欧美 日韩 国产 成人 在线 | 国产欧美精品一区二区 | 国产高清视频一区 | 欧美精品一区二区三区四区 | 日本精品免费在线观看 | 伊人中文字幕 | 免费一区 | 国产精品免费一区二区三区四区 | 亚洲精品久久视频 | 欧美专区在线观看 | 欧美性jizz18性欧美 | 岛国午夜 | 久久这里只有精品首页 | 91av亚洲 | 一区二区三区免费 | 日韩精品一区二区三区久久 | 香蕉久久久久久 | 黄色国产视频 | 亚州毛片|