Old 10-10-2019, 07:38 AM   #1
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 210
Default Video muxing?

Would muxing be a faster opton to embedd audio into videos existing on a session? As a sound dude, i never do edits to the video so basically i just wanna add my rendered audio track to the video i previously imported in the session, which i have been adding music/osunds to.


I think i saw someone posting or maybe asking for a script to do that long time ago. Is there anything? If not, what muxer would you use? I i guess it requires cmd operation (windows here) to be able to get triggered by a lua script

Thanks!
reapero is offline   Reply With Quote
Old 10-10-2019, 06:38 PM   #2
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 191
Default

You don't need any script.REAPER can render project to Video directly, including all your sound and music. If you don't need the origin audio track inside the video, uncheck the parent send of the video track.
dsyrock is offline   Reply With Quote
Old 10-10-2019, 09:49 PM   #3
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 4,223
Default

Quote:
Originally Posted by dsyrock View Post
You don't need any script.REAPER can render project to Video directly, including all your sound and music. If you don't need the origin audio track inside the video, uncheck the parent send of the video track.
As I understand it, rendering a whole new video via reaper in most formats is like rendering the video and the audio and then essentially zipping the two files up into whatever container you've chosen. I think that "muxing" as the OP is using it means just replacing the audio file in that container without necessarily re-rendering the video part.


Whether that even can be done I think depends on what the final format is, but I don't think Reaper will do it natively either way.
ashcat_lt is offline   Reply With Quote
Old 10-10-2019, 11:35 PM   #4
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 191
Default

Quote:
Originally Posted by ashcat_lt View Post
I think that "muxing" as the OP is using it means just replacing the audio file in that container without necessarily re-rendering the video part.
Oh I see. Sorry I misunderstanding it. I think it need at least 2 steps to make it. First render an audio file. Second, using ffmpeg or other tools to mux the video and audio together. The second step is scriptable.
dsyrock is offline   Reply With Quote
Old 10-11-2019, 12:11 AM   #5
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 210
Default

And the first one too, using mespotine's awesome ultraschall API

I'll give this a try with ffmpeg. I have to export 4m videos on a daily basis and I am already sick of export times.
reapero is offline   Reply With Quote
Old 10-11-2019, 02:37 AM   #6
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,752
Default

This has been requested many times. Since both VLC and ffmpeg offer "no video transcoding" options, it should be straightforward for REAPER to implement it too.
juliansader is online now   Reply With Quote
Old 10-11-2019, 10:57 AM   #7
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 552
Default

Quote:
Originally Posted by juliansader View Post
This has been requested many times. Since both VLC and ffmpeg offer "no video transcoding" options, it should be straightforward for REAPER to implement it too.
Sure. And it needs some bump, so +1 for "no video transcoding" in render option in Reaper :-)
akademie is offline   Reply With Quote
Old 10-14-2019, 06:28 PM   #8
junh1024
Human being with feelings
 
Join Date: Feb 2014
Posts: 126
Default

Just use mkvmerge to mux?
junh1024 is offline   Reply With Quote
Old 10-15-2019, 09:15 AM   #9
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 210
Default

If anyone is interested: this kinda works with ffmpeg(include it in Windows path). Didnt check for errors and stuff so dont send a hitman to my place if it doesnt work please. I am a human being with feelings.

Just render the audio as usual then select the video item in Reaper and then launch the script. Your new muxed video will appear next to your audio file.

The script uses the last modified file in the render folder as the audio file to mux to the video file, so make sure you dont generate extra files in there between the 2 steps
Attached Files
File Type: lua EDU_Mux last rendered audio with selected video item.lua (940 Bytes, 10 views)
reapero is offline   Reply With Quote
Old 10-16-2019, 07:25 AM   #10
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 552
Default

Quote:
Originally Posted by reapero View Post
If anyone is interested: this kinda works with ffmpeg(include it in Windows path). Didnt check for errors and stuff so dont send a hitman to my place if it doesnt work please. I am a human being with feelings.

Just render the audio as usual then select the video item in Reaper and then launch the script. Your new muxed video will appear next to your audio file.

The script uses the last modified file in the render folder as the audio file to mux to the video file, so make sure you dont generate extra files in there between the 2 steps
Thanks reapero,
I just tried your script, but it gives this :-(
"...Mux last rendered audio with selected video item.lua:4: attempt to index a nil value"

Last edited by akademie; 10-16-2019 at 07:32 AM.
akademie is offline   Reply With Quote
Old 10-17-2019, 01:42 AM   #11
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 210
Default

Not sure whats happening. The only tricky thing might be your files or paths contain space bars. That could make the script fail. Also, do you have ffmpeg installed and added in windows path?

Can you tell in which line the script is crashing?
reapero is offline   Reply With Quote
Old 10-17-2019, 03:55 AM   #12
jrengmusic
Human being with feelings
 
jrengmusic's Avatar
 
Join Date: Jun 2015
Posts: 553
Default

Quote:
Originally Posted by reapero View Post
If anyone is interested: this kinda works with ffmpeg(include it in Windows path).
Would this script works on mac?
__________________
JRENG! | M E T R I C
jrengmusic is offline   Reply With Quote
Old 10-17-2019, 05:11 AM   #13
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 210
Default

Quote:
Originally Posted by jrengmusic View Post
Would this script works on mac?
Not sure. I dont have a Mac available here.

If you try it out let me know!
reapero is offline   Reply With Quote
Old Today, 03:02 AM   #14
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 552
Default

Quote:
Originally Posted by reapero View Post
Not sure whats happening. The only tricky thing might be your files or paths contain space bars. That could make the script fail. Also, do you have ffmpeg installed and added in windows path?

Can you tell in which line the script is crashing?
Hi reapero,
I think it is crashing at line nr.4 (which also error displays in error text after scriptname).

I will try with all paths short and no spaces, but I don't think it is a problem. Will report later, thanks.
akademie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.