📜 ⬆️ ⬇️

Serious talk about VLC

Under the cut:

1 . A small introduction to the VLC media player / server.
2 Remote control VLC.
2.1 . VLC as a Remote Control (iPhone / iPod Touch \ PDA)
3 Single / batch video conversion / encoding to VLC (for example, video encoding for iPod / iPhone)



Brief introduction to VLC


Much has already been said about the VLC program from VideoLAN , and from the very beginning it quickly entered the daily life of most IT people. Attracting cross-platform (Linux, Windows, Mac OS X, BeOS, * BSD, Solaris, Familiar Linux, Yopy / Linupy and QNXs, etc. ) was also ported to many mobile platforms. There were no successful attempts (Windiws Mobile). But one way or another, all its advantages more than exceeded the disadvantages. And most recently, this combine was ported to the iPhone / iPod Touch.
')
This seemingly unsightly video player has so many functions (the purpose of which remains a mystery to many) that the description of all the possibilities would hardly fit in a standard printed publication of 400-500 pages. Many precisely for this reason bypass it, and the most unreasonable aesthetes describe the player as - “a flawed piece of uncooked log” motivating this not with its beauty, but rather with the complete absence of graphic design. Anyone who considers himself as such, or is sure that VLC is just an Audio / Video player, can no longer read and save a lot of time.

For those who read about VLC for the first time, I will briefly describe what he is:

In the case when VLC acts as a Stream Server, videos can receive:


One of the most remarkable features is the ability to play out of the box of all supported content without installing additional programs, utilities or codecs. As a nice bonus, you can note the possibilities:

All VLC features on each platform are listed in the VLC feature list.

VLC remote control


VLC has built-in sets of modules, among which there is a very useful “http” that allows you to remotely control the player via the Web interface, which opens up great possibilities for using mobile devices without additional software. But this way will satisfy the needs of only avid gigs, who are not afraid of the lack of beautiful


Configure and use the http VLC interface:
There are three ways to launch VLC with the http interface:

1 . Through VLC itself. Settings -> Add interface -> Web interface .
2 Through the terminal.
vlc -I http
--http-host host:port ( )


3 Through a shortcut from the desktop with the parameter "-I http".
After that, just open any browser and enter the URL or IP (by default, Windows is 127.0.0.1 : 8080 )
Learn more about the http interface and its features.

Thus, you can use VLC as a Video player absolutely free of charge, and your mobile device will play the role of a Remote Control.



But this method is not for everyone, firstly, you need Wi-Fi, and who do not have an access point, then this can be fixed by buying a budget option - a USB D-Link DWA-110 Adapter (I bought the price from 500 rubles for 610.) This adapter is fully able to satisfy all needs for mobile devices as an access point. And secondly, this approach for many will seem extremely not aesthetic. But this option is also solved with the help of utilities and applications for most gadgets. For iPhone / iPod, I recommend VLC Remote , complete with which there is a Utility for Windows and Mac which will set everything up on the Computer side.



Quickly convert video to VLC for iPod / iPhone and other devices.


Above, I already mentioned the wide possibilities of VLC, and the most demanded by me at the moment is the function of converting / encoding one video file and simultaneous viewing of another (if encoded through the VLC shell). The conversion / encoding functions do an excellent job with their work for home viewing (I’m writing household because I didn’t try to convert heaped up HD and other formats for viewing on TV. I’ll take Video for PDAs and smartphones as a basis for explaining the principles. In VLC, you can convert almost any settings, and advanced video mastering people will be able to set their own parameters for this. It is also possible to convert a video file with external subtitles to one * mp4 file, or any other for your troystva.
Below I will describe an approximate conversion process using the example of an iPod Touch file that plays mp4 320x200 video, for those who connect their device to a TV, can increase the resolution to 640x480.
Starting VLC It is enough just to press CTRL + R, then select any video file, and press ALT + S. In the window that appears, you can change nothing and just go directly to the Options tab, and in the field enter the following code:
:sout=#transcode{width=320,canvas-height=240.vcodec=mp4,vb=800,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=44100}:std{access=file,mux=ts,dst=%input_video%}


Where width is width, canvas-height is height, vcodec video codec, vb video bitrate, acodec audio codec, ab = audio bitrate, mux encapsulation, and dst is the path and file name of the output (note that indicated with two slashes (C: \\ D: \\, etc.)).
There is also an interesting semi-automated process that allows you to massively convert stacks of files, for example, if you need to go to work or go to bed and convert many files during your absence.

I am attaching an example for Windows (For other systems, dig VideoLan WIKI ):
So, we need to create a Batch-file, or in Russian, saying the BAT-file as follows:
"C:\\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv "C:\\in.avi" :sout=#transcode{vcodec=h264,vb=800,scale=1,width=320,height=240,acodec=mp4a,ab=128,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=C:\\out.mp4}" vlc://quit


Where C: \\ Program Files (x86) \ VideoLAN \ VLC \ vlc.exe Path to VLC (quotes are required "", they are needed to specify the path to the file, as many folders with spaces, quotes will not allow to interrupt the execution process in place of these spaces, and after the drive letter do not forget about the double slash \\).
C: \\ in.avi path to the source video file.
C: \\ out.mp4 is the path to the outgoing file with the extension * .mp4.
vlc: // quit command to close VLC after the encoding process.

For bulk converting, simply copy this line, paste into the line below and replace the data of the source and outgoing files.
And if you need to convert all the files and then turn off the computer, this procedure will look something like this:
"C:\\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv "C:\\in-1.avi" :sout=#transcode{vcodec=h264,vb=800,scale=1,width=320,height=240,acodec=mp4a,ab=128,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=C:\\out-1.mp4}" vlc://quit
"C:\\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv "C:\\in-2.avi" :sout=#transcode{vcodec=h264,vb=800,scale=1,width=320,height=240,acodec=mp4a,ab=128,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=C:\\out-2.mp4}" vlc://quit
SHUTDOWN -s -t 120


Where SHUTDOWN is a command to turn off the PC, and 120 is the time in seconds at which to perform the shutdown.
PS : if you run this command during testing, it is enough to cancel the shutdown by typing SHUTDOWN -a on the command line.

Just in case, I am attaching an example file with comments ( mirror )

PS : I hope the information turned out to be useful for you, and you delete from your everyday life many programs and unnecessary utilities that perform all the same functions, but at the same time take up a lot of space, fill up the registry and just get in the way. Perhaps this is not the last article on VLC and if I manage to find more functions and features that are duplicated in other applications, I will definitely write about it.
PPS : If among readers an intelligent programmer who is interested in or using VLC in everyday life, knock on Habrapochta, since I have certain ideas for writing a functional GUI Launcher for VLC, with presets for users, I am also ready to draw a GUI for this business .

Successes!

Source: https://habr.com/ru/post/73944/


All Articles