Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 08-27-2019, 12:24 PM   #1
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 5,265
Default GetSetProjectInfo resets audio/video codecs if called quickly (FIXED)

The following snippet successfully sets the render output video and audio codecs to MJPEG/24-bit PCM.
Code:
reaper.GetSetProjectInfo_String(0, 'RENDER_FORMAT', 'UE1GRgMAAAACAAAAAAgAAAMAAACAAAAAgAcAADgEAAAAAPBBAQAAAF8AAAA=', true)
However, if a script proceeds to immediately set other project infos after RENDER_FORMAT, the audio and video codecs will be reset to the default values.

Code:
reaper.GetSetProjectInfo_String(0, 'RENDER_FORMAT', 'UE1GRgMAAAACAAAAAAgAAAMAAACAAAAAgAcAADgEAAAAAPBBAQAAAF8AAAA=', true)
reaper.GetSetProjectInfo(0, 'RENDER_SRATE', 0, true) -- randomly resets a/v codecs?!
The timing appears to matter, since waiting a bit improves the odds of preserving the correct codecs:
Code:
reaper.GetSetProjectInfo_String(0, 'RENDER_FORMAT', 'UE1GRgMAAAACAAAAAAgAAAMAAACAAAAAgAcAADgEAAAAAPBBAQAAAF8AAAA=', true)
reaper.defer(function()
  reaper.GetSetProjectInfo(0, 'RENDER_SRATE', 0, true) -- less likely to reset the codecs
end)
Waiting longer further improves the odds.

cfillion is offline   Reply With Quote
Old 08-30-2019, 11:12 AM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 16,117
Default

Ah, fixing!
Justin 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 07:57 PM.


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