Hey,
I can output an MP4 in PDG using the ffmpegencodevideo node. I'm on a Mac also. I'm wondering can I add my audio to that?
I generally use audio in CHOP's, so linking a CHOP node would be ideal. But even if it's just an audio file from an external aif etc that would be very helpful.
Any help appreciated.
Thanks
Adding audio to MP4 in PDG
1781 6 1- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
- mestela
- Member
- 1745 posts
- Joined: May 2006
- Offline
Hey Simon, figured I'd post the answer here too in case others get stuck.
I've attached an example using tops. The workflow is:
-define a path to save the audio to, store it as an attribute
-fetch a chop rop to render the audio to that location (setting the path with tops attrs, ie @audio_path)
-render the flipbook
-render a mp4, using a modified ffmpeg command string to add an extra input, -i @audio_path
Fetching the chops rop needs some minor tweaks. A tops fetch expects to keep track of the rop you link to, if it can't it generates warnings. The slight tweaks on the fetch are so that it understands which parameter on the chops rop is used for output.
The main thing is to keep track of where the audio lives, so the filename for the wav can be sent to ffmpeg. I found it was easiest just to define it within tops as an attribute. That way it can be sent over to the chops rop, and the attribute is passed through to the chain to make it down to the ffmpeg node, where it can be called with `@audio_path`.
I've attached an example using tops. The workflow is:
-define a path to save the audio to, store it as an attribute
-fetch a chop rop to render the audio to that location (setting the path with tops attrs, ie @audio_path)
-render the flipbook
-render a mp4, using a modified ffmpeg command string to add an extra input, -i @audio_path
Fetching the chops rop needs some minor tweaks. A tops fetch expects to keep track of the rop you link to, if it can't it generates warnings. The slight tweaks on the fetch are so that it understands which parameter on the chops rop is used for output.
The main thing is to keep track of where the audio lives, so the filename for the wav can be sent to ffmpeg. I found it was easiest just to define it within tops as an attribute. That way it can be sent over to the chops rop, and the attribute is passed through to the chain to make it down to the ffmpeg node, where it can be called with `@audio_path`.
Edited by mestela - May 4, 2021 16:39:32
- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
- mestela
- Member
- 1745 posts
- Joined: May 2006
- Offline
- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
- mestela
- Member
- 1745 posts
- Joined: May 2006
- Offline
- papsphilip
- Member
- 385 posts
- Joined: July 2018
- Offline
mestela
Hey Simon, figured I'd post the answer here too in case others get stuck.
I've attached an example using tops. The workflow is:
-define a path to save the audio to, store it as an attribute
-fetch a chop rop to render the audio to that location (setting the path with tops attrs, ie @audio_path)
-render the flipbook
-render a mp4, using a modified ffmpeg command string to add an extra input, -i @audio_path
Fetching the chops rop needs some minor tweaks. A tops fetch expects to keep track of the rop you link to, if it can't it generates warnings. The slight tweaks on the fetch are so that it understands which parameter on the chops rop is used for output.
The main thing is to keep track of where the audio lives, so the filename for the wav can be sent to ffmpeg. I found it was easiest just to define it within tops as an attribute. That way it can be sent over to the chops rop, and the attribute is passed through to the chain to make it down to the ffmpeg node, where it can be called with `@audio_path`.
Does this work with random frame ranges? trimming the audio to fit the frame range
-
- Quick Links