Skip to content

Commit 9052577

Browse files
Merge pull request #23 from darbyjohnston/y4m
Add support for sending y4m to FFmpeg
2 parents b476d36 + 7fd9145 commit 9052577

File tree

6 files changed

+322
-35
lines changed

6 files changed

+322
-35
lines changed

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,33 @@ Multiple effects on clips, tracks, and stacks:
9393

9494
FFmpeg Encoding
9595
===============
96-
Toucan can send rendered images directly to FFmpeg for encoding. The
97-
images are piped to FFmpeg without incurring the overhead of disk I/O.
96+
Toucan can send rendered images to the FFmpeg command line program for encoding.
97+
The images can be sent as either the y4m format or raw video. The images are
98+
piped directly to FFmpeg without the overhead of disk I/O.
9899

99-
Example command line for piping images to FFmpeg:
100+
Example command line using the y4m format:
101+
```
102+
toucan-render Transition.otio - -y4m 444 | ffmpeg -y -i pipe: output.mov
103+
```
104+
* `Transition.otio`: The input timeline file.
105+
* `-`: Write to standard out instead of a file.
106+
* '-y4m 444': Set the pixel format of the output images. Possible values: 422,
107+
444, 444alpha, 444p16
108+
* `-y`: Overwrite the output file if it already exists.
109+
* `-i pipe:`: Read from standard input instead of a file.
110+
* `output.mov`: The output movie file.
111+
112+
Example command line using raw video:
100113
```
101114
toucan-render Transition.otio - -raw rgba | ffmpeg -y -f rawvideo -pix_fmt rgba -s 1280x720 -r 24 -i pipe: output.mov
102115
```
103116
* `Transition.otio`: The input timeline file.
104117
* `-`: Write to standard out instead of a file.
105-
* `-raw rgba`: Set the pixel format of the output frames. This should
106-
match the `-pix_fmt` option given to FFmpeg. One exception is that toucan
107-
options do not specify the endian, the endian of the current machine is used.
108-
So for example the toucan option `-raw rgbaf16` might match the FFmpeg option
109-
`-pix_fmt rgbaf16le` on the current machine. Check the `toucan-render` command
110-
line help for the list of available formats.
118+
* `-raw rgba`: Set the pixel format of the output images. Possible values:
119+
rgb24, rgb48, rgba, rgba64, rgbaf16, rgbaf32, rgbf32
111120
* `-y`: Overwrite the output file if it already exists.
112121
* `-f rawvideo`: Set the input to raw video frames.
113-
* `-pix_fmt rgba`: Set the input pixel format as described above.
122+
* `-pix_fmt rgba`: Set the pixel format same as above.
114123
* `-s 1280x720`: Set the size of the input frames. The image size
115124
can be found by running `toucan-render` with the `-print_size` option.
116125
* `-r 24`: Set the frame rate. The frame rate can be found by running

0 commit comments

Comments
 (0)