Difference between revisions of "Multimedia Programming/ko"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
 
{{Multimedia Programming}}
 
{{Multimedia Programming}}
  
=Playing Videos=
+
=비디오 재생=
  
==Starting a player application==
+
==동영상 재생 프로그램 작성 시작==
  
Once you know the command line and parameters you can use TProcessUTF8 to start the player:
+
명령어 라인과 파라메터를 알고 있다면 동영상 플레이러를 시작하려면 TProcessUTF8을 사용할 수 있다:
  
 
<syntaxhighlight>
 
<syntaxhighlight>
Line 29: Line 29:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
For example to start under Linux the mplayer to play a video use:
+
예를 들어 리눅스 상에서 동영상 재생을 위해 mplayer로 시작하려면 다음과 같이 사용한다:
  
 
<syntaxhighlight>
 
<syntaxhighlight>
Line 59: Line 59:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==VFW - Video for Windows==
+
==VFW - 비디오 포 윈도우즈==
  
Capturing and playing video streams from TV cards and webcams under Windows the [[Glossary#VFW|
+
윈도우 상에서 TV 카드나 윈도우의 비디오 스트림을 재생하거나 캡쳐 하려면 [[Glossary#VFW|
  
VFW]] [[Glossary#API|API]] can be used with [[SysRec]].
+
VFW]] [[Glossary#API|API]][[SysRec]]와 함께 사용하면 된다.
  
==MPlayer for Linux gtk2/X==
+
==리눅스 gkt2/X용 MPlayer==
  
'''mplayer''' is an open source and free movie player. There is a LCL control embedding the
+
'''mplayer''' 는 오픈소스 자유 동영상 플레이어로, mplayer를 포함하는 LCL 컨트롤이 있어서 자신만의 mplayer를 제작할 수도 있고 응용프로그램에서 바로 동영상을 플레이어하게 할 수 있다.
  
mplayer, so you can built your own movie players or just play a video in your application. You
+
다음에서 다운로드 할 수 있다:
 
 
can download it here:
 
 
<pre>
 
<pre>
 
svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/mplayer mplayer
 
svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/mplayer mplayer
 
</pre>
 
</pre>
  
=Playing Sounds=
+
=소리 재생=
  
==Windows only: using the Windows API==
+
==윈도우만 해당: 윈도우즈 API를 이용==
You can use the Windows API to play e.g. wav files:
+
 
 +
wav 파일 같은 것을 재생하려면 Windows API를 사용하여야 한다:
 
<syntaxhighlight>
 
<syntaxhighlight>
 
...
 
...
Line 86: Line 85:
 
sndPlaySound('C:\sounds\test.wav', snd_Async or snd_NoDefault);
 
sndPlaySound('C:\sounds\test.wav', snd_Async or snd_NoDefault);
 
</syntaxhighlight>
 
</syntaxhighlight>
Obviously, this is not cross-platform
 
  
==Using the Audio Component Suite==
+
이것은 확실히 크로스-플랫폼이 될 수 없다
  
Read the page about the [[ACS|Audio Component Suite]]
+
==오디오 컴포넌트 수트 사용==
  
==Using the OpenAL Library==
+
[[ACS|Audio Component Suite]]에 관한 페이지를 읽어보세요
  
A tutorial for Delphi can be found here: [http://www.noeska.com/doal/tutorials.aspx]
+
==OepnGL 라이브러리 이용==
  
Free Pascal comes with a unit for accessing OpenAL located in fpc/packages/openal as well as
+
델파이에 관한 튜토리얼을 다음에 있다: [http://www.noeska.com/doal/tutorials.aspx]
  
[http://svn.freepascal.org/svn/fpc/trunk/packages/openal/examples usage examples]
+
프리파스칼은 OpenAL을 접근하기 위한 유닛을 fpc/packages/openal과 [http://svn.freepascal.org/svn/fpc/trunk/packages/openal/examples usage examples]에서 제공한다.
  
 
==BASS==
 
==BASS==
  
The BASS library can be downloaded from: http://www.un4seen.com/ and
+
BASS 라이브러리는 http://www.un4seen.com/ http://www.un4seen.com/forum/?topic=8682.0 에서 다운로드 할 수가 있다.
 
 
http://www.un4seen.com/forum/?topic=8682.0
 
 
 
There is a DJ application, for Windows, Linux and Mac OSX, written with Lazarus and using Bass
 
  
lib:
+
윈도우즈, 리눅스 및 맥 OSX용 DJ 어플리케이션이 있는데 라자루스와 Bass 라이브러리를 이용하여 제작하였다: https://sites.google.com/site/fiensprototyping/
https://sites.google.com/site/fiensprototyping/
 
  
==Audiere Library==
+
==Audiere 라이브러리==
  
Has bindings for Delphi, but they don't work with FPC:
+
Audiere 라이브러리는 Delphi를 위한 바인딩을 가지지만 FPC와는 binding을 갖지 않는다:
  
 
* http://www.casteng.com/whypascal.shtml
 
* http://www.casteng.com/whypascal.shtml
Line 119: Line 112:
 
* http://code.google.com/p/audiere-bind-delphi/
 
* http://code.google.com/p/audiere-bind-delphi/
  
==Audorra Library==
+
==Audorra 라이브러리==
  
Works fine with Lazarus:  
+
라자루스와 잘 동작한다:
  
 
http://sourceforge.net/projects/audorra/
 
http://sourceforge.net/projects/audorra/
  
==OMEGA Engine==
+
==OMEGA 엔진==
  
The OMEGA Engine is a full game engine in single Omega.dll file which is just 50kb. It can
+
OMEGA 엔진은 겨우 50Kb의 단일 Omega.dll 파일로 완전한 게임 엔진을 제공한다. 이것은  FLAC,OGG,MP3,MP2,AMR WMA 파일을 잘 재생하며 시스템에서 설치된 오디오 코덱을 찾아 이용한다.
 
 
successfully play FLAC,OGG,MP3,MP2,AMR and WMA files. It searches and uses installed audio
 
 
 
codecs from the system.
 
  
 
http://sourceforge.net/projects/omega-engine/files/
 
http://sourceforge.net/projects/omega-engine/files/
  
The project is dead, but is very easy to use:
+
이제 프로젝트는 더 이상 진행되지 않으나 사용하기는 매우 쉽다:
  
 
<syntaxhighlight>
 
<syntaxhighlight>
Line 142: Line 131:
  
 
==PortAudio==
 
==PortAudio==
Various bindings for [http://www.portaudio.com/ PortAudio], a cross-platform, open source
+
[http://www.portaudio.com/ PortAudio]는 다양한 툴과 동작하는 크로스-플랫폼, 오픈소스 라이브러리로 오디오 플레이백과 기록을 할 수 있다.
  
library for audio playback and recording are available.
+
[[http://wiki.lazarus.freepascal.org/Multimedia_Programming#Playing_Sounds]] 에 여러 버전이 있다.
See [[http://wiki.lazarus.freepascal.org/Multimedia_Programming#Playing_Sounds]] for some
 
  
versions.
+
포럼 유저인 FredvS가 PortAudio를 동적으로 로드하는 파스칼 유닛을 작성하였다:  
Forum user FredvS has written a Pascal unit that dynamically loads PortAudio:  
 
  
 
[http://lazarus.freepascal.org/index.php/topic,17521.0.html]
 
[http://lazarus.freepascal.org/index.php/topic,17521.0.html]
Line 154: Line 141:
 
==SDL + SDL_mixer==
 
==SDL + SDL_mixer==
  
The basic SDL library comes with a very simple sound system. On top of that, SDL mixer adds more
+
베이직 SDL 라이브러리는 매우 간단한 사운드 시스템이다. 그 최상위층에 SDL 믹서는 더 유연한 많은 사운드 API 들을 추가했다.
 
 
sound APIs which build a more flexible solution.
 
  
 
==FMOD==
 
==FMOD==
  
Is a closed source solution. It is free for use for non-comercial software, but requires the
+
FMOD는 폐쇄된 오픈소스 솔루션이다. 비 상업용 소프트웨어에는 무료로 사용할 수 있지만 상업적인 소프트웨어에서는 라이선스에 따른 비용을 지불하여야 한다.
  
payment of licenses for commercial software.
+
==Squall 사운드==
  
==Squall sound==
+
Squall 사운드는 FPC와 잘 동작한다. 3D 오디오와 EAX 효과를 포함하지만 MP3, OGG WAV 포맷 만을 지원한다.
 
 
Squall sound works fine with FPC. It has 3D audio and EAX effects, but just supports MP3, OGG  
 
 
 
and WAV formats.
 
  
 
http://www.afterwarp.net/resources/soundlib
 
http://www.afterwarp.net/resources/soundlib
Line 174: Line 155:
 
==FPSound==
 
==FPSound==
  
FPSound is a new library being developed on the molds of fpspreadsheet and fpvectorial: it has
+
FPSound는 fpspreadsheet와 fpvectorial 상에서 개발 되고 있는 새로운 라이브러리이다: 파일을 읽고, 쓰고 플레이하는 독립적인 모듈을 가지며 편집을 위한 중간표시 단계도 가진다. [[FPSound]]를 보세요
 
 
independent modules to read, write and play sound files and also an intermediary representation
 
 
 
for editing. See [[FPSound]]
 
  
=See also=
+
=더 볼 것=
  
 
* [[Audio libraries]]
 
* [[Audio libraries]]
  
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]

Revision as of 14:57, 8 September 2012

Deutsch (de) English (en) 日本語 (ja) 한국어 (ko) русский (ru) 中文(中国大陆)‎ (zh_CN)

비디오 재생

동영상 재생 프로그램 작성 시작

명령어 라인과 파라메터를 알고 있다면 동영상 플레이러를 시작하려면 TProcessUTF8을 사용할 수 있다:

uses 
  Classes, ..., LCLProc, UTF8Process;

...

implementation

procedure TMainForm.Button1Click(Sender: TObject);
var
  Player: TProcessUTF8;
begin
  Player:=TProcessUTF8.Create(nil);
  try
    Player.CommandLine:=PathToPlayer+' '+ParametersAndMediaFile;
    Player.Execute;
  finally
    Player.Free;
  end;
end;

예를 들어 리눅스 상에서 동영상 재생을 위해 mplayer로 시작하려면 다음과 같이 사용한다:

uses 
  Classes, ..., FileUtil, LCLProc, UTF8Process;

...

implementation

procedure TMainForm.Button1Click(Sender: TObject);
var
  Player: TProcessUTF8;
  Filename: String;
  PlayerPath: String;
  PlayerParams: String;
begin
  Filename:='/home/username/video.mpg';
  PlayerPath:=FindDefaultExecutablePath('mplayer');
  PlayerParams:='"'+Filename+'"';
  Player:=TProcessUTF8.Create(nil);
  try
    Player.CommandLine:=PlayerPath+' '+PlayerParams;
    Player.Execute;
  finally
    Player.Free;
  end;
end;

VFW - 비디오 포 윈도우즈

윈도우 상에서 TV 카드나 윈도우의 비디오 스트림을 재생하거나 캡쳐 하려면 VFW APISysRec와 함께 사용하면 된다.

리눅스 gkt2/X용 MPlayer

mplayer 는 오픈소스 자유 동영상 플레이어로, mplayer를 포함하는 LCL 컨트롤이 있어서 자신만의 mplayer를 제작할 수도 있고 응용프로그램에서 바로 동영상을 플레이어하게 할 수 있다.

다음에서 다운로드 할 수 있다:

svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/mplayer mplayer

소리 재생

윈도우만 해당: 윈도우즈 API를 이용

wav 파일 같은 것을 재생하려면 Windows API를 사용하여야 한다:

...
uses MMSystem;
...
sndPlaySound('C:\sounds\test.wav', snd_Async or snd_NoDefault);

이것은 확실히 크로스-플랫폼이 될 수 없다

오디오 컴포넌트 수트 사용

Audio Component Suite에 관한 페이지를 읽어보세요

OepnGL 라이브러리 이용

델파이에 관한 튜토리얼을 다음에 있다: [1]

프리파스칼은 OpenAL을 접근하기 위한 유닛을 fpc/packages/openal과 usage examples에서 제공한다.

BASS

BASS 라이브러리는 http://www.un4seen.com/http://www.un4seen.com/forum/?topic=8682.0 에서 다운로드 할 수가 있다.

윈도우즈, 리눅스 및 맥 OSX용 DJ 어플리케이션이 있는데 라자루스와 Bass 라이브러리를 이용하여 제작하였다: https://sites.google.com/site/fiensprototyping/

Audiere 라이브러리

Audiere 라이브러리는 Delphi를 위한 바인딩을 가지지만 FPC와는 binding을 갖지 않는다:

Audorra 라이브러리

라자루스와 잘 동작한다:

http://sourceforge.net/projects/audorra/

OMEGA 엔진

OMEGA 엔진은 겨우 50Kb의 단일 Omega.dll 파일로 완전한 게임 엔진을 제공한다. 이것은 FLAC,OGG,MP3,MP2,AMR 및 WMA 파일을 잘 재생하며 시스템에서 설치된 오디오 코덱을 찾아 이용한다.

http://sourceforge.net/projects/omega-engine/files/

이제 프로젝트는 더 이상 진행되지 않으나 사용하기는 매우 쉽다:

Media_Play('Music.mp3', TRUE);

PortAudio

PortAudio는 다양한 툴과 동작하는 크로스-플랫폼, 오픈소스 라이브러리로 오디오 플레이백과 기록을 할 수 있다.

[[2]] 에 여러 버전이 있다.

포럼 유저인 FredvS가 PortAudio를 동적으로 로드하는 파스칼 유닛을 작성하였다:

[3]

SDL + SDL_mixer

베이직 SDL 라이브러리는 매우 간단한 사운드 시스템이다. 그 최상위층에 SDL 믹서는 더 유연한 많은 사운드 API 들을 추가했다.

FMOD

FMOD는 폐쇄된 오픈소스 솔루션이다. 비 상업용 소프트웨어에는 무료로 사용할 수 있지만 상업적인 소프트웨어에서는 라이선스에 따른 비용을 지불하여야 한다.

Squall 사운드

Squall 사운드는 FPC와 잘 동작한다. 3D 오디오와 EAX 효과를 포함하지만 MP3, OGG 및 WAV 포맷 만을 지원한다.

http://www.afterwarp.net/resources/soundlib

FPSound

FPSound는 fpspreadsheet와 fpvectorial 상에서 개발 되고 있는 새로운 라이브러리이다: 파일을 읽고, 쓰고 플레이하는 독립적인 모듈을 가지며 편집을 위한 중간표시 단계도 가진다. FPSound를 보세요

더 볼 것