News:

--

Main Menu

... Another TinyPy help request

Started by RobertISaar, May 17, 2013, 05:28:59 PM

Previous topic - Next topic

RobertISaar

hello all, longish time(since 2009) avidemux user. just found the windows x64 2.6.4 stuff the other day(have been using latest stable release for a while), did some preliminary testing and what i can get to work i like.

i normally do batches of videos(anywhere between 4 and 10 files at a time), but noticed that with 2.6.4, MPEG2 conversion is kicking along at some incredible speeds compared to before when doing 1 file at a time. i assume due to multithreading? i always had it enabled in 2.5.x, but never saw a difference?

in any case, i had a nice java script i put together working in 2.5.x, but with the move to python for 2.6.x, i'm lost. i have no formal training with any kind of programming, what i am "comfortable" with is motorola 68hc11 assembly but that's not of much use here.

i've gotten most of a python script working due to studying the included dvd script and what was posted here:

http://www.avidemux.org/admWiki/doku.php?id=tinypy:avidemux

and i have come up with this so far:

adm = Avidemux()
adm.videoCodec("ffMpeg2")
adm.audioClearTracks()
adm.audioAddTrack(0)
adm.audioCodec(0, "Aften");
adm.audioSetMixer(0, "STEREO");
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.audioSetNormalize(0, 1, 10)
adm.setContainer("ffPS","muxingType=2","acceptNonCompliant=False","muxRatekBits=11000","videoRatekBits=9800","bufferSizekBytes=224")

so what i do have is the correct audio codec selected, forced stereo remixing(i'd like to detect this and only do it when necessary, but it's not that big of a deal most of the time), automatic normalization. container is set correctly as well.

video codec is selected correctly, but i have no idea how to pass certain commands in and get useful information and settings out, especially filters. i do codec config manually every time due to varying size requirements(it would be nice to have thread selection be automatically set, but since it's a click away, it's not a big deal), but filters are where i have issues. i'd like to have the filters get setup to have the video scale up or down to 720 X 480 without stretching or cropping the video(so black bars when necessary) and have framerate set to 29.97(assuming it wasn't already).

if somebody could point out the commands i'm missing that would be great, or just copy/paste the correct information with a short explanation of how it works, that would also work great for me.

Jan Gruuthuse

#1
Not much help from me. I don't program. Can't you work around this? If all conversions you make are similar? With setting one video in GUI, how it should be and then save as a project?
The project can then be edited and the specific info to that video can be deleted. This project file can then be called from script and would act like a settings file. More like this example (very basic): 2.6 audio track switching in job.py

RobertISaar

i believe i've tried that before, with varying degrees of success, but i seem to remember the aspect ratio getting changed when used on a video with different source dimensions.

Jan Gruuthuse

correct, I use a 4:3 and 16:9 folder and distribute accordingly the videos in these.