Ditutup

resize mkv video using Linux script

I have mkv videos (matroska container) which are recordings from TV. Each matroska file contains several sections (video stream, audio stream, some attributes like channel name or similar, and optionally second audio stream with different languate, and optionally subtitles).

I need to transcode (scale, resize) the video stream to smaller screen resolution, preserving all other sections untouched.

I wish to do that in Linux, thus I need a script which will call ffmpeg (or any other encoding program which is freely available) with right parameters, which will accept two arguments:

- argument 1: input - the mkv file full path as a source file

- argument 2: output - the new mkv file full path as a destination where resized video will be written

There are, however, several important requirements:

- the newly created mkv file must preserve all the sections from original matroska file, including all audio tracks and subtitle tracks (if exist), and other infos and tags, etc.

- the newly created mkv file must contain the video stream in half resolution. That is, if the original is 640x480, the new transcoded video will be 320x240. The size of each video is different so this can't be hardcoded, your script must be able to detect the original size and transcode video to the half of it.

- output video stream format will be MPEG2 or MP4

- last, but the most important requirement, the newly created mkv file must keep aspect ratio for all video frames like the original source video. This needs to be explained further:

the source video, as recorded from TV, contains some parts in different aspect ratios than other parts. The best is to provide example, so here is an example video (attached below). As you can see while playing the video, first two seconds of the [url removed, login to view] video are 1024 x 576, which is 16:9, but since the 00:03 seconds, the video is 768 x 576 Pixels (4:3). I believe it has something to do with DAR (display aspect ratio). The output video, scalled down by 50% and encoded by the script you provide, must preserve this behavior.

I believe this will be just few-lines script so I don't expect your bids to be much bigger than the minimum $30.

Thank you

Kemahiran: Linux

Lihat lebih lanjut: resize mkv linux, resize mkv video, linux resize mkv, resize mkv file, mkv resize linux, resize mkv file linux, resize mkv resolution linux, ffmpeg mkv, ffmpeg resize mkv, mkv file linux, ffmpeg mkv mkv, linux mkv resize ffmpeg, resize mkv video file, linux resize mp4 script, linux resize mkv video, linux resize resolution mkv file, mkv video resize, resize mkv, resize video linux, mkv resize video linux, x videos similar, x video, wish tv, best path, 30 second script

Tentang Majikan:
( 67 ulasan ) Sumperk, Czech Republic

ID Projek: #1554511

5 pekerja bebas membida secara purata $134 untuk pekerjaan ini

codymonkey

I have written the script, will attach the resized video in a private message. This automatically recognizes the DAR keeps the aspect ratios as you mentioned over the video: in the example it detects first 2.88 second Lagi

$85 USD dalam 0 hari
(1 Ulasan)
2.4
khushman

Hey, i've resized the video using the necessary script and attached in the PM. Please see that for more details.

$35 USD dalam sehari
(1 Ulasan)
1.0
Nuv21YF8I

Pls check PMB.

$250 USD dalam sehari
(0 Ulasan)
0.0
harry0ma

Hi, Re-sizing by ffmpeg or mencoder pretty easy. I've made a re-sized from your sample (only one line of command, no magic), pls check it here and point out my errors: [url removed, login to view] Lagi

$50 USD dalam sehari
(0 Ulasan)
0.0
MWX16aM3t

Pls check PMB.

$250 USD dalam sehari
(0 Ulasan)
0.0