W
W
WEBIVAN2013-08-25 21:05:18
Video
WEBIVAN, 2013-08-25 21:05:18

How to compress the video on the server?

Actually there is a server on Centos, on it there is a video in xvid, which I want to compress in 360p in order to view (I am now out of town and the Internet is slow and expensive here in order to download the original)
How can I compress the video in xvid / h264 / x264 or something else not particularly bulky but normal in quality?
I would be very grateful immediately for the command in the console which to do this.
Video parameters:
Video: Xvid 704x400 25fps 1500kbps
Audio: Dolby AC3 48000Hz stereo 192kbps

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
demimurych, 2013-08-25
@WEBIVAN

here in two pass
bitrate replace with your
$1 source file
$2 target
ffmpeg -y -i "$1" -an -pass 1 -vcodec libx264 -vpre fastfirstpass -b 800K -bt 1600K -threads 4 -s 640x360 $2_360p.mp4
ffmpeg - y -i "$1" -pass 2 -vcodec libx264 -vpre hq -b 800K -bt 1600K -threads 4 -s 640x360 -acodec libmp3lame -ab 96K -ar '44100' $
2_360p.mp4 like yamdi

D
demimurych, 2013-08-25
@demimurych

-b is the main video bitrate.
-bt is the bitrate tolerance. I completely forgot that it was removed from libx264. You can safely remove it.

P
Puma Thailand, 2013-08-26
@opium

Almost any film is in VKontakte, and there, by silence, 360p.

I
Ilya Evseev, 2013-08-25
@IlyaEvseev

An example of reverse transcoding, from AVI to MP2 for online broadcasting, with an increase in size:

vlc -I dummy "Kino_Ishodnoe.avi" :sout='#transcode{vcodec=mp2v,vb=4096,acodec=mp2a,ab=192,scale=1,channels=2,deinterlace,audio-sync}:std{access=file, mux=ps,dst='"Kino_Gotovoe.mpg"'}' vlc://quit

Examples of transcode with changing codec, resolution, compression, bitrate, etc.
see here: wiki.videolan.org/Transcode#Example_script
and here: habrahabr.ru/post/73944/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question