Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dominic_render_video
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
videoag
dominic_render_video
Commits
30e2dde5
Unverified
Commit
30e2dde5
authored
1 year ago
by
Dominic Meiser
Browse files
Options
Downloads
Patches
Plain Diff
prettier test videos
parent
c55906f7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
230101/setup.sh
+18
-15
18 additions, 15 deletions
230101/setup.sh
with
18 additions
and
15 deletions
230101/setup.sh
+
18
−
15
View file @
30e2dde5
#!/bin/busybox ash
set
-euo
pipefail
for
i
in
1 2 3
;
do
rm
"C0
$i
.svg"
||
true
;
rm
"C0
$i
.mp4
"
||
true
;
done
rm
C
*
.mp4
||
true
function
write_svg
()
{
echo
'<svg viewBox="0 0 1920 1080" width="1920" height="1080">'
echo
' <rect fill="'
"
$1
"
'" x="0" y="0" width="1920" height="1080"/>'
echo
'</svg>'
}
write_svg blue
>
C01.svg
write_svg green
>
C02.svg
write_svg red
>
C03.svg
function
render_clip
()
{
local
c0 c1 freq out
c0
=
"
$1
"
c1
=
"
$2
"
freq
=
"
$3
"
out
=
"
$4
"
function
render_svg
()
{
ffmpeg
-hide_banner
-vaapi_device
/dev/dri/renderD128
\
-loop
1
-i
"
$1
"
\
-filter_complex
"[0]format=nv12,hwupload[v];aevalsrc=sin(
$3
*2*PI*t):s=48000[a]"
\
-filter_complex
"
gradients=s=1920x1080:c0=
$c0
:c1=
$c1
:d=4:x0=480:y0=540:x1=1440:y1=540,
format=nv12,hwupload[v];
aevalsrc=sin(
$freq
*2*PI*t):s=48000[a]
"
\
-map
"[v]"
-map
"[a]"
\
-c
:v h264_vaapi
-r
25
-t
4
-b
:a 128000
"
$2
"
-c
:v h264_vaapi
-r
25
-t
4
\
-c
:a aac
-b
:a 128000
\
"
$out
"
}
for
i
in
1 2 3
;
do
render_svg
"C0
$i
.svg"
"C0
$i
.mp4"
$((
$i
*
40
+
400
))
;
done
render_clip
'#0000FF'
'#FF0000'
400 C01.mp4
render_clip
'#00FF00'
'#0000FF'
440 C02.mp4
render_clip
'#FF0000'
'#00FF00'
480 C03.mp4
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment