Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: Jan Gruuthuse on July 11, 2012, 07:39:49 AM

Title: adm.audioAddTrack(#) tinyPython r8048 FIXED
Post by: Jan Gruuthuse on July 11, 2012, 07:39:49 AM
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?
Title: spidermonkey r8048
Post by: Jan Gruuthuse on July 11, 2012, 08:32:56 AM
When spidermonkey script is run, the audiotracks would not switch either. Don't have previous scripts to compare with.
Title: QtScript r8048
Post by: Jan Gruuthuse on July 11, 2012, 08:33:56 AM
QtScript would switch tracks when script is run.
Title: Re: adm.audioAddTrack(#) tinyPython r8048
Post by: gruntster on July 11, 2012, 10:58:13 AM
TinyPy scripts should now save correctly (r8051).  SpiderMonkey would need more massaging but it's no worse than before.
Title: Re: adm.audioAddTrack(#) tinyPython r8048 FIXED
Post by: Jan Gruuthuse on July 11, 2012, 11:35:35 AM
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.
Title: Re: adm.audioAddTrack(#) tinyPython r8048
Post by: gruntster on July 11, 2012, 11:46:30 AM
You still need to include:


adm = Avidemux()
Title: Re: adm.audioAddTrack(#) tinyPython r8048
Post by: Jan Gruuthuse on July 11, 2012, 12:20:59 PM
thank you
Title: Re: adm.audioAddTrack(#) tinyPython r8048 FIXED
Post by: Jan Gruuthuse on July 11, 2012, 12:47:45 PM
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.