Author Topic: Project Script  (Read 493 times)

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
Project Script
« on: June 05, 2018, 06:54:35 AM »
Frequently using the same settings to apply on your videos?
Save as project and edit the project file so you can use this Project in Avidemux menu Custom.
« Last Edit: June 05, 2018, 07:56:59 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
save Project Script
« Reply #1 on: June 05, 2018, 06:56:28 AM »
- Load a common used video into avidemux.
- Make your standard required settings for your workflow like video, audio, filters ...
- Save the project: Avidemux menu: File: Project Script: use a descriptive name so you recognize what the project does.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
Edit Project Script
« Reply #2 on: June 05, 2018, 06:58:32 AM »
load your saved project file into an ascii editor like file++, gedit:
Code: [Select]
#PY  <- Needed to identify #
#--automatically built--

adm = Avidemux()
adm.loadVideo("/media/Work/720p4audioTracks3sat.ts")
adm.clearSegments()
adm.addSegment(0, 0, 37930000)
adm.markerA = 0
adm.markerB = 37930000
adm.videoCodec("Copy")
adm.audioClearTracks()
adm.setSourceTrackLanguage(0,"und")
adm.audioAddTrack(0)
adm.audioCodec(0, "copy");
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.setContainer("MKV", "forceDisplayWidth=False", "displayWidth=1280", "displayAspectRatio=0")

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
remove reference to loaded video Project Script
« Reply #3 on: June 05, 2018, 07:03:11 AM »
remove this block = reference to loaded video when you saved the script

Code: [Select]
adm.loadVideo("/media/Work/720p4audioTracks3sat.ts")
adm.clearSegments()
adm.addSegment(0, 0, 37930000)
adm.markerA = 0
adm.markerB = 37930000

so it does not load the video when you apply the script from custom

save the script.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
Project Script place into Avidemux Custom
« Reply #4 on: June 05, 2018, 07:06:11 AM »
Linux: in the hidden folder: ~/.avidemux6/custom create these folders (could be any name you want)
 Audio
 Screen
In these you can copy your saved/edited projects of repetitive settings you need to perform like these 2:
 ac3T2toT0: dolby track from track 2 to track 0, most of German satellite FTA HD are like this, except phoenix.
 3satHDac3: similar as above but has has 4 audio tracks instead of 3
After avidemux restart these are now available in avidemux main menu -> Custom

Windows: something similar should be possible in %APPDATA%/avidemux6/custom Still need confirmation this is the correct folder
Avidemux 2.6.8  custom on Windows 7

see samples bellow
« Last Edit: June 05, 2018, 07:50:52 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
audio: ac3T2toT0
« Reply #5 on: June 05, 2018, 07:15:10 AM »
/custom/Audio

Code: [Select]
#PY  <- Needed to identify #
#--automatically built--
# ard HD exchange audio tracks from position
# hr, mdr, ndr, swr, ...
# source video: xp1000

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

switches ac3 3rd track (2) to 1st track (0) and track (0) to track (2)
« Last Edit: June 05, 2018, 08:12:52 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
audio: 3satHDac3
« Reply #6 on: June 05, 2018, 07:15:53 AM »
/custom/Audio

Code: [Select]
#PY  <- Needed to identify #
#--automatically built--
# 3sat HD exchange audio tracks from position
# source video: xp1000, xp1000s, TM6900HDsuper
# 2015 June

adm = Avidemux()
adm.videoCodec("Copy")
adm.audioClearTracks()
adm.setSourceTrackLanguage(0,"deu")
adm.setSourceTrackLanguage(1,"deu")
adm.setSourceTrackLanguage(2,"deu")
adm.setSourceTrackLanguage(3,"deu")
adm.audioAddTrack(2)
adm.audioCodec(0, "copy");
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.audioAddTrack(0)
adm.audioCodec(1, "copy");
adm.audioSetDrc(1, 0)
adm.audioSetShift(1, 0,0)
adm.audioAddTrack(1)
adm.audioCodec(2, "copy");
adm.audioSetDrc(2, 0)
adm.audioSetShift(2, 0,0)
adm.audioAddTrack(3)
adm.audioCodec(3, "copy");
adm.audioSetDrc(3, 0)
adm.audioSetShift(3, 0,0)
adm.setContainer("ffTS", "acceptNonCompliant=False", "vbr=True", "muxRateInMBits=10")
« Last Edit: June 05, 2018, 07:49:56 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
screen: 0768x432vdpauResize
« Reply #7 on: June 05, 2018, 07:18:21 AM »
/custom/Screen

Code: [Select]
#PY  <- Needed to identify #
#--automatically built--
# 16:9 768*432
adm = Avidemux()
adm.videoCodec("x264", "useAdvancedConfiguration=True", "general.params=AQ=23", "general.threads=0", "general.preset=ultrafast", "general.tuning=film", "general.profile=baseline", "general.fast_decode=False", "general.zero_latency=False"
, "general.fast_first_pass=True", "level=41", "vui.sar_height=1", "vui.sar_width=1", "MaxRefFrames=3", "MinIdr=25", "MaxIdr=250", "i_scenecut_threshold=40", "intra_refresh=False", "MaxBFrame=3", "i_bframe_adaptive=1"
, "i_bframe_bias=0", "i_bframe_pyramid=2", "b_deblocking_filter=True", "i_deblocking_filter_alphac0=0", "i_deblocking_filter_beta=0", "cabac=True", "interlaced=False", "constrained_intra=False", "tff=True"
, "fake_interlaced=False", "analyze.b_8x8=True", "analyze.b_i4x4=True", "analyze.b_i8x8=True", "analyze.b_p8x8=True", "analyze.b_p16x16=False", "analyze.b_b16x16=False", "analyze.weighted_pred=2", "analyze.weighted_bipred=True"
, "analyze.direct_mv_pred=1", "analyze.chroma_offset=0", "analyze.me_method=1", "analyze.me_range=16", "analyze.mv_range=-1", "analyze.mv_range_thread=-1", "analyze.subpel_refine=7", "analyze.chroma_me=True"
, "analyze.mixed_references=True", "analyze.trellis=1", "analyze.psy_rd=1.000000", "analyze.psy_trellis=0.000000", "analyze.fast_pskip=True", "analyze.dct_decimate=True", "analyze.noise_reduction=0", "analyze.psy=True"
, "analyze.intra_luma=11", "analyze.inter_luma=21", "ratecontrol.rc_method=0", "ratecontrol.qp_constant=0", "ratecontrol.qp_min=10", "ratecontrol.qp_max=51", "ratecontrol.qp_step=4", "ratecontrol.bitrate=0"
, "ratecontrol.rate_tolerance=1.000000", "ratecontrol.vbv_max_bitrate=0", "ratecontrol.vbv_buffer_size=0", "ratecontrol.vbv_buffer_init=0", "ratecontrol.ip_factor=1.400000", "ratecontrol.pb_factor=1.300000"
, "ratecontrol.aq_mode=1", "ratecontrol.aq_strength=1.000000", "ratecontrol.mb_tree=True", "ratecontrol.lookahead=40")
adm.addVideoFilter("vdpauResize", "targetWidth=768", "targetHeight=432")
adm.audioClearTracks()
adm.setSourceTrackLanguage(0,"eng")
adm.audioAddTrack(0)
adm.audioCodec(0, "copy");
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.setContainer("MKV", "forceDisplayWidth=False", "displayWidth=1280")

output sample on YouTube: 720p to 768x432
« Last Edit: June 05, 2018, 07:50:16 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
screen: 0854x480 Sony Xperia M
« Reply #8 on: June 05, 2018, 07:21:46 AM »
/custom/Screen

Code: [Select]
#PY  <- Needed to identify #
#--automatically built--
# 16:9 854*480
# Sony Xperia M

adm = Avidemux()
adm.videoCodec("x264", "useAdvancedConfiguration=True", "general.params=AQ=23", "general.threads=0", "general.preset=ultrafast", "general.tuning=film", "general.profile=baseline", "general.fast_decode=False", "general.zero_latency=False"
, "general.fast_first_pass=True", "level=41", "vui.sar_height=1", "vui.sar_width=1", "MaxRefFrames=3", "MinIdr=25", "MaxIdr=250", "i_scenecut_threshold=40", "intra_refresh=False", "MaxBFrame=3", "i_bframe_adaptive=1"
, "i_bframe_bias=0", "i_bframe_pyramid=2", "b_deblocking_filter=True", "i_deblocking_filter_alphac0=0", "i_deblocking_filter_beta=0", "cabac=True", "interlaced=False", "constrained_intra=False", "tff=True"
, "fake_interlaced=False", "analyze.b_8x8=True", "analyze.b_i4x4=True", "analyze.b_i8x8=True", "analyze.b_p8x8=True", "analyze.b_p16x16=False", "analyze.b_b16x16=False", "analyze.weighted_pred=2", "analyze.weighted_bipred=True"
, "analyze.direct_mv_pred=1", "analyze.chroma_offset=0", "analyze.me_method=1", "analyze.me_range=16", "analyze.mv_range=-1", "analyze.mv_range_thread=-1", "analyze.subpel_refine=7", "analyze.chroma_me=True"
, "analyze.mixed_references=True", "analyze.trellis=1", "analyze.psy_rd=1.000000", "analyze.psy_trellis=0.000000", "analyze.fast_pskip=True", "analyze.dct_decimate=True", "analyze.noise_reduction=0", "analyze.psy=True"
, "analyze.intra_luma=11", "analyze.inter_luma=21", "ratecontrol.rc_method=0", "ratecontrol.qp_constant=0", "ratecontrol.qp_min=10", "ratecontrol.qp_max=51", "ratecontrol.qp_step=4", "ratecontrol.bitrate=0"
, "ratecontrol.rate_tolerance=1.000000", "ratecontrol.vbv_max_bitrate=0", "ratecontrol.vbv_buffer_size=0", "ratecontrol.vbv_buffer_init=0", "ratecontrol.ip_factor=1.400000", "ratecontrol.pb_factor=1.300000"
, "ratecontrol.aq_mode=1", "ratecontrol.aq_strength=1.000000", "ratecontrol.mb_tree=True", "ratecontrol.lookahead=40")
adm.addVideoFilter("vdpauResize", "targetWidth=854", "targetHeight=480")
adm.audioClearTracks()
adm.setSourceTrackLanguage(0,"eng")
adm.audioAddTrack(0)
adm.audioCodec(0, "copy");
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.setContainer("MKV", "forceDisplayWidth=False", "displayWidth=1280")

output sample on YouTube: Sony Xperia M
« Last Edit: June 05, 2018, 07:50:24 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6022
Re: Project Script
« Reply #9 on: June 05, 2018, 08:16:27 AM »
feel free to post your own general saved project script that you apply in the same way ;)
explain briefly what it does. thanks.