autoEdit 2 Documentation
1.0.6
1.0.6
  • Introduction
  • Overview
    • Intro
      • High-level overview of the parts
      • from 1.0.5 to 1.0.6
      • Project folder structure
    • Support the project
  • Transcriptions
    • Transcriptions intro
    • Transcription json
    • Transcriber
      • audio to video
      • STT sdks
        • IBM Watson STT
        • Gentle STT
        • Pocketsphinx
    • Read metadata
    • Video preview conversion
    • Hypertranscript
  • Papercuts
    • Papercuts
      • Selections
      • Annotations
      • Tags
  • Paper-edit
    • Paper-edit
      • Paper-edit json
      • search-filter
      • drag-and-drop
      • video-preview
  • Export
    • Export
      • EDL export
      • XML export
  • Appendix
    • Dev configuration
    • Deployment/build
      • Deployment/build for Max OS X
      • Deployment / Build for Linux
      • Deployment / Build for Windows
    • Dependencies
    • Current db setup
    • EDL Format
    • Reusable components
    • Prerequisites
    • JQuery and NWJS Packaging
    • Roadmap
      • Paper-editing Roadmap
      • Extra Features Roadmap
      • Future Roadmap
        • Live video editing
        • Social Media Export
        • Translate transcriptions
        • Web app
          • Multi-user collaboration
        • Searchable Editable Archive
        • NLP insights
        • Slack/Chat bot integration
        • Interactive dev tool
        • Phone mms integration with twillio
        • B-roll computational photography
    • Paper-editing Roadmap
    • Testing
    • Updating automated documentation
    • History of autoEdit versions over time
    • ffmpeg and ffprobe in electron
  • Appendix - Data structures
    • IBM Watson json specs
    • Gentle Json transcription specs
    • Pocketsphinx results
    • autoEdit transcription Json
  • QA List
    • QA Intro
    • QA Launch App
    • QA Transcriptions
    • QA Paperedits
    • QA Export
  • Methods
    • Example: Defining Methods
  • Adobe Panel
    • autoEdit Adobe CEP Panel dev setup
    • autoEdit Adobe CEP Panel integration overview
    • Adobe CEP Jsx functions for autoEdit adobe Panel
Powered by GitBook
On this page
  1. Appendix

ffmpeg and ffprobe in electron

using modified version of static ffmpeg /ffprobe lib.

  • github.com:pietrop/ffmpeg-static

    -github.com:pietrop/ffprobe-static

require in config.js and make them avaible to rest of app from there. eg require config to get the path.

static ff has advantage that packages cross platform bin of ffmpeg. which means you could be developeing this app on mac, linux and windows, without ffmpeg on your machine and could still be developing for autoEdit.

in production, we want to remove the versions we don't need. we use the files notation for electron-builder to specify in package.json

that all apps need to have these files. (this might not be needed tho as they are added by default?) Making use of ${os} and ${arch} var provided.

"node_modules/ffmpeg-static/bin/${os}/${arch}/ffmpeg",
"node_modules/ffmpeg-static/index.js",
"node_modules/ffmpeg-static/package.json",
"node_modules/ffprobe-static/bin/${os}/${arch}/ffmpeg",
"node_modules/ffprobe-static/index.js",
"node_modules/ffprobe-static/package.json"

then for each os specific settings, eg for mac we do this, remove the folders for the opposite os.

"mac": {
      "category": "public.app-category.productivity",
      "files": [
        "!node_modules/ffmpeg-static/bin/win${/*}",
        "!node_modules/ffmpeg-static/bin/linux${/*}",
        "!node_modules/ffprobe-static/bin/win${/*}",
        "!node_modules/ffprobe-static/bin/linux${/*}"
      ]
    },

To make use of use of ${os} and ${arch} var provided by electron-builder, we modified the ff github package

  • renames win32 to win. win32 is how the os module detects it, but for the folder structure to be inferable programmaticly by electron-builder files settings, we need to change the name.

  • Similarly for os x, change folder to mac rather then darwin.

Then in index.js we adjust the output of os module to meet electron-builder needs

if(platform == "darwin"){
    platform = "mac";
}else if(platform == "win32"){
    platform = "win";
}

and change rest of code accordingly.

Unrelated, but also added browser in list of platform, because when config, that requries ff path is loaded, if it is detected in browser mode. TODO: test not requirins config.js in browserify, removing this !==browser and see what happens.

PreviousHistory of autoEdit versions over timeNextIBM Watson json specs

Last updated 6 years ago