Using Python snd FFMPEG to Convert AVI and MOV and merge MP4

Share your custom panels, brushes, papers... (you need to be registered to read posts in this section)
Post Reply
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Using Python snd FFMPEG to Convert AVI and MOV and merge MP4

Post by Mads Juul »

I'm using TVPaint 64 bit on Windows 8.1. But as discussed in this thread http://forum.tvpaint.com/viewtopic.php?f=10&t=5888
is it not possible to export and import MOV and MP4 files to TVPaint 64 bit, only in the 32 bit version of TVPaint.
Therefor I have developed a workflow where I use Python Script and Command Line FFMPEG to convert my files.
It is a workflow I like, so I thought maybe others will and therefor I am sharing it here.

The Scripts is only tested on Windows and the install is only covered on Windows.

To make it work You first have to have FFMPEG and Python installed on your computer.
1) Install FFMPEG
You can get FFMPEG from here http://www.ffmpeg.org/download.html
I have made a video how I install FFMPEG on my windows machine http://youtu.be/3saGdWxV23c
When installing FFMPEG you have to add the path to to ffmpeg.exe to the Windows Environment Variables. This is explained in the Video.
2) Install Python
You can get Pythonfrom here https://www.python.org/downloads/
I have made a video how I install Python on my windows machine http://youtu.be/1apTEuy_lMw

Then You need to Download the 5 python scripts. I attached them to this post in a ZIP archive
So download the Zip archive on extract them into a folder of your choice

The Zip archive contains 5 Python scripts
1) "MJ_ffmpeg_AVI_to_MOV_v02.py" I made a video how to use it here http://youtu.be/GvAVxCzW79o
The codec of the output mov file should be Lossless Aniation. I think I forgot to mentione this in the video.
2) "MJ_ffmpeg_AVI_to_MP4_v02.py" I made a video how to use it here http://youtu.be/Dt_-8-AHUb4
3) "MJ_ffmpeg_MERGE_ALL_MP4_v02" I made a video how to use it here http://youtu.be/92cy54UXNEQ
please notice this script. If I'm working on a feature movie and all the individual sequences saved as mp4 files. I can collect them all to one file under 4 minutes with this script.
4) "MJ_ffmpeg_MOV_and_MP4_to_AVI_v02" I made a video how to use it here http://youtu.be/G1WaEsmEOc8
Please noticed this script also convert MP4. In the video it is only MP4
5) "MJ_ffmpeg_video_to_WAV_v01" I made a video how to use it here http://youtu.be/9Z_W4j5KYRE

I hope they will be usefull for others
Kind Regards Mads
Attachments
MJ_ffmpeg_python_scripts_v02.zip
(4.24 KiB) Downloaded 248 times
Last edited by Mads Juul on 18 May 2014, 07:51, edited 7 times in total.
alfatoons
Posts: 53
Joined: 21 Oct 2010, 12:16

Re: Python Scripts for using FFMPEG to Convert AVI and MOV F

Post by alfatoons »

"is it not possible to export and import MOV and MP4 files to TVPaint 64 bit, only in the 32 bit version of TVPaint."


????????? What what??
I´m not a computer Wiz, but it sounds crazy to me.

Is´nt 64 bit like an upgrade from 32 bit?? :?:
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: Python Scripts for using FFMPEG to Convert AVI and MOV F

Post by Mads Juul »

alfatoons wrote: ????????? What what??
Yes it seems to be a decision by Apple some years ago , to discontinue Quicktime this is why quicktime is not supporting 64 bit.
Please read and comment on this topic if you have questions regarding TVpaint 64 bit and Quicktime. http://forum.tvpaint.com/viewtopic.php?f=10&t=5888
alfatoons wrote:Is´nt 64 bit like an upgrade from 32 bit?? :?:
TVpaint 64 bits works much faster than 32 bit. This is why I am only using this, and I love it! Then there is this (small) issue with exporting Mov and Mp4. There is several solutions for this. You can have both 32 and 64 installed on the same computer and then work in 64 bit and when export you can open your project in 32 bit and export mov. You can also export in internal avi and then convert in other software.

This is seen before in other software. I remember I used a software called Soernsen Squeeze http://www.sorensonmedia.com/squeeze/squeeze-9/ On the movies I had rendered out from Adobe After effects because I needed very small filesizes for emailing and After Effects was not capable of this (at this time).

This is why I now use Python and ffmpeg because it is free. Im using my MJ_ffmpeg_AVI_to_MP4.py script on all the files I render from TVPaint 64 bit OR 32 bit, and ToonBoom storyboard pro on Adobe Premiere on ADobe After Effects. Becausse it is much faster. I think FFMPEG is a very good file converter. I can get very small filesizes for amailing that still looks all right with FFMPEG.

So I think these Python script is potential interesting for all both 32 bit and 64 bit.

But again if you want to discuss Quicktime and TVPaint plase do it at this thread http://forum.tvpaint.com/viewtopic.php?f=10&t=5888
and lets keep this thread about using ffmpeg and Python for file converting.
Kind Regards Mads
Last edited by Mads Juul on 18 May 2014, 07:59, edited 1 time in total.
User avatar
Mads Juul
Posts: 3992
Joined: 02 May 2007, 19:18

Re: Using Python Scripts and FFMPEG to Convert AVI and MOV F

Post by Mads Juul »

I just Added a script to merge all MP4 files in the same folder. And fond and corrected a bug when you burn name without scaling.
alfatoons
Posts: 53
Joined: 21 Oct 2010, 12:16

Re: Using Python snd FFMPEG to Convert AVI and MOV and merge

Post by alfatoons »

Thanx mads for the explanation. When ever I can wrap my head around. All this techno stuff I will look at it. In the meantime. I will draw:-)
Post Reply