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

Ffmpeg 在 Electron 沙盒應(yīng)用程序中被中止

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

問題描述

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

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

我正在嘗試添加一項(xiàng)新功能,該功能將動(dòng)態(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 和一個(gè) ffmpeg的靜態(tài)執(zhí)行.

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

一切都很棒,我已將沙盒應(yīng)用程序上傳到 Apple,但被拒絕了,因?yàn)?ffmpeg 默認(rèn)使用使用非公共 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:

您的應(yīng)用使用或引用以下非公共 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 標(biāo)志自己編譯 ffmpeg.很簡單,我使用與我下載的靜態(tài)構(gòu)建相同的配置來完成它,只需添加新標(biāo)志.

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.

我設(shè)法安裝了所有需要的依賴項(xiàng),除了 libxavs,我猜沒什么大不了的,只需從配置命令中刪除它的標(biāo)志:

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,一切仍按預(yù)期工作.但是,一旦我對應(yīng)用程序進(jìn)行打包、簽名和沙盒化,一旦我嘗試啟動(dòng) ffmpeg 并拋出此錯(cuò)誤,它就會停止工作:

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 標(biāo)志,看看它是否會弄亂某些東西,同樣的結(jié)果.

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

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

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

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

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 個(gè)月左右,而我下載的靜態(tài)安裝是 43 個(gè)月.

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.

我真的被這個(gè)困住了.

推薦答案

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

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

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

I've found my solution thanks to this answer.

顯然,OSX 的動(dòng)態(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,我的構(gòu)建就變成了完全靜態(tài)的并且在沙盒中完美運(yùn)行.

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

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

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

相關(guān)文檔推薦

How to fix BrowserWindow is not a constructor error when creating child window in Electron renderer process(在 Electron 渲染器進(jìn)程中創(chuàng)建子窗口時(shí)如何修復(fù) BrowserWindow 不是構(gòu)造函數(shù)錯(cuò)誤) - IT屋-程序員軟件開發(fā)技術(shù)
mainWindow.loadURL(quot;https://localhost:3000/quot;) show white screen on Electron app(mainWindow.loadURL(https://localhost:3000/) 在 Electron 應(yīng)用程序上顯示白屏)
Electron webContents executeJavaScript : Cannot execute script on second on loadURL(Electron webContents executeJavaScript:無法在第二個(gè) 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?(如何在電子應(yīng)用程序中訪問相機(jī)/網(wǎng)絡(luò)攝像頭?)
主站蜘蛛池模板: 91一区二区三区在线观看 | 日韩亚洲视频在线 | 久久久久久久一区 | 中文字幕一区二区三区不卡在线 | 男女羞羞免费网站 | 日本a级大片 | 国产精品久久久久久久久免费丝袜 | 美女毛片免费看 | 国产在线观看一区二区三区 | 国产精品国产精品国产专区不卡 | 亚洲欧美日韩精品久久亚洲区 | 国产精品毛片一区二区在线看 | 一级片成人 | 91在线视频精品 | 国产一区二区久久久 | 91国产视频在线 | 男人天堂免费在线 | 亚洲欧美日本在线 | 久久国产精品免费视频 | 色综合欧美| 在线一区 | 中文字幕在线一区二区三区 | 国产男女视频 | 日韩二 | 蜜桃黄网 | 无码一区二区三区视频 | 免费视频99| 亚洲欧美视频 | 日韩视频免费看 | 99精品久久久久久中文字幕 | 成人不卡 | 男女啪啪网址 | 婷婷久 | 国产不卡视频在线 | 午夜爽爽男女免费观看hd | 久久精品国产一区二区电影 | 精品伊人 | 国产精品久久国产精品 | 在线精品国产 | 亚洲一区二区三区在线视频 | 麻豆国产一区二区三区四区 |