Захват видео и аудио

Материал из CryWiki Russia

(Различия между версиями)
Перейти к: навигация, поиск
Строка 31: Строка 31:
==== Количество кадров в секунду  ====
==== Количество кадров в секунду  ====
-
The captured frames are all full frames, also called progressive frames.  
+
Захваченные кадры - полные, так называемые кадры прогресса.  
 +
 
 +
Установите количество fps котором вам нужно. В стандарте видео NTSC приблизительно 30 кадров в секунду,&nbsp;что является хорошим коспромисов между размером и качеством. Видео высокого качества может иметь до 60 кадров в секунду - разница в качестве заметно возрастает при повышении значений,&nbsp;но при этом повышается и информционный объём,&nbsp;занимаемый файлами. Движение не будет выглядеть плавно при значениях fps менее 24 (стандарт кинотеатров).<br>
-
Define the amount of frames per second you need. A NTSC standard video is approximately 30 frames per seconds, which is a good compromise between quality and file size. A high quality video can have up to 60 frames per second – the difference in quality of higher values is barely noticeable, but will still take up a lot of file space. Motion will not look smooth with less than 24 fps (cinema standard).
 
-
<br>
 
==== Fixed_time_step  ====
==== Fixed_time_step  ====

Версия 13:07, 21 мая 2011

Эта страница страница помечена как находящиеся в процессе перевода.


Содержание

Захват видео и аудио

Обзор

Это руководство объясняет как правильно настроить редактор (или игру), чтобы записывать видео в виде отдельных кадров и звуковой дорожки ( стерео или 5.1 surround sound) в wav файле. Этот собранный мтериал может быть в дальнейшём объединён в один видео файл с помощью любого видео-редактора.

Подготовка

Процесс захвата видео требует ввода нескольких консольных команд вручную, чтобы начать запись обоих медиа потоков. Чтобы ускорить данный процесс, вы можете создать конфиграционные файлы, в которых будут записаны все необходимые команды. Таким образов, вы можете начинать и останавливать щапись довольно быстро, хотя, здесь есть некоторые ограничения, о которых следует знать.

Чтобы начать запись, вам нужно будет настроить несколько вещей.

Настройки видео

Размер кадра

Высота и ширина захватываемого кадра это размер вашего окна перспективы. Вы можете легко изменить масштаб кадра перетаскиванием и сужением плавающих (таких, как RollupBar или консоль). Размер кадров высвечивается в правом верхнем углу окна перспективы.

В игре вы можете изменять реальный размер кадров меняя разрешение экрана через меню настроек или консоль.

Значения r_height и r_width

Нам нужно установить два консольных значения:

r_height N
r_width M

где N - число пиксилей высоты кадра , а M  - число пиксилей ширины кадра. Игра автоматически переключится к следующему возможному соотношению сторон, если введённый размер кадра недоступен.

Количество кадров в секунду

Захваченные кадры - полные, так называемые кадры прогресса.

Установите количество fps котором вам нужно. В стандарте видео NTSC приблизительно 30 кадров в секунду, что является хорошим коспромисов между размером и качеством. Видео высокого качества может иметь до 60 кадров в секунду - разница в качестве заметно возрастает при повышении значений, но при этом повышается и информционный объём, занимаемый файлами. Движение не будет выглядеть плавно при значениях fps менее 24 (стандарт кинотеатров).


Fixed_time_step

To force a fixed frame rate of a certain speed use the command

Fixed_time_step N

Where N specifies time step, which is calculated as follows:
time step = 1 second / amount of frames

Example: 1 second / 30 frames = 0.033333333

0.0166666667 would be 60 frames per second. If you want to record a standard PAL speed video (25 fps), use a value of 0.04.


File format selection

The captured pictures can be of in several different file formats. A good choice for average quality is jpeg format, whereas tga or bmp are better for higher quality, and HDR for pictures in high dynamic range quality.


Capture_file_format

Use the console command

Capture_file_format N

Where N should be replaced with either jpg, bmp, tga or hdr.


File location

The recorded frames will be stored either in the default folder called “CaptureOutput” located in the root folder, or within a custom folder, defined using the following command:

Capture_folder N

Where N should be replaced with the name of your folder (e.g. scene12_take1 )

Be aware that when you start a recording, the captured frames will be placed in the currently defined folder, overwriting any existing files with the same nameFor each new recording you should either create a new folder or move the existing files to another folder to avoid losing any work.


Starting and ending the recording

When everything is setup you can start the recording with the command

_Capture_frames N_

Set N to 1 to start recording, and 0 to stop.

Audio settings

First of all, decide if you need the audio in stereo or 5.1 surround. You will need to change your audio settings in the Windows control panel. Go to “Sounds and Audio Devices” select the Volume tab, click the button “Advanced” and select your choice of output device.

Deactivating the sound system

After loading your level, you will need to deactivate the sound system before you can redirect the sound output to a file. To deactivate it use the command

Sound.DeactivateAudioDevice()

Now, the sound output will be redirected to root folder and saved as a wav file. The sound will not be running in realtime but linked precisely to the set time step. You won’t hear anything after activating the sound again, as long as you record it.

To write the sound use the command

s_OutputConfig N

N should be set to 3 to activate the non-realtime writing of the wav file or 0 to switch it back to the default setting (autodetection). The other settings of this command are not relevant and will be explained in another tutorial.

Reactivating the sound system

To reset the sound system use the following command

Sound.ActivateAudioDevice()

Now a wav file will be created in the root folder of the game. The file will continue recording until the writing is deactivated with the following combination of commands:

Sound.DeactivateAudioDevice()
s_OutputConfig 0
Sound.ActivateAudioDevice()

Note: Although the whole sound system is reset using the above commands, some sounds won’t restart until they are correctly triggered again. This especially applies for looped sounds. To get the correct sounds to play, it is recommended to start the recording of video and sound first, and then enter any area that triggers your looped sounds for your recording.

Creating configuration files

To capture several recordings with the same setting, it may be convenient to set up a configuration file containing the parameters required for recording, to ensure all captured files are of the same format.

A setting config file could look like this:

sys_spec = 4

Fixed_time_step 0.0333333333
Capture_file_format jpg
Capture_folder myrecording

r_width 1280 r_height 800

The command sys_spec = 4 sets the game graphic settings to very high to get the bet look possible.

To speed up the process to start and stop the recording it’s convenient to create two configuration files, one to start and one to stop the video.

To start recording, you need a config file that looks something like this:

Sound.DeactivateAudioDevice()
s_OutputConfig]] 3
Sound.ActivateAudioDevice()

Capture_frames 1

To stop recording, you need a config file that looks something like this:


Capture_frames 0

Sound.DeactivateAudioDevice()
s_OutputConfig 0
Sound.ActivateAudioDevice()

Executing the config files

To activate the config file open the console and type

_Exec N_

while N is the name of the config file.

See Also