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

Reply
 
Thread Tools Display Modes
Old 05-19-2022, 02:34 PM   #1
lewloiwc
Human being with feelings
 
Join Date: Aug 2021
Posts: 128
Default Two bugs in conversion to Opus by Batch FIle/Item Converter?

1

When Bitrate of conversion to Opus by Batch FIle/Item Converter is set to exceed 256 kbps for each channel, it causes strange behavior.

https://drive.google.com/file/d/1yqh...ew?usp=sharing

In opusenc, there is no difference in files after 256 kbps per channel, but in Batch FIle/Item Converter conversion to Opus, the file size increases in proportion to the bitrate after 256 kbps per channel.
Furthermore, 5000 kbps per channel generates the same file as 256 kbps per channel.

The conversion to Opus by Batch FIle/Item Converter is in VBR.
The command used in opusenc is ["C:\opus test\opusenc.exe" --bitrate 128 "C:\opus test\test.wav" "C:\opus test\test (opusenc 128).opus"].

----------------

2

The conversion to Opus by Batch FIle/Item Converter is not as accurate in length as opusenc.

https://drive.google.com/file/d/1ov7...ew?usp=sharing

There appears to be some opus-specific high-pass filtering left in places that are longer than the original file.

----------------

All files used are included.
https://drive.google.com/file/d/1b50...ew?usp=sharing

Windows 10 Home | REAPER v6.58 (64 bit)

Translated with www.DeepL.com/Translator (free version)
lewloiwc is offline   Reply With Quote
Old 05-19-2022, 02:50 PM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 16,074
Default

Thanks for the report. The Opus encoder does do some unpredictable things if the user-entered bitrate is outside of the displayed range (less than 6 or more than 256 kbps per channel), we can fix that.

I'm not sure what your second point means though?
schwa is offline   Reply With Quote
Old 05-19-2022, 05:45 PM   #3
lewloiwc
Human being with feelings
 
Join Date: Aug 2021
Posts: 128
Default

I have a problem with the opusenc conversion, it is that when I convert a 384000 samples wav to opus, it becomes 384000 samples opus, but when I convert to Opus with Batch FIle/Item Converter, it doesn't become 384000 samples opus.

I am just guessing, but it seems that the opus in Batch FIle/Item Converter is 384648 samples.

I looked at this opus in opusinfo and it says "Playback length: 0m:08.013s", which I think is the correct value since 384648/48000=8.0135.

----------------------------------------------------------------
[google translated version]

Converting a wav of 384000 samples with opusnc results in opus of 384000 samples, but converting to Opus with Batch FIle / Item Converter does not result in opus of 384000 samples.

By eye, the opus of Batch FIle / Item Converter seems to be 384648 samples.

Looking at this opus on opus info, it says "Playback length: 0m: 08.013s", so I think this is the correct value from 384648/48000 = 8.0135.
----------------------------------------------------------------

----------------------------------------------------------------
384000 samples wav & opusenc = 384000 samples opus

384000 = 384000

384000 samples wav & Batch FIle/Item Converter = 384648 samples opus

384000 ≠ 384648
----------------------------------------------------------------

https://drive.google.com/file/d/1v2T...ew?usp=sharing

Red is the original wav converted, green is opus from opusenc, cyan is opus from Batch FIle/Item Converter, and blue is the original wav converted with a 3 Hz 1-pole high-pass filter applied.
It seems that opus applies HPF internally and that is why it shows 648 samples longer than the original file.

It appears that HPF is also used in the conversion to opus, and the HPF impulse response is visible in the zero-padded location after 384000samples.

-------- Confused text from here down --------

It means that converting a 384000 samples wav with opusenc will result in an opus of 384000 samples, but converting to Opus with the Batch FIle/Item Converter will not result in an opus of 384000 samples.

This is because the sampling rate is 48000 Hz, BPM 120, and 4 Bars, so it is a one-loop 384000 samples music file, so if I paste it into a project with BPM 120, no matter how far I loop it, the timing will not shift.

Another thing I noticed is that when I open each file in Adobe Audition, the original wav has 384000 samples as expected, but opusenc's opus has 384312 samples at any bitrate, and Batch FIle/Item Converter's opus shows 384960 samples at any Bitrate.
If this is true, then I think the opus in opusenc is off by 312 samples every 4 Bars when I paste it into a project with 120 BPM in REAPER and loop it, but when I actually paste it into REAPER, REAPER recognizes it as a music file with 384000 samples and adjusts the tempo and how much it loops. However, when I actually paste it into REAPER, REAPER recognizes it as a music file of 384000 samples and does not deviate from the tempo no matter how much I loop.
However, the opus of the Batch FIle/Item Converter for 384960 samples will be out of sync, which is not surprising since 384960 is not 384000.

This is just an educated guess based on a zoomed in timeline, but in reality, REAPER seems to recognize that the opus of the Batch FIle/Item Converter is 384648 samples.
When I look at the opus of Batch FIle/Item Converter in opusinfo, it says "Playback length: 0m:08.013s", so from 384648/48000=8.0135, it seems that REAPER's recognition of the length for the loop is more correct. The actual length of the file is

I don't know if the actual file length is correct for Adobe Audition or REAPER, but what I am asking for is for opusenc to convert to opus of the same length as the original file.

Translated with www.DeepL.com/Translator (free version)

Last edited by lewloiwc; 05-19-2022 at 06:37 PM. Reason: Added google translated version
lewloiwc is offline   Reply With Quote
Old 05-20-2022, 05:53 AM   #4
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 16,074
Default

Thanks for the detailed report. We can improve the way we encode the final packet to decrease the padding at the end of the file.
schwa is offline   Reply With Quote
Old 05-20-2022, 07:42 PM   #5
lewloiwc
Human being with feelings
 
Join Date: Aug 2021
Posts: 128
Default

https://drive.google.com/file/d/1fIW...ew?usp=sharing

I'm encoding opusenc using the same libopus as REAPER, but opusenc produces a file that is the same length as the original music, is this because opusenc is doing something special?

And why do opusenc and REAPER produce opus files with different file sizes, even with the same settings?
I see in opusinfo that REAPER uses libopus 1.1-170-g8046033 and opusenc uses libopus 1.3. Is it because they are different versions of libopus?
Or is it that --music, --speech and --framesize N don't have the same settings?

Postscript. The sound quality is different rather than the file size. It is not nulled by reverse phase. The difference may mean that one is superior and one is inferior.

Translated with www.DeepL.com/Translator (free version)

Last edited by lewloiwc; 05-20-2022 at 07:50 PM. Reason: detailed explanation
lewloiwc is offline   Reply With Quote
Old 05-20-2022, 09:36 PM   #6
lewloiwc
Human being with feelings
 
Join Date: Aug 2021
Posts: 128
Default

Additional bugs? Info.

opusenc can record a sine sweep of at least 40dBFS (60dBFS could not be successfully encoded), but REAPER clips as soon as it exceeds 0dBFS.

Translated with www.DeepL.com/Translator (free version)
lewloiwc 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 02:03 AM.


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