Hitchhiker's Guide to Openbsd


Converting between different video formats


Download 1.27 Mb.
Pdf ko'rish
bet200/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   196   197   198   199   200   201   202   203   ...   258
Bog'liq
obsd-faq49

Converting between different video formats
It's important to make a clear distinction between 

the container file format - popular examples are MP4, OGG, MPEG, MOV, AVI, ASF. 

the video codec - for example MPEG-1, MPEG-2, MPEG-4 compliant codecs (like Xvid and 
DivX), FFmpeg, WMV, ... - read this 
Wikipedia article about video codecs
to find out more. 
In OpenBSD, support for MPEG and AVI containers is most mature at this time. 
Two popular utilities are 
multimedia/transcode
and mencoder (part of 
x11/mplayer
). They 
use or can use the libavcodec library as part of the 
graphics/ffmpeg
port, which generates good 
quality output. You can, of course, also use ffmpeg directly. It should also be possible to use the XviD 
encoder in 
multimedia/xvidcore

The documentation that comes with these packages, under the form of manual pages or HTML 
documents in 
/usr/local/share/doc
, contains many examples, so it is HIGHLY recommended 
to read those documents. 
13.12 - Is it possible to play streaming media under OpenBSD?
Yes, it is. Many audio and video streams will work just fine, on a limited number of platforms. A few of 
them will not. 
This is not meant to be a complete, overly detailed answer to have every possible streaming format work 
on any hardware architecture. You may want to learn more about streaming media to start with. A 
slightly dated but still good starting point is this 
chapter about streaming media
from the O'Reilly book 
titled Designing Web Audio. 
The first thing to understand is that there are a number of different streaming protocols around. The 
streaming protocol defines how the streams will be sent over the network. They have been developed to 
allow efficient transmission of audio/video over the internet in real-time. Mostly, the streaming protocol 
is a (Layer 7) application protocol, which can use either UDP or TCP (Layer 4) transport protocols. The 
User Datagram Protocol (UDP) is very suited for this type of application since it doesn't do any 
http://www.openbsd.org/faq/faq13.html (22 of 25)9/4/2011 10:02:21 AM


13 - Multimedia
retransmission of packets or other overhead. A number of specialized but proprietary protocols have 
been developed, e.g. Microsoft Media Services (MMS) and the Real Time Streaming Protocol (RTSP). 
As we will see, HTTP (which uses TCP) is sometimes used as well, even though it does not allow 
serving streams at a steady bitrate like UDP, RTSP and MMS. 
Next, there is the streaming format, which is how the audio/video data has been organized and can be 
played. The most widely used streaming formats are MP3, Real Audio (RA, RM) and Windows Media 
(ASF), all proprietary technologies. Occasionally you will also encounter streams in the open Ogg 
Vorbis format. 
As an example, I'll explain in a few steps how I get to listen to 
Radio 1
, one of the Belgian national radio 
stations. Browser-embedded plugins are not available on OpenBSD, so the story is usually not an instant 
"click and play". 

Determine the streaming protocol and format.
This is usually indicated on the website where you access the stream. In this case, I followed the 
link "Listen live" from the main site, and it's telling me my operating system is not supported. 
They are being nice by saying I can also listen to their MP3 streams without their embedded 
Flash player. Apart from that, a list of links to the national radio stations appears, allowing me to 
proceed to the next step. Note that I used a JavaScript-enabled browser to get this far. 

Figure out the precise URL.
Many websites link to a container metafile or playlist (such as M3U, ASX, RAM), which 
contains the actual location of the stream. Just save the file, and read the URL from it. In my 
example this is 
ftp http://internetradio.vrt.be/dab/hoeluisteren/pc/

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   196   197   198   199   200   201   202   203   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling