Ranking
Original Post
Windows Batch - MPEG to FLV(or AVI) (for movie.lua)
Big Note: You don't have to convert to FLV, you can encode to any supported format by FFmpeg, AVI would be the more popular since FLV is useless to anyone accept website owners

It's a batch I wrote so I don't have to download an FLV converter to use the Toribash replays on my site - Enjoy.

The title is vague because it's short but this is what it does:
It's just a command-line batch that converts the video created from the movie.lua script to .flv so you can put it in flash players such as the JW FLV Player.
If you want to make it an AVI just change the second to last line where it says: %getdir%\%1.flv to .avi
@echo off
setlocal
set getdir="%CD%"
set pathto=C:\Program Files\Toribash\data\bin
cd %pathto%
ffmpeg.exe -i %getdir%\%1 -s 640x480 -ar 44100 -r 12 %getdir%\%1.flv
cd %getdir%
Download the attachment, change the filetype to .bat then in the command prompt just go to where movie.lua puts the .mpeg then just type:
mpegtoflv <filename>
Example:
mpegtoflv 2051_movie.mpeg

It gets converted in the same folder so you don't have to move anywhere,
you can customize the batch pretty easily to output the file wherever you
want. You can also changed the resolution from 640x480, these are the possible options:
`-s size'
Set frame size. The format is `wxh' (ffserver default = 160x128, ffmpeg default = same as source). The following abbreviations are recognized:

`sqcif'
128x96
`qcif'
176x144
`cif'
352x288
`4cif'
704x576
`qqvga'
160x120
`qvga'
320x240
`vga'
640x480
`svga'
800x600
`xga'
1024x768
`uxga'
1600x1200
`qxga'
2048x1536
`sxga'
1280x1024
`qsxga'
2560x2048
`hsxga'
5120x4096
`wvga'
852x480
`wxga'
1366x768
`wsxga'
1600x1024
`wuxga'
1920x1200
`woxga'
2560x1600
`wqsxga'
3200x2048
`wquxga'
3840x2400
`whsxga'
6400x4096
`whuxga'
7680x4800
`cga'
320x200
`ega'
640x350
`hd480'
852x480
`hd720'
1280x720
`hd1080'
1920x1080

Attached Files
mpegtoflv.txt (183 Bytes, 29 views)
Last edited by Eiroku; Aug 17, 2007 at 04:24 AM. Reason: needs to add AVI info
ffmpeg is so unbelievably complicated, great script, thank you.
凸[◣_◢]凸 PRAISE LID 凸[◣_◢]凸 FUCK THA HATERS 凸[◣_◢]凸 PUT THIS IN YO SIG IF U DOWN 凸[◣_◢]凸
For now, since everyone wants to make movies, I'll sticky this.
Last edited by Hamr; Aug 17, 2007 at 01:50 AM.

<suomynona> It might kill you, but, that's the worst it'll do
At least one of my tutorials is stickied, thanks hammerheadbang
01110111011010000110100101101100011001010010100000 10101000101000011110000010101100101011001010010011 11010010101000101000011110010010101100101011001010 010010100100111011