Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.6: Use the pcastaction command to manipulate video files System 10.6
Snow Leopard only hintThe command pcastaction is a tool included in Snow Leopard to manipulate QuickTime and MPEG movies in a lot of ways: trim, append, extract soundtrack, watermark, and so forth.

The command is used by Podcast Capture to handle video to send to a MacOSX Server (Podcast Producer) but can also be used standalone. It is written in Ruby and uses Apple QTKit.

A few preliminary notes:
  • All paths must be absolute (start from /). You can use `pwd` (with back quotes) in a shell to specify current directory path (see examples below).
  • Most commands create 'reference movies' (with references to other files) which are not self-sufficient and can break if you move the original files. You should 'flatten' these with pcastaction or open them in QuickTime Player and save them to get a fully independent movie.
Here are a few examples usage of the command:
  • Get info
    pcastaction qtinfo --prb=`pwd` --input=`pwd`/movie.mp4
    pcastaction qtinfo --prb=/Users/john/Movies/ --input=/Users/john/Movies/movie.mp4
  • Extract soundtrack to 'movieaudio.m4a' file:
    pcastaction extracttracks --prb=`pwd` --input=`pwd`/movie.mp4 --output=`pwd`/movieaudio.m4a --type=audio
  • Extract soundtrack to file: movie.m4v:
    pcastaction extracttracks --prb=`pwd` --input=`pwd`/movie.mp4 --output=`pwd`/movie.m4v --type=video
  • Put an audio track in a video:
    pcastaction addtracks --prb=`pwd` --tracks=`pwd`/movieaudio.m4a --input=`pwd`/movie.m4v --output=`pwd`/movie_av.mp4
  • Extract a png image from movie at time (in seconds, with decimals possible):
    pcastaction getposterimage --prb=`pwd` --input=`pwd`/movie.mp4 --output=`pwd`/movie_pic.png --time=120.20
  • Trim a movie (times in seconds with decimals):
    pcastaction trim --prb=`pwd` --input=`pwd`/movie.mp4 --output=`pwd`/movie_trimmed.mp4 --start_time=10.10 --end_time=1250.30
  • Join (put one after the other) movies (if sizes don't match the biggest size will be used and the smaller video wil be put in top left corner):
    pcastaction join --prb=`pwd` --input1=`pwd`/movie1.mp4 --input2=`pwd`/movie2.mp4 --output=`pwd`/movie_joined.mp4
  • Flatten (make a self-contained movie):
    pcastaction flatten --prb=`pwd` --input=`pwd`/ --output=`pwd`/
For more options you can type in the Terminal:

pcastaction help (lists all subcommands)

[crarko adds: I haven't tested this one.]
  • Currently 4.57 / 5
  You rated: 3 / 5 (7 votes cast)

10.6: Use the pcastaction command to manipulate video files | 2 comments | Create New Account
Click here to return to the '10.6: Use the pcastaction command to manipulate video files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Use the pcastaction command to manipulate video files
Authored by: prichardson on Apr 09, '11 11:09:44AM

$ pcastaction help shell
Podcast Producer action task, version 2.0
Copyright 2007 Apple, Inc.

shell: run a command with the specified arguments

usage: shell --basedir=BASEDIR -- EXECUTABLE_PATH [args...]

Apple has a neat little guide here:

[ Reply to This | # ]
10.6: Use the pcastaction command to manipulate video files
Authored by: michelj on Aug 06, '12 11:15:34AM

Still works in 10.7 but has been removed as of 10.8 mountain lion (as podcast client is gone)

[ Reply to This | # ]