Author Topic: adm.audioAddTrack(#) tinyPython r8048 FIXED  (Read 373 times)

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 2826
adm.audioAddTrack(#) tinyPython r8048 FIXED
« on: July 11, 2012, 08: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:
Quote
adm.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:
Quote
adm.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?
« Last Edit: July 11, 2012, 01:45:33 PM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 2826
spidermonkey r8048
« Reply #1 on: July 11, 2012, 09:32:56 AM »
When spidermonkey script is run, the audiotracks would not switch either. Don't have previous scripts to compare with.
« Last Edit: July 11, 2012, 09:34:59 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 2826
QtScript r8048
« Reply #2 on: July 11, 2012, 09:33:56 AM »
QtScript would switch tracks when script is run.

gruntster

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 607
    • http://avidemux.razorbyte.com.au
Re: adm.audioAddTrack(#) tinyPython r8048
« Reply #3 on: July 11, 2012, 11:58:13 AM »
TinyPy scripts should now save correctly (r8051).  SpiderMonkey would need more massaging but it's no worse than before.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 2826
Re: adm.audioAddTrack(#) tinyPython r8048 FIXED
« Reply #4 on: July 11, 2012, 12:35:35 PM »
This is working now:
Code: [Select]
#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:
Code: [Select]
#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:
Code: [Select]
adm = Avidemux()
adm.loadVideo("/media/DataB_SATA3/ToProcess/1Upstairs/arte HD @074540_10JUL2012/arte HD @074540_10JUL2012.trp")
- part were markers  are set:
Code: [Select]
adm.clearSegments()
adm.addSegment(0, 0, 1273140000)
adm.markerA = 0
adm.markerB = 1273140000
This was promising for batch processing.
« Last Edit: July 11, 2012, 01:46:21 PM by Jan Gruuthuse »

gruntster

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 607
    • http://avidemux.razorbyte.com.au
Re: adm.audioAddTrack(#) tinyPython r8048
« Reply #5 on: July 11, 2012, 12:46:30 PM »
You still need to include:

Code: [Select]
adm = Avidemux()

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 2826
Re: adm.audioAddTrack(#) tinyPython r8048
« Reply #6 on: July 11, 2012, 01:20:59 PM »
thank you

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 2826
Re: adm.audioAddTrack(#) tinyPython r8048 FIXED
« Reply #7 on: July 11, 2012, 01:47:45 PM »
and working  :-[
Code: [Select]
#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.