Piping Video to a Command Line

You can pipe a video to any command line on the computer, such as ffmpeg. This can be especially useful with raw video files. Next is an example usage.

  1. on a terminal window create a named pipe file, for example:
    		mknod /tmp/piper.yuv p
    load your video and do your editing
  2. set up your Render (Shift-R), you can choose a raw format such as yuv or rgb
  3. for the filename Select a file to render to, use the named pipe as created in step 1 (/tmp/piper.yuv)
  4. for Insertion Strategy, you will want to make sure to select insert nothing
  5. click for OK on the green checkmark.(the CINELERRA-GG gui will look like it is hanging while waiting for a command line to use the pipe.)
  6. on the terminal window, keyin your command, for example:
    		/mnt0/build5/cinelerra-5.1/thirdparty/ffmpeg-3.4.1/ffmpeg -f \
    		rawvideo -pixel_format yuv420p -video_size 1280x720 \
    		-framerate 30000/1001 -i /tmp/piper.yuv /tmp/pys.mov

A slightly different option can be used instead that may be more familiar to some. In the render menu after choosing the File Format of ffmpeg, use the pulldown to choose y4m as the file type. This choice results in putting a header on the rendered output with some pertinent information that can be used for ffmpeg processing thus alleviating the requirement for pixel_format, video_size, and framerate on the ffmpeg command line. In this case the format is yuv4mpegpipe instead of rawvideo. An example command line would look as follows (assuming the created pipe is called piper.y4m):
	ffmpeg -f yuv4mpegpipe -i /tmp/piper.y4m -vcodec libx264 /tmp/test.mp4

The CINELERRA-GG Community, 2021