wip
This commit is contained in:
parent
e508fb2d05
commit
10358547c9
6 changed files with 130 additions and 49 deletions
|
|
@ -2,13 +2,17 @@
|
|||
|
||||
$argv = $_SERVER['argv'];
|
||||
$self = array_shift( $argv );
|
||||
if ( ( $argv[0] ?? '' ) === '--lie') {
|
||||
$lie = array_shift( $argv );
|
||||
} else {
|
||||
$lie = false;
|
||||
}
|
||||
$base = array_shift( $argv ); // "fmp4"
|
||||
$audio = [];
|
||||
$video = [];
|
||||
|
||||
$audioCodecs = [
|
||||
//'mpeg' => 'mp4a.40.34', // (this seems wrong but it works for now)
|
||||
'mpeg' => 'mp4a.6b', // should work!
|
||||
'mpeg' => 'mp4a.6b', // works but, technically this is for .fmp4 and we're in mp3 raw
|
||||
//'mpeg' => 'mp3', // doesn't seem to work
|
||||
'aac' => 'mp4a.40.2',
|
||||
'opus' => 'opus',
|
||||
|
|
@ -16,33 +20,24 @@ $audioCodecs = [
|
|||
|
||||
// @fixme use correct settings based on the file
|
||||
$videoCodecs = [
|
||||
'vp9' => 'vp09.00.41.08',
|
||||
'vp9' => 'vp09.00.41.08',
|
||||
'h264' => 'avc1.42e00a',
|
||||
|
||||
//'mpeg4' => 'mp4v.20',
|
||||
|
||||
// Lies for desktop safari
|
||||
//'mpeg4' => 'avc1', // lies
|
||||
//'h263' => 'avc1', // lies
|
||||
|
||||
// truths
|
||||
//'mjpeg' => 'jpeg', // works on current mac & iOS 16, but not iOS 10
|
||||
//'h263' => 's263', // fail? or should it be s263?
|
||||
//'mpeg4' => 'mp4v.20.9', // fail?
|
||||
|
||||
// These lies work on current mac & and iOS 16, but not iOS 10
|
||||
//'h263' => 'jpeg', // lies
|
||||
//'mpeg4' => 'jpeg', // lies
|
||||
'mjpeg' => 'jpeg', // works on current mac & iOS 16, but not iOS 10
|
||||
'h263' => 's263', // fail? or should it be s263?
|
||||
'mpeg4' => 'mp4v.20.9', // fail?
|
||||
|
||||
// none of them seem to work on iOS 12!
|
||||
|
||||
// These lies work on iOS 10 and iOS 16 too
|
||||
'mjpeg' => 'avc1.42e00a', // lies
|
||||
'h263' => 'avc1.42e00a', // lies
|
||||
'mpeg4' => 'avc1.42e00a', // lies
|
||||
|
||||
];
|
||||
|
||||
if ( $lie ) {
|
||||
// These lies work on iOS 10 and iOS 16 too
|
||||
$videoCodecs['mjpeg'] = 'avc1.42e00a';
|
||||
$videoCodecs['h263' ] = 'avc1.42e00a';
|
||||
$videoCodecs['mpeg4'] = 'avc1.42e00a';
|
||||
}
|
||||
|
||||
|
||||
while ( count( $argv ) > 0 ) {
|
||||
$track = array_shift( $argv );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue