- video_writer ->initialise: target=file
|name|code,
size=size, frame_rate=[num], codec=[name], quality=[0..100] - Create to write a video file, to stream to a URL or to give the data to
code. The frame rate is 30 by default. codec names an encoder (e
.g., libx264)
or a codec (e.g., h264).
- video_writer ->append: frame=image
|sdl_texture|frame|window,
at=[num] - Add a frame.
at is its time in seconds; without it, it
follows the previous frame at video_writer<-frame_rate.
- video_writer ->audio: frequency=[1..],
channels=[1..8]
- Give the video sound with this frequency (default 48000) and number of
channels (default 2). This must be done before the first frame.
- video_writer ->append_audio: data=char_array,
format=[{u8,s8,s16,s32,f32}], frequency=[1..], channels=[1..8]
- Add samples to the sound, as audio_stream
->append
does. The data holds samples of format (default s16)
at frequency with
channels, by default those of the sound of the video. They
are converted to the format of the video. If video_writer->audio
was not used, the first samples set the format of the sound. The sound
starts at the start of the video and has no gaps.
- video_writer ->record: from=frame
|window - Append the image of
from at video_writer<-frame_rate
until video_writer->stop
or video_writer->close.
The frames get the time they were taken.
- video_writer ->record_frame:
- Append the image of video_writer
<-recording.
Used by video_writer->record.
- video_writer ->stop:
- Stop video_writer
->record.
- video_writer ->close:
- Encode the remaining frames and sound and finish the file.