Log in

View Full Version : Mass Encoding?


The Master
19th August 2009, 03:57
I would like to mass encode off x264 from mostly normal .AVI's

I was wondering what software to use (mediacoder pro?) I don't think the software I used last time.. avidemux really supports this..

I would like this software to be able to find the .avi's from a massive folder collection and then create .mp4 or .flv preferably with the "progressive download" youtube setting enabled on all videos (as this would be uploaded/played) and place those files in the same folder as the originals it transcoded..

Blue_MiSfit
19th August 2009, 04:07
There are definitely apps out there that can do this pretty easily. I'm not sure how they compare though...

~MiSfit

stax76
19th August 2009, 12:39
StaxRip is can do it.

The Master
19th August 2009, 21:12
How exactly does it scan Directory's for all .avi's I don't see that?

When I tell it to Directory Batch it just gives me a error for not having any .avi's in the root folder..

Dark Shikari
19th August 2009, 21:18
This sounds like a 3-line bash script...

The Master
19th August 2009, 21:53
Probably not running unix though.. I take it that makes a difference if it's windows...

stax76
19th August 2009, 21:54
How exactly does it scan Directory's for all .avi's I don't see that?

Use win explorer shell search to gather files into explorer folder view, drag & drop onto File Batch dialog in StaxRip.

This sounds like a 3-line bash script...

I would like to see this!

microchip8
19th August 2009, 22:08
Use win explorer shell search to gather files into explorer folder view, drag & drop onto File Batch dialog in StaxRip.



I would like to see this!

for i in *.avi; do
<decoder like mplayer/ffmpeg | x264 encoder stuff>
done

you can refine the for loop a bit to go recursively through dirs and find only avi files, which the OP asked for.

popper
20th August 2009, 00:25
StaxRip is can do it.

hmm, i notice the latest one is dated
StaxRip_1.1.1.3beta.7z windows 20.0 MiB Thu Jul 23 2009 19:06

does that include new options for the current mbtree additions?

and are you currently adding or finished the newest 'Lookahead VBV' http://forum.doom9.org/showthread.php?t=148964
and updated the download and information pages!
current revision: 1217 x264.exe 32bit:

there are a very few GUis that do infact look in a 'watch dir' or parse a given tree for content to show up there and so start work automaticly.

iv also had lots of problems trying to find an app that can simply take mkv's with Vorbis or DTS audio, + oddball non mod16 video, demux them, resize to the next highest mod16 size, and encode with the very latest x264 options for
--crf 22 --ref 3 --level 3.1 --bframes 3 --mbtree
and ouput AVC/AAC=2 inputname-fixed.mp4

an added bonus would be filters for attempting to clean up and sharpening the old masters both B&W and colour quality a little.

but at the end of the day a simple
'preset watch dir'<>input decode<>preset x264+AAC=2 Encode<>'muxed to a named SD *-fixed.mp4 in a preset dir'

is all most people need, and there are a lack of these SIMPLE basic GUIs around to help you do that with --mbtree, and set the final batch output options you want as a one time thing before you set it off to do its thing....

can your StaxRip as it stands now or after you add the latest x264 options do that basic thing.

and OC after this current 'VBV lookahead' DS said "Anything else coming in the next few weeks?

Explicit weighted prediction (weightp) and threaded lookahead are both coming Soon™." so theres some GUI update work required later too.

stax76
20th August 2009, 01:00
Please make a request or two in the StaxRip thread. Regarding monitoring a folder, I'm not sure if this was requested before, a full blown .NET GUI application is memory hungry, I'm not sure if it's a good idea to run it permanently to monitor a folder. What about using windows task scheduler to run a script periodically that would then start a encoding application in case a new file appears.

Snowknight26
20th August 2009, 01:09
Here's a sample bat that should help you on your way. Couple key things to change: the final container, the audio format (there are more, but like I said, this is just a sample). The sample might also not be up-to-date with the x264 API, so that's another thing to look for.


SETLOCAL ENABLEDELAYEDEXPANSION
SETLOCAL ENABLEEXTENSIONS
for /F "delims=;" %%A IN ('dir /b *.avi') DO (
ffmpeg -i "%%A" -acodec ac3 -ab 192000 "%%~nA.ac3"
ffmpeg -i "%%A" -vcodec rawvideo -f rawvideo -an -pix_fmt yuv420p - | x264 --fps 30 --crf 19 --bframes 5 --b-adapt 2 --ref 10 --mixed-refs --no-fast-pskip --direct auto --deblock -3:-3 --subme 10 --trellis 2 --analyse all --me umh --ssim --output "%%~nA.noaudio.mkv" - 1280x1024
mkvmerge -o "%%~nA.final.mkv" --forced-track 1:no -d 1 -A -S "%%~nA.noaudio.mkv" --forced-track 0:no -a 0 -D -S "%%~nA.ac3" --track-order 0:1,1:0
del "%%~nA.ac3"
del "%%~nA.noaudio.mkv"
:del "%%A"
)
pause


Pair that up with a webpage that uses a Javascript SWFObject Object and you're golden.

popper
20th August 2009, 02:39
cheers Snowknight26 , thats whats so good about D9 people your so clever at these scripting and other things:)

ill give that a go soon.

its a shame no one seems interested writing many tiny quick rebol view scripts for the GUi front ends of the various CLI apps,
and im just not cut out for scripting or id have tryed to do it long ago, even though clearly its potentially a very interesting
and tiny prototyping cross platform script engine.

http://www.rebol.com/view-platforms.html

as an example and give anyone interested the best 'rebol View' guide
http://musiclessonz.com/rebol.html
"
To whet your appetite, here are several tiny GUI programs that demonstrate just how potent REBOL code is.
The first example is a freehand painting program you can use to draw and save images
-------cut
view center-face layout [
h1 "Paint:"
s: area black 650x350 feel [engage: func [f a e] [
if a = 'over [append s/effect/draw e/offset show s]
if a = 'up [append s/effect/draw 'line]]] effect [draw [line]
]
b: btn "Save Image" [save/png %a.png to-image s alert "Saved 'a.png'"]
btn "Clear" [s/effect/draw: copy [line] show s]
]

---------cut
"

http://www.rebol.org/view-script.r?script=oneliner-webserver.r
oneliner-webserver.r

------------
secure[net allow library throw shell throw file throw %. [allow read]]p: open/lines tcp://:80 forever[attempt[s: length? b: read/binary to-file next pick parse pick c: p/1 1 none 2 write-io c b: rejoin[#{}"HTTP/1.0 200 OK^M^JServer: Rebol^M^JContent-length: "s"^M^JContent-type: text/html^M^J^M^J"b]length? b close c]]
----------

the MB will probably mess up the formating but still work pasted into rebols shell
if your into small self contained +script GUI, tcp:ip,UDP,client/server app scripting its werth a look i guess, and it would be good to see something interesting GUI encoder wise to address stax76's valid massive .NET app points.

von_Runkel
20th August 2009, 05:54
This one-liner does the the recursion too:

for /r c:\video %%x in (*.avi) do ffmpeg -y -i "%%x" -vcodec libx264 "%%~dpnx.mp4" && ren "%%x" "%%~nx.done"

Of course you need to adjust the arguments to ffmpeg. And maybe add some error checking/handling. :)

Source file is renamed to *.done only if ffmpeg exits cleanly (=source file was successfully encoded)

The Master
31st August 2009, 21:36
Stax

I still don't get yet how to use your software..

I guess my main questions are..
Is it set to auto resize everything or will it just leave existing videos the way they are?
How do you add the "progressive download" flag I assume it has something to do with mp4box?
How do you make it delete the folder it's creating called "temp files"?

And for some weird reason one of my 1st test encodes.. is unplayable after 10-20 seconds it was a 35 seconds long though.. and weirdly reports as a 1:10? (plays in windows media player classic to 35.. then goes weird.. in wmp it crashes) I guess it would make sense that it doubled it somehow since its 35 seconds x2 is 70 seconds or 1:10

Given I'm a amateur at best to video encoding.. I would need your help to baby step through this program.. if I was going to do this project..

stax76
31st August 2009, 22:32
Is it set to auto resize everything or will it just leave existing videos the way they are?

Depends on configuration, generally it has rich configuration and automation support.

How do you add the "progressive download" flag I assume it has something to do with mp4box?

Never heard of this before.

How do you make it delete the folder it's creating called "temp files"?

I'm not sure if there is direct support or if some advanced features like command events could do it, the application is 8 years old and sometimes I forget things, I would investigate it if somebody post a request to the StaxRip support thread.

Given I'm a amateur at best to video encoding.. I would need your help to baby step through this program.. if I was going to do this project..

Every developer expects people to put effort into a request, finding and understanding the option 'Auto Resize Image Size' isn't so hard for instance.

The Master
31st August 2009, 23:35
It's the MOOV atoms thing I think.. here I found a article about "progressive download" (sort of)

http://www.longtailvideo.com/support/forum/General-Chat/14763/Playing-mp4-video-in-JW-FLV-Media-Player-4-2-

I'm still confused about the resize thing??
By default your program doesn't resize.. just leaves alone?
You need me to place a post in the thread so you can create a feature to delete this folder for example.. "DSC_0001 temp files" (created in the folder of my .avi file) ???

stax76
1st September 2009, 00:01
It resizes by default, uncheck the resize filter to prevent resizing. There is a option to delete the temp dir at Options/Advanced/Misc

In the initial post of the StaxRip support thread you can find links to guides people wrote about how to use StaxRip, there are also videos and screencasts showing how to use StaxRip, I recommend to read/watch some of them before using StaxRip.

The Master
1st September 2009, 01:54
Roger that will work for now.. thanks..