$wgEnabledTranscodeSet=array(// A high end web streamable ogg video WebVideoTranscode::ENC_OGV_480P,// A web low bandwidth streamable WebM video WebVideoTranscode::ENC_WEBM_360P,// A web streamable WebM video WebVideoTranscode::ENC_WEBM_480P,// A high quality WebM stream WebVideoTranscode::ENC_WEBM_720P,
The beginning of a solution in the file TimedMediaHandler.php:
Extract:
/**
* Default enabled transcodes
*
* -If set to empty array, no derivatives will be created
* -Derivative keys encode settings are defined in WebVideoTranscode.php
*
* -These transcodes are *in addition to* the source file.
* -Only derivatives with smaller width than the source asset size will be created
* -Regardless of source size at least one WebM and Ogg source will be created from the $wgEnabledTranscodeSet
* -Derivative jobs are added to the MediaWiki JobQueue the first time the asset is displayed
* -Derivative should be listed min to max
*/
$wgEnabledTranscodeSet = array(
// Small WebM version for default small embed size thumbs
WebVideoTranscode::ENC_WEBM_360P,
// Ogg fallback for IE/cortado
WebVideoTranscode::ENC_OGV_480P,
// A web streamable WebM video
WebVideoTranscode::ENC_WEBM_480P,
// A high quality WebM stream
WebVideoTranscode::ENC_WEBM_720P,
// A least common denominator h.264 stream; first gen iPhone, iPods, early android etc.
WebVideoTranscode::ENC_H264_320P,
// A mid range h.264 stream; mid range phones and low end tables
WebVideoTranscode::ENC_H264_480P,
/*
// An high quality HD stream; higher end phones, tablets, smart tvs
WebVideoTranscode::ENC_H264_720P,
*/
);
$wgEnabledAudioTranscodeSet = array(
WebVideoTranscode::ENC_OGG_VORBIS,
//opus support must be available in avconv
//WebVideoTranscode::ENC_OGG_OPUS,
//avconv needs libmp3lame support
//WebVideoTranscode::ENC_MP3,
//avconv needs libvo_aacenc support
WebVideoTranscode::ENC_AAC,
);
// If mp4 source assets can be ingested:
$wgTmhEnableMp4Uploads = true;
But even set as above the h.264 and transcoded, this format remains not visible in the choices offered.
Once you change any transcode setting you should clear out all your transcodes. ( see maintenance/cleanupTranscodes.php )
Also you should check that the commands being run will work to generate your mp4 files. i.e run the maintenance/WebVideoJobRunner.php job on the command line and observer the ffmpeg commands being called and confirm they are are successfully being executed.
But even before that isn't there another problem shown by the fact that when I upload an mp4 file it's not readable by TMH: it only gives this message:
For best viewing, using an HTML 5 broswer is recommanded.
even though it is viewed with Firefox.
And I confirm the commands were successfully being executed:
if you click on the direct link in the transcode table to the mp4 can you play that in your browser?
mp4 might only show up if you dont support any of the other encodings. i.e. in Safari.
THANK YOU!
Wish I'd found this hours ago, but I guess I'm more familiar with the extension code than I would have been otherwise, LOL. FWIW, this change is still not rolled into the latest snapshot (currently): version 729afbe of the TimedMediaHandler extension for MediaWiki REL1_21
Looks like this recipe is outdated. Do you know, by any chance, how to force transcoding of existing files to the formats newly added to $wgEnabledTranscodeSet? As of now, Transcoding Status shows only the formats that were set up when the file in question was uploaded. cleanupTranscodes.php only removes transcoded files that are no longer needed.