Ticket #13007: 0001-Handle-.m4v-as-video-mp4.patch

File 0001-Handle-.m4v-as-video-mp4.patch, 1.3 KB (added by pmhahn@…, 2 years ago)

Handle .m4v as video/mp4

  • modules/stream/stream_raw.pl

    From 5c71b5317900428e757d3417f0e4166d65702f6d Mon Sep 17 00:00:00 2001
    From: Philipp Matthias Hahn <pmhahn@pmhahn.de>
    Date: Sat, 4 Mar 2017 12:11:33 +0100
    Subject: [PATCH] Handle .m4v as video/mp4
    
    Strictly speaking mp4 is the *container* format, which can either
    contain auido only or audio+video. Therefore it is quiet commont to name
    audio files .m4a and video files .m4v
    ---
     modules/stream/stream_raw.pl | 4 ++++
     modules/video/stream.php     | 1 +
     2 files changed, 5 insertions(+)
    
    diff --git a/modules/stream/stream_raw.pl b/modules/stream/stream_raw.pl
    index 36c408dd..d1be2ac1 100755
    a b  
    4242        $type   = 'video/mp4';
    4343        $suffix = '.mp4';
    4444    }
     45    elsif ($basename =~ /\.m4v$/) {
     46        $type   = 'video/mp4';
     47        $suffix = '.m4v';
     48    }
    4549    elsif ($basename =~ /\.avi$/) {
    4650        $type   = 'video/x-msvideo';
    4751        $suffix = '.mp4';
  • modules/video/stream.php

    diff --git a/modules/video/stream.php b/modules/video/stream.php
    index 1e7c9261..d7dc0696 100644
    a b  
    2626            $mime = 'video/mpeg';
    2727            break;
    2828        case 'mp4':
     29        case 'm4v':
    2930            $mime = 'video/mp4';
    3031            break;
    3132        case 'ogg':