এক্সটেনশন:টাইমডমিডিয়াহ্যান্ডেলার

From mediawiki.org
This page is a translated version of the page Extension:TimedMediaHandler and the translation is 66% complete.
Outdated translations are marked like this.
মিডিয়াউইকি এক্সটেনশন ম্যানুয়াল
TimedMediaHandler
মুক্তির অবস্থা: স্থিতিশীল
বাস্তবায়ন মিডিয়া, এপিআই
বিবরণ সার্ভার সাইড ট্রান্সকোডিং, WebM, Ogg Theora, Vorbis, MP3, Speex এবং টাইমড টেক্সটের জন্য সমন্বিত সমর্থন প্রদান করে
লেখক(গণ) Michael Dale, Jan Gerber, Tim Starling, James Heinrich, Brooke Vibber, Derk-Jan Hartman
সর্বশেষ সংস্করণ 0.6.0
সমর্থন নীতি Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki >= 1.42
ডাটাবেজ পরিবর্তন হ্যাঁ
সারণি transcode
লাইসেন্স গ্নু জেনারেল পাবলিক লাইসেন্স ২.০ অথবা পরবর্তী
ডাউনলোড
  • $wgMediaAudioTypes
  • $wgMediaVideoTypes
  • $wgWaitTimeForTranscodeReset
  • $wgTmhEnableMp4Uploads
  • $wgUseFFmpeg2
  • $wgEnableTranscode
  • $wgTranscodeSoftSizeLimit
  • $wgTmhPriorityResolutionThreshold
  • $wgFFmpegVP9RowMT
  • $wgEnableIframeEmbed
  • $wgParserTestMediaHandlers
  • $wgTranscodeBackgroundSizeLimit
  • $wgTranscodeBackgroundTimeLimit
  • $wgEnabledAudioTranscodeSet
  • $wgTmhSoundfontLocation
  • $wgEnabledTranscodeSet
  • $wgMinimumVideoPlayerSize
  • $wgFFmpegThreads
  • $wgTmhFluidsynthLocation
  • $wgTranscodeBackgroundMemoryLimit
  • $wgTmhFileExtensions
  • $wgFFmpegLocation
  • $wgTmhPriorityLengthThreshold
  • $wgTimedTextForeignNamespaces
  • $wgTimedTextNS
  • transcode-reset
  • transcode-status
Quarterly downloads 225 (Ranked 29th)
Public wikis using 1,290 (Ranked 218th)
Translate the TimedMediaHandler extension if it is available at translatewiki.net
Issues Open tasks · বাগ প্রতিবেদন

টাইমডমিডিয়াহ্যান্ডেলার'' এক্সটেনশনটি আপনাকে ছবি ফাইলগুলির মতো একই সিনট্যাক্স ব্যবহার করে উইকি পৃষ্ঠাগুলিতে অডিও এবং ভিডিও ফাইলগুলি প্রদর্শন করতে দেয়। এখানে আছে ভিডিওজেএস প্লেয়ার। সাবটাইটেল এবং ক্যাপশন (ওরফে টাইমড টেক্সট) এবং একাধিক WebM এবং অন্যান্য ডেরিভেটিভ এবং অন্যান্য অনেক বৈশিষ্ট্যের মধ্যে রিয়েল টাইম স্ট্রিম স্যুইচিং এর জন্য সমর্থন রয়েছে। TMH সার্ভার সাইড সাপোর্টের মধ্যে রয়েছে HTML5 অডিও এবং ভিডিও আপলোড করার বিকল্প, বিষয়বস্তু সরবরাহের জন্য একাধিক ট্রান্সকোড প্রোফাইল, MIDI ফাইলের প্লেব্যাক, Ogg এবং WebM ভিডিওগুলির জন্য মেটাডেটা পার্সিং এবং জবস (চাকরি) ট্রান্সকোডিং শিডিউল করার জন্য মিডিয়াউইকি এর কাজের সারি সিস্টেমের সাথে একীকরণ।

২০২২ সালে নতুন এবং আসন্ন উন্নয়নের জন্য, এক্সটেনশন:টাইমডমিডিয়াহ্যান্ডেলার/২০২২ কাজ দেখুন।

অনুগ্রহ করে মনে রাখবেন টাইমডমিডিয়াহ্যান্ডেলার বর্তমানে PostgreSQL এর সাথে কাজ করে না। দেখুন task T157424


বিশিষ্ট ওভারভিউ

প্লেয়ারের জন্য দেখুন: ভিডিওজেএস প্লেয়ার

সাবটাইটেলিং সিস্টেমের বৈশিষ্ট্যের জন্য, কমন্স:Timed Text পৃষ্ঠা দেখুন।

সিনট্যাক্স সারসংক্ষেপ

In addition to the image embed syntax, Timed Media Handler supports:

[[File:Video.ogv]]
Display a video at its nominal size. Displays a still image from the midpoint with a play button to start an embedded player.
[[File:Audio.oga]]
Show a placeholder for a sound file, with a play button to start an embedded player.
[[File:Midi.mid]]
Generate digital audio from the music instructions in the MIDI file, and show the embedded audio player to play this audio.
[[File:Video.ogv|thumb]]
Show a video in a floating thumbnail box <gallery>File:Video.ogv</gallery>
Show a video embedded in an image gallery (each clip will popup a dialog for the full player)
[[File:Video.ogg|thumbtime=1:25]]
Use a frame from 1 minute 25 seconds into the video as the placeholder image. A single number is taken as an offset in seconds. One can also use HH:MM:SS, e.g. 1:02:22 will be 1 hour, 2 minutes, and 22 seconds into the video. Floating-point seconds are supported (but broken on Wikimedia wikis: phab:T228467).
[[File:Video.ogg|start=1:25]]
Temporal media fragments displays a video clip starting at 1 minute 25 seconds into the video. A single number is taken as an offset in seconds. You can also include an end time of the form end=1:30 which would result in a clip of 5 seconds playing from 1:25 to 1:30. If thumbtime is not provided, the start time will be used for the displayed thumbnail. One can also use HH:MM:SS, e.g. 1:02:22 will be 1 hour, 2 minutes, and 22 seconds into the video.
start= and end= can also be used as query parameters in the URL for a video's file page.
[[File:Video.ogg|muted]]
Start the media with muted audio. (introduced in 1.39)
[[File:Video.ogg|loop]]
Loop the video continuously. (introduced in 1.39)
Deprecated
The syntax words noicon and noplayer are deprecated and do not function. The keyword disablecontrols will likely be deprecated. (See task T135537) It takes a comma-separated list of any of the following values: options, timedText, fullscreen


Client support

ভিডিও প্লেয়ারের উদাহরণ
অডিও প্লেয়ারের উদাহরণ

[[File:Videoonwikipedia.ogv|300px|thumb|...]]
[[File:example.ogg|thumb|...]]
[[File:example.ogg|30px]]
[[File:example.ogg]]

The player works on most modern browsers (see MediaWiki's support matrix). Mobile support is spotty, especially on iOS.

TimedMediaHandler includes a JavaScript compatibility shim for Ogg audio/video that works in Safari, Internet Explorer 10/11, and Microsoft Edge browsers.

Third-party users of MediaWiki may also wish to manually enable MP4 H.264/AAC support for native video and audio playback in Safari/IE/Edge, but when using these formats you may need a patent license from MPEG-LA for internet broadcasting.

ইনস্টলকরণ

You will want a recent version of ffmpeg in order to support encoding to WebM (with the latest version of VP9).

  • ডাউনলোড করুন এবং আপনার extensions/ ফোল্ডারের TimedMediaHandler নামক ডিরেক্টরিতে ফাইল(গুলি) নিন।
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/TimedMediaHandler
  • Only when installing from Git, run Composer to install PHP dependencies, by issuing composer install --no-dev in the extension directory. (See task T173141 for potential complications.)
  • আপনার LocalSettings.php -এর নিচের অংশে নিম্নলিখিত কোড যোগ করুন:
    wfLoadExtension( 'TimedMediaHandler' );
    $wgFFmpegLocation = '/usr/bin/ffmpeg'; // Most common ffmpeg path on Linux
    
  • হালনাগাদ করার স্ক্রিপ্টটি চালান যা স্বয়ংক্রিয়ভাবে এই এক্সটেনশনের জন্য প্রয়োজনীয় ডাটাবেস টেবিল তৈরি করবে।
  • Configure as required.
  • You may need to increase the allowed memory in $wgMaxShellMemory .
  • Yes করা হয়েছে – এক্সটেনশনটি সফলভাবে ইনস্টল করা হয়েছে কিনা তা যাচাই করতে আপনার উইকির Special:Version-এ যান।

The extension will automatically add supported file types (except for mp4) to $wgFileExtensions , so you do not need to manually add video file types.

After downloading this extension, please note that it requires Composer .

So, after installation change to the directory containing the extension e.g. "../extensions/TimedMediaHandler/" and run composer install --no-dev, or when updating: composer update --no-dev.

Alternatively as well as preferably add the line "extensions/TimedMediaHandler/composer.json" to the "composer.local.json" file in the root directory of your wiki like e.g.

{
	"extra": {
		"merge-plugin": {
			"include": [
				"extensions/TimedMediaHandler/composer.json"
			]
		}
	}
}

উইকিপিডিয়া মিডিয়া এনকোডিং বিকল্পগুলির তুলনা

২০১৮ সালের হিসাবে, উইকিমিডিয়া সাইটগুলি VP9 ব্যবহার করে।

ব্যান্ডউইথ স্তর অনুসারে সাজানো:

বিটরেট এমবিট/সে WebM VP8 WebM VP9
ভীষণ কম 0.08 160p
খুব কম 0.16 160p 240p
কম 0.25 240p 360p
মাঝারি 0.5 360p 480p
মোটামুটি 1.0 480p 720p
বেশি 2.0 720p 1080p
খুব বেশি 4.0 1080p 1440p
ভীষণ বেশি 8.0 2160p

বিস্তারিত বিকল্প

নাম 160P 240P 360P 480P 720P 1080P 160P 240P 360P 480P 720P 1080P 1440P 2160P
ধারক WebM
ভিডিও এনকোডিং VP8 VP9
সর্বোচ্চ প্রস্থ ' (পিক্সেল) 288 426 640 854 1280 1920 288 426 640 854 1280 1920 2560 4096
সর্বোচ্চ উচ্চতা' (পিক্সেল) 160 240 360 480 720 1080 160 240 360 480 720 1080 1440 2160
বিটরেট (Mbit/s) 0.16 0.25 0.5 1.0 2.0 4.0 0.08 0.16 0.25 0.5 1.0 2.0 4.0 8.0
অডিও এনকোডিং Vorbis Opus
চ্যানেল 2 (stereo) (pass-through)
নমুনা রেট (Hz) 44100 48000
গুণমান - 1 2 3 - (default)

কনফিগারেশন

এই বিভাগটি পুরানো - আমাকে হালনাগাদ করুন

এখানে কিছু কনফিগারেশন ভেরিয়েবল রয়েছে যা দরকারী হতে পারে:

// The minimum size for an embed video player (smaller than this size uses a pop-up player).
$wgMinimumVideoPlayerSize = 200;

// If transcoding is enabled for this wiki (if disabled, no transcode jobs are added and no transcode status is displayed).
// Note if remote embedding an asset we will still check if the remote repo has transcoding enabled and associated flavors
// for that media embed.
$wgEnableTranscode = true;

// The total amout of time a transcoding shell command can take:
$wgTranscodeBackgroundTimeLimit = 3600 * 8;
// KB-তে ট্রান্সকোডিং প্রক্রিয়ার জন্য সর্বাধিক পরিমাণ ভার্চুয়াল মেমরি উপলব্ধ
$wgTranscodeBackgroundMemoryLimit = 2 * 1024 * 1024; // 2GB avconv, ffmpeg2theora mmap resources so virtual memory needs to be high enough
// Maximum file size transcoding processes can create, in KB
$wgTranscodeBackgroundSizeLimit = 3 * 1024 * 1024; // 3GB

// Number of threads to use in avconv for transcoding
$wgFFmpegThreads = 1;

// The NS for TimedText (registered on MediaWiki.org)
// https://www.mediawiki.org/wiki/Extension_namespace_registration
// Note commons pre-dates TimedMediaHandler and should set $wgTimedTextNS = 102 in LocalSettings.php
$wgTimedTextNS = 710;

// Set TimedText namespace for ForeignDBViaLBRepo on a per wikiID basis
// $wgTimedTextForeignNamespaces = [ 'commonswiki' => 102 ];
$wgTimedTextForeignNamespaces = [];

/**
* 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 uploaded
* -Derivative should be listed min to max
*/
// Starting from 1.31
// All valid string values are listed in the extension's extension.json file 
$wgEnabledTranscodeSet = [
    '160p.webm' => true,
    '240p.webm' => true,
    '360p.webm' => true,
    '480p.webm' => true,
    '720p.webm' => true,
    '1080p.webm' => true,
];

$wgEnabledAudioTranscodeSet = [
	'ogg' => true,   // ogg+vorbis
	'opus' => false, // ogg+opus
	'mp3' => true,   // raw mp3
	'm4a' => false,  // mp4+aac (mp4a.40.5)
];

// If mp3 source assets can be ingested:
$wgTmhEnableMp3Uploads = true;

// If mp4 source assets can be ingested:
$wgTmhEnableMp4Uploads = false;

// If you use ffmpeg 2 can be set it to true
$wgUseFFmpeg2 = false;

ট্রান্সকোডিংয়ের জন্য, নিশ্চিত করুন যে আপনার কাছে $wgMaxShellMemory, $wgMaxShellTime, $wgMaxShellFileSize যথেষ্ট বড় যাতে এনকোডিং কাজগুলি চালানোর এবং আউটপুট সংরক্ষণ করার অনুমতি দেয়৷ ডিফল্ট মান সম্ভবত খুব কম।

ট্রান্সকোড কাজ চলছে

যেহেতু ট্রান্সকোড কাজগুলি সম্পদ নিবিড়, সেগুলি স্বাভাবিক কাজের সারির অংশ হিসাবে চলবে না (task T29336 দেখুন) পরিবর্তে তাদের অবশ্যই --type আর্গুমেন্ট দ্বারা অনুরোধ করতে হবে:

php maintenance/runJobs.php --type webVideoTranscode

যদি এই কমান্ডটি চালানোর ফলে এটি চিরতরে আটকে যায়, তাহলে আপনাকে LocalSettings.php এ $wgTranscodeBackgroundTimeLimit = 0; সেট করতে হতে পারে। দেখুন task T206957

এনকোডিং নোড

অনেক ভিডিও ট্রান্সকোড করতে সক্ষম হওয়ার জন্য আপনি একাধিক এনকোডিং নোড চালাতে চাইতে পারেন যা মাস্টার ডিবি-তে সংযোগ করে এবং সরাসরি আপনার ফাইল স্টোর অ্যাক্সেস করে। আপনাকে ffmpeg ইনস্টল করতে হবে।

ডেবিয়ান এবং উবুন্টুর অধীনে ন্যূনতম ইনস্টলেশন

apt install ffmpeg

এছাড়াও, এটিকে আপনার LocalSettings.php এ যোগ করুন (শুধুমাত্র Devuan ASCII (Archived 2018-09-23 at the Wayback Machine) এর জন্য পরীক্ষা করা হয়েছে):

$wgFFmpegLocation = '/usr/bin/ffmpeg';


সমস্যা সমাধান

এই বিভাগের সম্প্রসারণ প্রয়োজন
ffmpeg – ভাগ করা বস্তু থেকে অংশ আঁক করতে ব্যর্থ হয়েছে
আপনাকে $wgMaxShellMemory এ অনুমোদিত মেমরি বাড়াতে হবে।
ক্লাস 'getID3' পাওয়া যায়নি
আপনাকে কম্পোজার ব্যবহার করে এক্সটেনশনের পিএইচপি নির্ভরতা ইনস্টল করতে হবে, ইনস্টলেশন বিভাগ দেখুন।
অচেনা বিকল্প 'max_muxing_queue_size'
আপনি ffmpeg ২ ব্যবহার করছেন। আপনার LocalSettings.php এর সাথে আপনার $wgUseFFmpeg2 = true; যোগ করতে হবে।
অচেনা বিকল্প 'max_muxing_queue_size'
আপনি সম্ভবত ffmpeg ২ ব্যবহার করছেন। আপনার LocalSettings.php এর সাথে আপনার $wgUseFFmpeg2 = true; যোগ করতে হবে।
[exception] […] /index.php?title=Special:Upload Error: Call to undefined method FSFile::getLocalRefPath()
এই এক্সটেনশনটি Extension:EmbedVideo এর সাথে বেমানান। এটি আনইনস্টল করুন। আপনি সঠিকভাবে composer ধাপগুলি করেছেন তাও নিশ্চিত করতে হবে।