LoginSignup
0

More than 1 year has passed since last update.

posted at

DirCaster をmp4対応にする。

podcastで mp4形式を 使いたくなったので Dircaster を 改修した ときのメモ

dircaster.php
        switch (strrchr(strtolower($file), ".")) {
          ----
          case ".m4a";
          case ".mp4";
            $tit = @$ThisFileInfo['quicktime']['comments']['title'][0]; // artist from any/all available tag formats
            $alb = @$ThisFileInfo['quicktime']['comments']['album'][0]; // artist from any/all available tag formats
            $art = @$ThisFileInfo['quicktime']['comments']['artist'][0]; // artist from any/all available tag formats
            $com = @$ThisFileInfo['quicktime']['comments']['comment'][0]; // artist from any/all available tag formats
            $cmp = @$ThisFileInfo['quicktime']['comments']['writer'][0]; // artist from any/all available tag formats

と .m4a の case 文のつぎの行に .mp4 を 追加する。

config_inc.php
  // Allowed File Types (file extensions) in Feed URL, make sure your type is listed
  $sftypes = "(.mp3 .aac .m4a .mp4 .asf .wma .wav .avi .mov .m4b .m4v)";

設定ファイルの 対象ファイルに .mp4 を 追加する。

これだけです。

RSSフィードに アクセスして ファイルのURLが 表示されていることを 確認したあと
posdcastツールで 読み込んで再生できることを確認。
mp4 が 配信できるようになりました。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
0