字幕データ作成に便利なソフトを探してみる。
Subtitle Workshopがよさげか。オープンソースの字幕データ作成支援ソフト。動画をプレビューしながら字幕の表示開始/終了位置を決めて字幕テキストを入力していき、60種類を超える字幕データ形式で保存できる。
Home – Subtitle Workshop
http://subworkshop.sourceforge.net/
最近はウェブ系アプリ中心、あとWindowsアプリちょっと
字幕データ作成に便利なソフトを探してみる。
Subtitle Workshopがよさげか。オープンソースの字幕データ作成支援ソフト。動画をプレビューしながら字幕の表示開始/終了位置を決めて字幕テキストを入力していき、60種類を超える字幕データ形式で保存できる。
Home – Subtitle Workshop
http://subworkshop.sourceforge.net/
日本語トークを含む動画に英語字幕を付けたい。だけど、できれば動画ファイルはいじりたくない。字幕を合成して再エンコードするのは手間なので。
聞きかじったところでは動画プレイヤー自体に機能があるらしいので、著名なプレイヤーの公式サイトで情報収集。
How to enable/use subtitles – What can VLC do? – VideoLAN Wiki
https://wiki.videolan.org/What_can_vlc_do/#How_to_enable.2Fuse_subtitles
Subtitles – VideoLAN Wiki
https://wiki.videolan.org/Subtitle/
字幕ファイルの再生方法 | サポート > FAQ – GOM Player【ゴムプレーヤー】
http://www.gomplayer.jp/player/faq/view.html?intSeq=58
字幕ファイルの作成方法 | サポート > FAQ – GOM Player【ゴムプレーヤー】
http://www.gomplayer.jp/player/faq/view.html?intSeq=57
字幕データを外部ファイルとして用意すれば、動画プレイヤーが重ねて表示してくれるらしい。
字幕データには様々な形式があるが、SubRipがもっともメジャーっぽい。
SubRip – Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/SubRip
字幕の表示開始/終了時刻とテキストを羅列しただけのシンプルなフォーマット。テキストファイルなのでエディタで作成できる。
YouTubeに実際に作成しているスクリーンキャストがあった。
How To Make & Load Subtitles (SRT) for Movies VLC Media Player – YouTube
https://www.youtube.com/watch?v=6YxWm1dkHKk
作業的にはかなりの手間だな。
試しにSubRip形式の字幕データを自作して試してみた。VLCプレイヤーとGOMプレイヤーの両方で字幕が表示できた。技術面ではクリアになったけど、字幕作成の手間をいかに軽減するかが課題だな。
サイトに載せた動画がGalaxyで再生できないとの報告あり。スマホ対応を正式には謳っていないのだけど、このご時勢、ゆくゆくは正式にスマホ対応を謳っていかないとならない。そこでネットでAndroidで再生できるMP4の要件を探してみたのだけど、なかなか見つからない。
やっとそれらしいものが見つかったので覚え書きリンク。
Supported Media Formats | Android Developers
http://developer.android.com/intl/ja/guide/appendix/media-formats.html
あと、Galaxy向けのMP4について書いたサイトがあったので併せてリンク。
How to Play MP4 on Samsung Galaxy S4/S3/S2/Tab/Note/Ace? » TechiSky
http://www.techisky.com/how-to/how-to-play-mp4-on-samsung-galaxy-s4-s3-s2-tab-note-ace.html
Vagrantbox.esからWindows Vista with IE7 (32bit)をゲットして立ち上げたらタイムアウトになった。Windows系のBoxだと、立ち上がりに時間が掛かるのだろう。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'vista-ie7'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: vista-ie7_default_1454528248664_66668 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period. If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the machine. These errors are usually good hints as to what may be wrong. If you're using a custom box, make sure that networking is properly working and you're able to connect to the machine. It is a common problem that networking isn't setup properly in these boxes. Verify that authentication configurations are also setup properly, as well. If the box appears to be booting properly, you may want to increase the timeout ("config.vm.boot_timeout") value. |
タイムアウトを延ばすには、Vagrantfileに以下の設定を追加する。
1 |
config.vm.boot_timeout = 600 |
単位は秒で、デフォルトは300秒。
config.vm – Vagrantfile – Vagrant by HashiCorp
https://www.vagrantup.com/docs/vagrantfile/machine_settings.html
無料版あり。
The World’s Most Popular Video Player | JW Player
http://www.jwplayer.com/
Online Video Player Pricing & Features | JW Player
http://www.jwplayer.com/pricing/
Free $0/yr
NEW: No Watermark!
– 25GB Streaming/month 5GB Storage
– Customization & Branding 9 Pre-Built Skins Social Sharing Related Videos Overlay
– Video Engagement Analytics
– Player & Platform APIs
– Customer Support Online Documentation Community Forums
よく使いそうなので覚え書き。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
// CSS <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"> // JS <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script> <script> $(function() { $( "#datepicker" ).datepicker({ dateFormat: "yy-mm-dd" }); }); </script> // HTML {!! Form::open() !!} ..... <div class="form-group"> {!! Form::label('published_at', 'Published On:', ['class' => 'control-label']) !!} {!! Form::text('published_at', date('Y-m-d'), ['id' => 'datepicker']) !!} </div> {!! Form::submit('Create', ['class' => 'btn btn-primary']) !!} {!! Form::close() !!} |
A Date picker
https://laracasts.com/discuss/channels/general-discussion/a-date-picker
まずはapt-getでインストールを試みたけど失敗。
1 |
$ sudo apt-get install phpmyadmin |
理由は明確。最新のHomesteadはPHP7ベースだけど、UbuntuのデフォルトリポジトリにあるphpMyAdminはPHP5ベースなので、PHPのバージョンが違うというわけ。
仕方ないので、phpMyAdminをGitHubからクローニングする。
1 2 3 |
$ cd ~/Code $ git clone --depth=1 --branch=STABLE https://github.com/phpmyadmin/phpmyadmin.git $ serve phpmyadmin.app /home/vagrant/Code/phpmyadmin |
http://phpmyadmin.app/
phpmyadmin with PHP7
https://laracasts.com/discuss/channels/general-discussion/phpmyadmin-with-php7
Laravel 5.2にIlluminate/HtmlServiceProviderをインストールして使おうとするとエラーが出る。
1 |
Call to undefined method Illuminate\Foundation\Application::bindShared() |
原因はApplicationクラスのメソッド名変更。bindShare()が5.2ではsingleton()に変わっているらしい。故に、以下のページで言及されているけど、$app->bindShare()の呼び出しを$app->singleton()に変更すれば動くみたい。
Call to undefined method Illuminate\Foundation\Application::bindShared()
https://laracasts.com/discuss/channels/laravel/call-to-undefined-method-illuminatefoundationapplicationbindshared
だけど、配布されているレポジトリをカスタマイズして使うのは避けたい。調べたら、5.2対応のHtmlServiceProviderが配布されていた。
Laravel Collective
https://laravelcollective.com/docs/5.2/html
5.2ではこれを使うべし。
1 |
$ composer install |
1 2 |
$ composer update $ composer update monolog/monolog //特定の依存関係だけ |
Packagist
https://packagist.org/
1 |
require __DIR__ . '/vendor/autoload.php'; |
1 |
$ composer dump-autoload |
Command-line interface / Commands – Composer
https://getcomposer.org/doc/03-cli.md
セットアップにComposerを使うPHPプロジェクトが増えてきたので、Composerの基本を押さえておく。
Composer
https://getcomposer.org/
Introduction – Composer
https://getcomposer.org/doc/00-intro.md
想定:
Composerの役割:
Composerの要件:
1 2 3 |
$ curl -sS https://getcomposer.org/installer | php $ sudo mv composer.phar /usr/local/bin/composer $ composer |
Basic usage – Composer
https://getcomposer.org/doc/01-basic-usage.md