Skip to content

maropook/flutter-plugin-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ffmpeg_flutter_test

できること

  • dio と http
  • カメラ使った動画,写真撮影
  • ffmpegでの動画編集
  • SpeechToText
  • マイク入力,録音

開発環境

  • OS: macOS Big Sur v11.5.2
$ flutter --version

Flutter 2.6.0-0.0.pre • channel dev •
https://github.com/flutter/flutter.git
Framework • revision 83b9e99cfb (3 weeks ago) • 2021-08-23 19:03:21
+0200
Engine • revision d5adde01dd
Tools • Dart 2.15.0 (build 2.15.0-42.0.dev)

スクリーンショット 2021-09-15 18 41 33スクリーンショット 2021-09-15 19 36 22スクリーンショット 2021-09-15 19 51 40スクリーンショット 2021-09-15 19 31 20 スクリーンショット 2021-09-15 19 31 55スクリーンショット 2021-09-15 19 31 41スクリーンショット 2021-09-15 19 31 07スクリーンショット 2021-09-15 19 31 50


トップページ

以下6つの機能が使える.一覧ページ


【公式サンプル】ffmpeg /flutter_ffmpeg

videoタブでencodeを押すと,assets配下にある画像3つを使って動画を作ってくれる

SUBTITLEタブではassets配下にあるフォントと字幕をstrファイルを合成して字幕付き動画を作ってくれる

  • flutter_ffmpeg
  • video_player_web
  • audioplayers
  • fluttertoast
  • iamge_picker_for_web
  • speech_to_text
  • path_provider
  • path

api 書籍管理 /https,dio

djangoで作った本の情報を管理する自作apiと通信できる

  • provider
  • flutter_slidable
  • dio
  • http
  • geocoding

speechtotext/speech_to_text

しゃべったことをテキストにしてくれる

  • pavatar_glow
  • highlight_text
  • speech_to_text

録音・再生/audio_recoder_2

録音と再生ができる

  • flutter_audio_recoder2
  • audioplayers
  • path_provider

以下実機ビルド必須!

カメラ,写真が撮れる,画像が選べる/camera

撮った写真,アルバム内の写真を選択し,表示させることができる

  • imagepicker
  • provider

動画再生する,録画する/video_player

撮影した動画,またはアルバム内の動画を選択し,表示させれる

  • imagepicker
  • provider
  • camera
  • path
  • path_provider

【公式サンプル】カメラ,動画撮影/camera,video_player

写真と動画が撮れる.フラッシュなど色々オプション付き

  • video_player
  • camera

plugin

flutter_audio_recorderについて

依存関係

  • flutter_audio_recorder
  • audio_players
  • path_provider

改善が必要

時間内に記録する視覚的進歩

録音ボタンへのオーディオピッチアニメーション

別のタイルをテープで貼り付けるときは、他の拡張タイルを閉じる必要がある

オーディオの一時停止および再開機能


エラーメモ

実機ビルド ❯❯ flutter build ios

ios 14以上ではできないと思ったがreleaseにしたらいける

pod install --repo-update

ffmpeg使用

xcodeでframeworkのiosのversionを9.3以上にしておく

any simulator sdk をarm64にしておく

Podfileに以下を追記


def flutter_install_plugin_pods(application_path = nil, relative_symlink_dir, platform)

  application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file)
  raise 'Could not find application path' unless application_path

  symlink_dir = File.expand_path(relative_symlink_dir, application_path)
  system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils.

  symlink_plugins_dir = File.expand_path('plugins', symlink_dir)
  system('mkdir', '-p', symlink_plugins_dir)

  plugins_file = File.join(application_path, '..', '.flutter-plugins-dependencies')
  plugin_pods = flutter_parse_plugins_file(plugins_file, platform)
  plugin_pods.each do |plugin_hash|
    plugin_name = plugin_hash['name']
    plugin_path = plugin_hash['path']
    if (plugin_name && plugin_path)
      symlink = File.join(symlink_plugins_dir, plugin_name)
      File.symlink(plugin_path, symlink)

      if plugin_name == 'flutter_ffmpeg'
        pod 'flutter_ffmpeg/full-gpl-lts', :path => File.join(relative_symlink_dir, 'plugins', plugin_name, platform) #fll-gpl-tlsはffmpegの使いたい種類を追記
      else
        pod plugin_name, :path => File.join(relative_symlink_dir, 'plugins', plugin_name, platform)
      end
    end
  end
end


post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.3'
    end
  end
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
end

release.xconfig


#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"

#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"

debug.xconfig


#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"

xcodeのプロジェクトの名前をユニークにし,teamに自分のappleIDを追加しておく

post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.3' end end installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end end

pod install --repo-update

xcodeでframeworkのiosのversionを9.3にしておく any simulator sdk をarm64にしておく

release.xconfig #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"

debug.xconfig #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"

xcodeのプロジェクトの名前をユニークにしておく

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages