|
|
|
10-10-2019, 07:38 AM
|
#1
|
Human being with feelings
Join Date: Aug 2011
Posts: 522
|
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!
|
|
|
10-10-2019, 06:38 PM
|
#2
|
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
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.
|
|
|
10-10-2019, 09:49 PM
|
#3
|
Human being with feelings
Join Date: Dec 2012
Posts: 7,295
|
Quote:
Originally Posted by dsyrock
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.
|
|
|
10-10-2019, 11:35 PM
|
#4
|
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
Quote:
Originally Posted by ashcat_lt
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.
|
|
|
10-11-2019, 12:11 AM
|
#5
|
Human being with feelings
Join Date: Aug 2011
Posts: 522
|
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.
|
|
|
10-11-2019, 02:37 AM
|
#6
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
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.
|
|
|
10-11-2019, 10:57 AM
|
#7
|
Human being with feelings
Join Date: Mar 2007
Posts: 4,019
|
Quote:
Originally Posted by juliansader
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 :-)
|
|
|
10-14-2019, 06:28 PM
|
#8
|
Human being with feelings
Join Date: Feb 2014
Posts: 240
|
Just use mkvmerge to mux?
|
|
|
10-15-2019, 09:15 AM
|
#9
|
Human being with feelings
Join Date: Aug 2011
Posts: 522
|
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
|
|
|
10-16-2019, 07:25 AM
|
#10
|
Human being with feelings
Join Date: Mar 2007
Posts: 4,019
|
Quote:
Originally Posted by reapero
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.
|
|
|
10-17-2019, 01:42 AM
|
#11
|
Human being with feelings
Join Date: Aug 2011
Posts: 522
|
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?
|
|
|
10-17-2019, 03:55 AM
|
#12
|
Human being with feelings
Join Date: Jun 2015
Location: Indonesia Raya
Posts: 684
|
Quote:
Originally Posted by reapero
If anyone is interested: this kinda works with ffmpeg(include it in Windows path).
|
Would this script works on mac?
|
|
|
10-17-2019, 05:11 AM
|
#13
|
Human being with feelings
Join Date: Aug 2011
Posts: 522
|
Quote:
Originally Posted by jrengmusic
Would this script works on mac?
|
Not sure. I dont have a Mac available here.
If you try it out let me know!
|
|
|
10-20-2019, 03:02 AM
|
#14
|
Human being with feelings
Join Date: Mar 2007
Posts: 4,019
|
Quote:
Originally Posted by reapero
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.
|
|
|
10-21-2019, 09:48 AM
|
#15
|
Human being with feelings
Join Date: Mar 2007
Posts: 4,019
|
OK, no spaces in path names but still the same error message :-/
It is on this line of code:
Code:
for file in io.popen([[dir "]]..folderPath..[[" /B /O:-D /A:-D]]):lines() do
And BTW, I am using 32-bit Reaper (v5.983) in 32-bit Windows 7.
(there were some hints about broken io.popen function in 32 bit..????)
Last edited by akademie; 10-21-2019 at 10:16 AM.
Reason: added OS/Reaper version and architecture
|
|
|
10-21-2019, 10:43 AM
|
#16
|
Human being with feelings
Join Date: Mar 2007
Posts: 4,019
|
Well, it is a shame that that "io.popen" does not work
Because when I modified the script to be able to test it (I removed all the lines of the function to get last modified file etc. and somehow written the folder and filename directly into the script, then it does work.
Only would be fine to know how to set higher audio bitrate of aac, because default is , ehmnmmm, too low/bad quality.
Anyway, ffmpeg does work, now the thing is how to call it from within the reaper parametrically.
|
|
|
10-22-2019, 03:51 AM
|
#17
|
Human being with feelings
Join Date: Aug 2011
Posts: 522
|
Hey akademie,
Yeah didnt try on a 32b OS, but glad you detected the problem. I guess you can try to get the name forthe rendered file with the existing API options, or with Mespotine´s Ueberschall extension for sure.
Regarding the loss of audio quality, get this new version. It generates a MOV file with the audio being WAV file as is (so no quality loss and no extra time spent in coding the audio part).
Cheers
|
|
|
10-22-2019, 06:10 PM
|
#18
|
Human being with feelings
Join Date: Mar 2007
Posts: 4,019
|
Quote:
Originally Posted by reapero
Hey akademie,
Yeah didnt try on a 32b OS, but glad you detected the problem. I guess you can try to get the name forthe rendered file with the existing API options, or with Mespotine´s Ueberschall extension for sure.
Regarding the loss of audio quality, get this new version. It generates a MOV file with the audio being WAV file as is (so no quality loss and no extra time spent in coding the audio part).
Cheers
|
I am not a scripting guy but thanks anyway reapero.
|
|
|
10-23-2019, 07:55 AM
|
#19
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Quote:
Originally Posted by reapero
I guess you can try to get the name forthe rendered file with the existing API options, or with Mespotine´s Ueberschall extension for sure.
|
With Reaper's API it's not easy, so better use my functions, as I'm using some tricks to get the filenames.
And if it doesn't work for some reason: send me a bugreport in the Ultraschall-API-thread(link in my signature) and I'll see, what the problem is.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 06:40 AM.
|