News:

--

Main Menu

adm.audioAddTrack(#) tinyPython r8048 FIXED

Started by Jan Gruuthuse, July 11, 2012, 07:39:49 AM

Previous topic - Next topic

Jan Gruuthuse

python fixed in r8051
Just found out: when saving a tinyPython project, the script does not save the changed audio track status. It saves only the initial audio track status. As it was when video is loaded.
Videoclip has 0,1,2 tracks. 2 has ac3 that needs to be in track 0
Exchange track 0 with 2 (0->2, 2->0)
When applying changes and saving the script has this:
Quoteadm.videoCodec("Copy")
adm.audioClearTracks()
adm.audioAddTrack(0)
adm.audioCodec(2, "copy");
adm.audioAddTrack(1)
adm.audioCodec(1, "copy");
adm.audioAddTrack(2)
adm.audioCodec(0, "copy");
when script is run tracks don't change from location.
Saved script should have this:
Quoteadm.videoCodec("Copy")
adm.audioClearTracks()
adm.audioAddTrack(2)
adm.audioCodec(2, "copy");
adm.audioAddTrack(1)
adm.audioCodec(1, "copy");
adm.audioAddTrack(0)
adm.audioCodec(0, "copy");
when this is run, audio tracks are switched from place.
Can you confirm this observation?

Jan Gruuthuse

#1
When spidermonkey script is run, the audiotracks would not switch either. Don't have previous scripts to compare with.

Jan Gruuthuse

QtScript would switch tracks when script is run.

gruntster

TinyPy scripts should now save correctly (r8051).  SpiderMonkey would need more massaging but it's no worse than before.

Jan Gruuthuse

#4
This is working now:
#PY  <- Needed to identify #
#--automatically built--

adm = Avidemux()
adm.loadVideo("/media/DataB_SATA3/ToProcess/1Upstairs/arte HD @074540_10JUL2012/arte HD @074540_10JUL2012.trp")
adm.clearSegments()
adm.addSegment(0, 0, 1273140000)
adm.markerA = 0
adm.markerB = 1273140000
adm.videoCodec("Copy")
adm.audioClearTracks()
adm.audioAddTrack(0)
adm.audioCodec(0, "copy");
adm.audioAddTrack(1)
adm.audioCodec(1, "copy");
adm.audioAddTrack(2)
adm.audioCodec(2, "copy");
adm.setContainer("ffTS", "acceptNonCompliant=False", "vbr=True", "muxRateInMBits=10")


however this was previously working to, not anymore:
#PY  <- Needed to identify #
#--automatically built--

adm.videoCodec("Copy")
adm.audioClearTracks()
adm.audioAddTrack(2)
adm.audioCodec(0, "copy");
adm.audioAddTrack(1)
adm.audioCodec(1, "copy");
adm.audioAddTrack(0)
adm.audioCodec(2, "copy");
adm.setContainer("ffTS", "acceptNonCompliant=False", "vbr=True", "muxRateInMBits=10")

omitting
- part where video is loaded:
adm = Avidemux()
adm.loadVideo("/media/DataB_SATA3/ToProcess/1Upstairs/arte HD @074540_10JUL2012/arte HD @074540_10JUL2012.trp")

- part were markers  are set:
adm.clearSegments()
adm.addSegment(0, 0, 1273140000)
adm.markerA = 0
adm.markerB = 1273140000

This was promising for batch processing.

gruntster

You still need to include:


adm = Avidemux()


Jan Gruuthuse

and working  :-[
#PY  <- Needed to identify #
#--automatically built--
adm = Avidemux()

adm.videoCodec("Copy")
adm.audioClearTracks()
adm.audioAddTrack(2)
adm.audioCodec(0, "copy");
adm.audioAddTrack(1)
adm.audioCodec(1, "copy");
adm.audioAddTrack(0)
adm.audioCodec(2, "copy");
adm.setContainer("ffTS", "acceptNonCompliant=False", "vbr=True", "muxRateInMBits=10")

not deleting adm = Avidemux() as you pointed out.