Libraryless. Click here for Pure Java version (2152L/14K).
1 | // ranges: ranges in seconds |
2 | sS ffmpeg_makeSpliceFilter_multipleInputVideos(LL<DoubleRange> vids) { |
3 | new LS out; |
4 | int i = 0; |
5 | for iVid over vids: |
6 | fOr (DoubleRange r : vids.get(iVid)) { |
7 | int lbl = ++i; |
8 | S start = ffmpeg_formatSeconds(r.start); |
9 | S end = ffmpeg_formatSeconds(r.end); |
10 | out.add("[" + iVid + ":v]trim=start=" + start + ":end=" + end + ",setpts=PTS-STARTPTS[v" + lbl + "]"); |
11 | out.add("[" + iVid + ":a]atrim=start=" + start + ":end=" + end + ",asetpts=PTS-STARTPTS[a" + lbl + "]"); |
12 | } |
13 | |
14 | S concat = "concat=n=" + i; |
15 | out.add(joinMap(iota(i), j -> "[v" + j + "]") + concat + "[outv]"); |
16 | out.add(joinMap(iota(i), j -> "[a" + j + "]") + + concat + ":v=0:a=1[outa]"); |
17 | ret joinWithSemicolon(out); |
18 | } |
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: | #1024637 |
Snippet name: | ffmpeg_makeSpliceFilter_multipleInputVideos |
Eternal ID of this version: | #1024637/4 |
Text MD5: | 81be7992a9c96b62421c93f4c05d0be4 |
Transpilation MD5: | 3ed93cbedf5b174ddede4589db65b2c8 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-21 14:06:48 |
Source code size: | 758 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 176 / 259 |
Version history: | 3 change(s) |
Referenced in: | [show references] |