user10731: I have approximately 3000 short video clips, each about 3 seconds in duration. I need to rotate each of them 90 degrees. What is the best way to do this? I have Adobe Creative Cloud subscription, as well as access to both Windows and Mac machines. Looking for the easiest solution to automate/batch process the rotation of so many videos.
If you were wondering - the videos are part of an e-learning course on lumber. The learner views each randomly selected video, which is just a short clip of a piece of lumber rotating. The videos were shot so that the lumber (2x4s, etc.) were horizontal. But now the client wants the lumber to be vertical in the clips.

user6685: Based on this answer you can use ffmpeg with following commands to rotate a video: 
ffmpeg -i input -vf transpose=2 output

To Batch process a folder of movies you can use a programming language of your choice and iterate through the files. I've used linux with python 2.7+ here. You only have to edit folder_movies path, path_to_ffmpeg and set
your movie extension:
import os # import os module
import subprocess # import subprocess module

# set the path to your video folder
folder_movies = '/home/user/Desktop/test/'

# set ffmpeg path
path_to_ffmpeg = "/opt/ffmpeg/ffmpeg"

# set file extension
ext = ".mp4"

# collect all videos in folder_movies
movie_files = [f for f in os.listdir(folder_movies) if f.endswith(ext)] 

# iterate through the files
for i in movie_files:

    # setup correct filepath for mov's
    file_path = os.path.join(folder_movies,i)

    # generate new file path
    new_path = os.path.splitext(file_path)[0] + '_rotated_90' + ext

    # call ffmpeg with the correct arguments
    # command: ffmpeg -i input -vf transpose=2 output
    subprocess.call([path_to_ffmpeg, "-i",  file_path, "-vf", "transpose=2", "-c:a", "copy", new_path])

Afterwards your movie folder should looks like:

The advantage of using python is that the code runs cross platform. The only thing you need to consider are the paths to the directory and the ffmpeg executable. In order to run this on a windows machine you only have to replace the paths to something like:
# folder_movies = '/home/user/Desktop/test/' # linux or osx
folder_movies = r'c:\some\directory\test'    # windows, the r is important
folder_movies = 'c:/some/directory\test'     # windows (alternative)

# path_to_ffmpeg = '/opt/ffmpeg/ffmpeg'            # linux or osx
path_to_ffmpeg = r'c:\Program Files\ffmpeg\ffmpeg' # windows, the r is important
path_to_ffmpeg = 'c:/Program Files/ffmpeg\ffmpeg'  # windows (alternative)

Note: I'm not a ffmpeg expert, maybe there is a way to batch process with it directly.

user4943: You have specified that you are interested in working on a huge number of videos, if you have a multicore machine and you will use a normal for loop provided by your shell, you will have one of your cores running hot, while others are doing absolutely nothing. This is not ideal.
What you should be doing for such a job is using parallel, a tool that allows you to start several jobs at once, and it can do everything that a for-loop can, but better.
I will not write about all the features of this tool, but will concentrate on your specific task.
One way to start all these jobs would be:
parallel avconv -i "{}" -vf transpose=2 "{.}[rotated].mp4" ::: *.mp4

In here {} replaces each filename, and {.} replaces filename without an extension.
I will suggest that you will start as many jobs as you have cores, take away one. The reason for that is so your operating system will still remain useable, and also this will save you in case if you are using harddisk encryption (which will be using processing power to read/write data). To do this simply add --jobs -1 to your command line, and you will limit the number of jobs.
parallel --jobs -1 avconv -i "{}" -vf transpose=2 "{.}[rotated].mp4" ::: *.mp4

Please keep in mind that no output will be given until each encoding completes. So you will not see just how much of each of your video is done.

user3138: Use ffmpeg and the "transpose" filter as "poor" suggested. For example, if your files are mp4 and are in the current directory:
mkdir -p rotated
for f in *.mp4; do ffmpeg -i "$f" -vf transpose=2 -c:a copy -metadata:s:v rotate="" rotated/"$f"; done


The transpose value can be "1" or "clock" for clockwise rotation, "2" or "cclock" for counter-clockwise rotation. There are other values which will also apply a flip.
The audio will be stream copied to avoid unnecessary re-encoding.
The video stream rotation metadata is cleared in this example. Otherwise ffmpeg will copy it from the input to the output resulting in an incorrect rotation for players that pay attention to this metadata (some do, and some don't).

Another example, more verbose and flexible, and which keeps the rotated file in the same directory with a new name:
ext=mp4
for f in /some/dir/*.$ext; do
    new=${f/%.$ext/-rotated.$ext};
    ffmpeg -i "$f" -vf transpose=2 -c:a copy -metadata:s:v rotate="" "$new"
done


10731: <p>I have approximately 3000 short video clips, each about 3 seconds in duration. I need to rotate each of them 90 degrees. What is the best way to do this? I have Adobe Creative Cloud subscription, as well as access to both Windows and Mac machines. Looking for the easiest solution to automate/batch process the rotation of so many videos.</p>

<p>If you were wondering - the videos are part of an e-learning course on lumber. The learner views each randomly selected video, which is just a short clip of a piece of lumber rotating. The videos were shot so that the lumber (2x4s, etc.) were horizontal. But now the client wants the lumber to be vertical in the clips.</p>
 6685: <p>Based on <a href="https://stackoverflow.com/questions/3937387/rotating-videos-with-ffmpeg">this answer</a> you can use ffmpeg with following commands to rotate a video: </p>

<pre><code>ffmpeg -i input -vf transpose=2 output
</code></pre>

<p>To Batch process a folder of movies you can use a programming language of your choice and iterate through the files. I've used linux with python 2.7+ here. You only have to edit <code>folder_movies</code> path, <code>path_to_ffmpeg</code> and set
your movie <code>extension</code>:</p>

<pre class="lang-py prettyprint-override"><code>import os # import os module
import subprocess # import subprocess module

# set the path to your video folder
folder_movies = '/home/user/Desktop/test/'

# set ffmpeg path
path_to_ffmpeg = "/opt/ffmpeg/ffmpeg"

# set file extension
ext = ".mp4"

# collect all videos in folder_movies
movie_files = [f for f in os.listdir(folder_movies) if f.endswith(ext)] 

# iterate through the files
for i in movie_files:

    # setup correct filepath for mov's
    file_path = os.path.join(folder_movies,i)

    # generate new file path
    new_path = os.path.splitext(file_path)[0] + '_rotated_90' + ext

    # call ffmpeg with the correct arguments
    # command: ffmpeg -i input -vf transpose=2 output
    subprocess.call([path_to_ffmpeg, "-i",  file_path, "-vf", "transpose=2", "-c:a", "copy", new_path])
</code></pre>

<p>Afterwards your movie folder should looks like:</p>

<p><img src="https://i.stack.imgur.com/tpl0h.png" alt="enter image description here"></p>

<p>The advantage of using python is that the code runs <strong>cross platform</strong>. The only thing you need to consider are the paths to the directory and the ffmpeg executable. In order to run this on a <strong>windows machine</strong> you only have to replace the paths to something like:</p>

<pre class="lang-py prettyprint-override"><code># folder_movies = '/home/user/Desktop/test/' # linux or osx
folder_movies = r'c:\some\directory\test'    # windows, the r is important
folder_movies = 'c:/some/directory\test'     # windows (alternative)

# path_to_ffmpeg = '/opt/ffmpeg/ffmpeg'            # linux or osx
path_to_ffmpeg = r'c:\Program Files\ffmpeg\ffmpeg' # windows, the r is important
path_to_ffmpeg = 'c:/Program Files/ffmpeg\ffmpeg'  # windows (alternative)
</code></pre>

<p><strong>Note:</strong> I'm not a ffmpeg expert, maybe there is a way to batch process with it directly.</p>
 4943: <p>You have specified that you are interested in working on a huge number of videos, if you have a multicore machine and you will use a normal <code>for</code> loop provided by your shell, you will have one of your cores running hot, while others are doing absolutely nothing. This is <em>not</em> ideal.</p>

<p>What you should be doing for such a job is using <code>parallel</code>, a tool that allows you to start several jobs at once, and it can do everything that a for-loop can, but better.</p>

<p>I will not write about all the features of this tool, but will concentrate on your specific task.</p>

<p>One way to start all these jobs would be:</p>

<pre><code>parallel avconv -i "{}" -vf transpose=2 "{.}[rotated].mp4" ::: *.mp4
</code></pre>

<p>In here <code>{}</code> replaces each filename, and <code>{.}</code> replaces filename without an extension.</p>

<p>I will suggest that you will start as many jobs as you have cores, take away one. The reason for that is so your operating system will still remain useable, and also this will save you in case if you are using harddisk encryption (which will be using processing power to read/write data). To do this simply add <code>--jobs -1</code> to your command line, and you will limit the number of jobs.</p>

<pre><code>parallel --jobs -1 avconv -i "{}" -vf transpose=2 "{.}[rotated].mp4" ::: *.mp4
</code></pre>

<p>Please keep in mind that no output will be given until each encoding completes. So you will not see just how much of each of your video is done.</p>
 3138: <p>Use <code>ffmpeg</code> and the <a href="https://ffmpeg.org/ffmpeg-filters.html#transpose" rel="nofollow noreferrer">"transpose" filter</a> as <a href="https://video.stackexchange.com/a/15405/3138">"poor" suggested</a>. For example, if your files are mp4 and are in the current directory:</p>

<pre class="lang-bash prettyprint-override"><code>mkdir -p rotated
for f in *.mp4; do ffmpeg -i "$f" -vf transpose=2 -c:a copy -metadata:s:v rotate="" rotated/"$f"; done
</code></pre>

<ul>
<li><p>The transpose value can be "1" or "clock" for clockwise rotation, "2" or "cclock" for counter-clockwise rotation. There are other values which will also apply a flip.</p></li>
<li><p>The audio will be <a href="https://ffmpeg.org/ffmpeg.html#Stream-copy" rel="nofollow noreferrer">stream copied</a> to avoid unnecessary re-encoding.</p></li>
<li><p>The video stream rotation metadata is cleared in this example. Otherwise <code>ffmpeg</code> will copy it from the input to the output resulting in an incorrect rotation for players that pay attention to this metadata (some do, and some don't).</p></li>
</ul>

<p>Another example, more verbose and flexible, and which keeps the rotated file in the same directory with a new name:</p>

<pre class="lang-bash prettyprint-override"><code>ext=mp4
for f in /some/dir/*.$ext; do
    new=${f/%.$ext/-rotated.$ext};
    ffmpeg -i "$f" -vf transpose=2 -c:a copy -metadata:s:v rotate="" "$new"
done
</code></pre>
