i made a visualizer for sunvox files in pixilang using the new built-in sunvox library, and i want to allow it to export video using ffmpeg. the issue is, i don't know where to get started. i'm trying to analyze the compo player code, but there's too much other code to connect the video export parts
can someone give me some hints on how i can impliment it in my own program? thanks!
i've included the program and the files it references in a zip file; just run it in the unzipped directory
sunvox lib + ffmpeg video export?
- AutumnCheney
- Posts: 203
- Joined: Sun Dec 29, 2019 8:16 am
- Location: durant, ok, usa
- Contact:
sunvox lib + ffmpeg video export?
- Attachments
-
- contrapositive src.zip
- (56.87 KiB) Downloaded 38 times
please check out my newgrounds account, i post music and talk to people here: https://autumncheney.newgrounds.com
i have a soundcloud and bandcamp too (just music here):
https://soundcloud.com/autumncheney
https://autumncheney.bandcamp.com
i have a soundcloud and bandcamp too (just music here):
https://soundcloud.com/autumncheney
https://autumncheney.bandcamp.com
- NightRadio
- Site Admin
- Posts: 3488
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: sunvox lib + ffmpeg video export?
Unfortunately there is no simple way to do the AV export...
But I created a special framework for such purposes - lib/demo.pixi
You can see examples in the graphics/demoscene folder
Especially such an example as demo_test_sunvox.pixi
You can put your visualizer in the scene1() function
Then uncomment the following line:
demo_video_export = "video.avi" //export to AVI using FFMPEG (only in Linux and macOS) or MJPEG AVI (work on any system)
or
demo_video_export = "video.gif" //export to animated GIF :)
Ask any questions about this library - I'll be happy to answer.
It may seem a little complicated at first, but it's actually a very handy environment for creating all sorts of visualizations, demos, etc.
But I created a special framework for such purposes - lib/demo.pixi
You can see examples in the graphics/demoscene folder
Especially such an example as demo_test_sunvox.pixi
You can put your visualizer in the scene1() function
Then uncomment the following line:
demo_video_export = "video.avi" //export to AVI using FFMPEG (only in Linux and macOS) or MJPEG AVI (work on any system)
or
demo_video_export = "video.gif" //export to animated GIF :)
Ask any questions about this library - I'll be happy to answer.
It may seem a little complicated at first, but it's actually a very handy environment for creating all sorts of visualizations, demos, etc.
- AutumnCheney
- Posts: 203
- Joined: Sun Dec 29, 2019 8:16 am
- Location: durant, ok, usa
- Contact:
Re: sunvox lib + ffmpeg video export?
thank you so much!!! i got video export to work with the demo library
however, i noticed that the raw video and raw audio seems to be saved in different directories (the directory that pixilang was run in and the pixilang root directory, respectively) and the video can't fully render because it can't find the audio file. a workaround is to render it twice and move the raw audio from the first render to the directory that the second render will be ran in. this really only works if the audio will be the same in both exports, generative sunvox files won't work very well with this. it's enough for me, but you may want to take a look at this
again, thank you!
however, i noticed that the raw video and raw audio seems to be saved in different directories (the directory that pixilang was run in and the pixilang root directory, respectively) and the video can't fully render because it can't find the audio file. a workaround is to render it twice and move the raw audio from the first render to the directory that the second render will be ran in. this really only works if the audio will be the same in both exports, generative sunvox files won't work very well with this. it's enough for me, but you may want to take a look at this
again, thank you!
please check out my newgrounds account, i post music and talk to people here: https://autumncheney.newgrounds.com
i have a soundcloud and bandcamp too (just music here):
https://soundcloud.com/autumncheney
https://autumncheney.bandcamp.com
i have a soundcloud and bandcamp too (just music here):
https://soundcloud.com/autumncheney
https://autumncheney.bandcamp.com
- leondustar
- Posts: 85
- Joined: Tue Feb 28, 2017 12:40 am
- Contact:
Re: sunvox lib + ffmpeg video export?
Awesome I was just about to ask this.
Will check out this demo lib.
@Nightradio did you also use this to generate the beautiful animated GIF's in the docs / pixilang website?
Will check out this demo lib.
@Nightradio did you also use this to generate the beautiful animated GIF's in the docs / pixilang website?
- NightRadio
- Site Admin
- Posts: 3488
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: sunvox lib + ffmpeg video export?
I used similar code in Pixilang :)did you also use this to generate the beautiful animated GIF's in the docs / pixilang website?
- NightRadio
- Site Admin
- Posts: 3488
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: sunvox lib + ffmpeg video export?
Please try to use the updated version of the library:however, i noticed that the raw video and raw audio seems to be saved in different directories
- AutumnCheney
- Posts: 203
- Joined: Sun Dec 29, 2019 8:16 am
- Location: durant, ok, usa
- Contact:
Re: sunvox lib + ffmpeg video export?
thank you! it works perfectly now!NightRadio wrote: ↑Tue Nov 03, 2020 2:09 pmPlease try to use the updated version of the library: demo.pixihowever, i noticed that the raw video and raw audio seems to be saved in different directories
please check out my newgrounds account, i post music and talk to people here: https://autumncheney.newgrounds.com
i have a soundcloud and bandcamp too (just music here):
https://soundcloud.com/autumncheney
https://autumncheney.bandcamp.com
i have a soundcloud and bandcamp too (just music here):
https://soundcloud.com/autumncheney
https://autumncheney.bandcamp.com