// ranges: ranges in seconds sS ffmpeg_makeAudioSpliceFilter(L<DoubleRange> ranges) { new LS out; int i = 0; fOr (DoubleRange r : ranges) { int lbl = ++i; S start = ffmpeg_formatSeconds(r.start); S end = ffmpeg_formatSeconds(r.end); out.add("[0:a]atrim=start=" + start + ":end=" + end + ",asetpts=PTS-STARTPTS[a" + lbl + "]"); } S concat = "concat=n=" + l(ranges); out.add(joinMap(iota(i), j -> "[a" + j + "]") + concat + ":v=0:a=1[outa]"); ret joinWithSemicolon(out); }
Began life as a copy of #1024579
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025056 |
Snippet name: | ffmpeg_makeAudioSpliceFilter |
Eternal ID of this version: | #1025056/1 |
Text MD5: | 83c15761f4ccf089ac1f0618654a2dfe |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-03 20:12:52 |
Source code size: | 513 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 226 / 265 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |