Script For Play Image Series (Sequence) or movie
ajd_at_072df9a27d
Posts: 60
Script for Play Sequence Images or Video with One click or automatically
Script DAZ Studio 3.xx or 4.xx, with MPV(mplayer), play Sequence images or video.
- Play real rate 15, 30 or 60 fps.
- Play Audio External (default wav DAZ Studio).
- Loop Infinite
- A-B loop points
- Control Velocity
- Range Preview (settings of movie DAZ)
- Play Mix different image sizes
- Play automatically after rendering in 4.8.
Requeriments:
Script DAZ Studio
mpv (mplayer)
https://mpv.srsfckn.biz/ <---- For Windows
// DAZ Studio version 3.1 filetype DAZ ScriptMpv = '"C:/Program Files/MPV/mpv.exe"'var oRenderMgr = App.getRenderMgr();var settings = oRenderMgr.getRenderOptions(); var FileNameAudiovar tick = Scene.getTimeStep();var fps = Math.round( 4800 / tick );var TimeRange=Scene.getPlayRange();//Make Movieif (settings.isCurrentFrameRender==0){ RangeTimeMovie=DzTimeRange(settings.getStartTime,settings.getEndTime ) FrameA = RangeTimeMovie.start/tick FrameB = RangeTimeMovie.end/tick Startss = FrameA / fps Endss = FrameB / fps if(settings.renderMovToId==0) { FileName = settings.renderMovFilename PFileVideo = ' --no-correct-pts --fps=' + fps + ' "' + FileName + '" ' } else if(settings.renderMovToId==1) { var regexp1 = /(\.)(.{1,3})$/; FileName = settings.renderSerFilename FileName = FileName.replace(regexp1,"*$1$2") PFileVideo = ' --mf-fps=' + fps + ' "mf://' + FileName + '" ' } if (Scene.getAudio()) { PAudioFile = ' --audio-file="' + Scene.getAudio().filename + '" ' } else { PAudioFile = "" } OSD='--osd-level=3 --osd-msg3="Time: ${playback-time/full} - Frame/Total: ${estimated-frame-number}/${estimated-frame-count}"' Arg = OSD + PAudioFile + ' -start ' + Startss + ' --ab-loop-a=' + Startss + ' --ab-loop-b=' + Endss + ' --loop ' + PFileVideo Command = Mpv + " " + Arg debug(Command) new DzProcess(Command).start();}
Certain parameters do not work with all versions of mplayer, I only work well with mpv.exe. Tested mpv.exe 0.25.0-92-gbc3365b16
Usage:
In DAZ Studio, set Sequence files images or video and Render your scene.
Run Script ACDZ_Mpv.dsa
TIPS:
- For Play automatically in DAZ Studio 4.8.
Put "Render Settings-Editor-General-Misc-Browse File - ACDZ_Mpv.dsa"
When you finish rendering a range of frames, the player will be automatically executed.
- For Load Script Start DAZ Studio
Save Preset Setting (MySettingRenderMpv.duf) and Set Preferences - startup Launch
Tips MPV-mplayer Keyboard Control
- [ and ], Decrease/increase current playback speed by 10%.
- { and } Halve/double current playback speed.
- BACKSPACE Reset playback speed to normal.
- p / SPACE Pause (pressing again unpauses).
- . Step forward. Pressing once will pause, every consecutive press will play one frame and then go into pause mode again.
- , Step backward. Pressing once will pause, every consecutive press will play one frame in reverse and then go into pause mode again.
- O Toggle OSD states between normal and playback time/duration
- l Set/clear A-B loop points. See ab-loop command for details
- L Toggle infinite looping.
HADDScriptMenuToolbarPostProcess.jpg
1331 x 522 - 189K
HLoadStartupDAZ.jpg
416 x 535 - 44K
HRender Setting Preset Save Options.png
358 x 285 - 11K
Post edited by ajd_at_072df9a27d on
Comments
Thanks! This is great, liking immediate playback of image series ;-)