The WriteNode JavaScript object. Provide information about rendered images and the movie to generate.
More...
The WriteNode JavaScript object. Provide information about rendered images and the movie to generate.
try
{
for (var i = 0; i < images.length; i++)
{
}
var soundFile;
{
}
var args = [
"ffmpeg",
"-y",
"-start_number",
"-i",
];
if (soundFile)
{
args = args.concat([
"-i",
soundFile,
"-c:a",
"copy"
]);
}
args = args.concat([
"-vframes",
"-r",
"-c:v",
"mpeg4",
"-pix_fmt",
"yuv420p",
outputFile
]);
var process =
new Process2(args.join(
" "));
var retCode = process.
launch();
if (retCode != 0)
{
if (process.errorMessage())
{
}
}
}
catch(err)
{
}
◆ exportSound
String WriteNode::exportSound |
( |
int |
channelSize, |
|
|
int |
channelCount, |
|
|
int |
sampleRate |
|
) |
| |
|
slot |
Return the scene's soundtrack in a temporary file in the WAV format.
- Note
- The generated temporary audio file is removed at the end of export.
- Parameters
-
channelSize | the audio channel size (i.e. 8 or 16 bit). |
channelCount | the number of audio channels (i.e 1 for mono and 2 for stereo). |
sampleRate | the audio sample rate in Hz (i.e. 22050, 44100, ...).. |
- Returns
- the name of generated temporary audio WAV file or empty string if no sound tracks or any error.
◆ frameRate
double WriteNode::frameRate |
( |
| ) |
|
|
slot |
Returns the frame rate, as frames per second.
- Returns
- The frame rate, as frames per second.
◆ hasSound
bool WriteNode::hasSound |
( |
| ) |
|
|
slot |
Return true if exported scene contains sounds.
- Returns
- true if exported scene contains sounds and script movie mode was activated.
◆ imageFiles
StringList WriteNode::imageFiles |
( |
| ) |
|
|
slot |
Return list of generated images.
- Note
- Images are automatically removed at the end of export.
- Returns
- StringList of full path names of generated images.
◆ imageFilesPattern
String WriteNode::imageFilesPattern |
( |
| ) |
|
|
slot |
Return the pattern of generated images.
- Note
- Images are automatically removed at the end of export.
- Returns
- Pattern of generated images (ex "Write_tmp-%06d.sgi"), which could be used as ffmpeg parameter.
◆ movieDir
String WriteNode::movieDir |
( |
| ) |
|
|
slot |
Return movie folder.
- Returns
- Return movie folder absolute path
◆ movieName
String WriteNode::movieName |
( |
| ) |
|
|
slot |
Return movie name.
- Returns
- Return movie name without extension
◆ startFrame
int WriteNode::startFrame |
( |
| ) |
|
|
slot |
Returns the start frame to be exported.
- Returns
- The start frame to be exported.
◆ stopFrame
int WriteNode::stopFrame |
( |
| ) |
|
|
slot |
Returns the stop frame to be exported.
- Returns
- The stop frame to be exported.