Old 02-15-2022, 07:31 AM   #1
audiotect
Human being with feelings
 
audiotect's Avatar
 
Join Date: Mar 2018
Location: Denmark
Posts: 168
Default Reaper cannot handle mp4 files correctly

Hi
I started this Thread in reapers general question forum - but starting it up again here - video and editing/mangling. Sorry for the mess but couldn´t find a way to move the old thread

My issue is:
I make a lot of music and sounddesign for small movies.
These are incorporated in some major exhibitions.
They always loop and always in time with all the other sounddesign/music etc.

When I recieve these Moviefiles many many times they show up in reaper just a little bit longer than expected.
An example:
I recieve a movie file: Length: 2:30 min.
I check the file in (first) Premiere Pro, In VLC, handbrakeQuicktime player etc.
The files length is 2:30 also when looking a miliseconds it is 2:30.00

But in Reaper the often show up 2:30.037
(In logic they show up in 2:30.029!)

But
in Nuendo is shows the correct/expected length 2:30.00

So I´m a bit confused.

I check the frame rate, I always set my DAW to the same frame rate but it doesn´t have any effect on the filelength.
Here is the information from Reaper on the specific movie:

Length: 2:30.037
Video: 1920x1200@60.00fps, Aspect=1.00, Decoding format=RGB
Audio: 48000Hz 2ch 32bps

Using VLC decoder (v3.0.x)
Video: 1920x1200, h264, 60.00fps
Audio: 48000hz, 32bps, 2ch, mp4a

I the converted the files to PRoRes 4444 (big!) and to ProRes Proxy 422 (not that big) - and then reaper was able to read the files correctly

So I have a workaround - but I would like to have the mp4 H.264 files work in reaper.
to save time, space and avoid possible faults etc.
I have VLC (latest) installed
My video decoder priority is mp4 vlc avfoundation ffmpeg qt (default)

Best
Søren
Audiotect
audiotect is offline   Reply With Quote
Old 05-11-2022, 11:57 AM   #2
audiotect
Human being with feelings
 
audiotect's Avatar
 
Join Date: Mar 2018
Location: Denmark
Posts: 168
Default

Bump
audiotect is offline   Reply With Quote
Old 05-11-2022, 12:13 PM   #3
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,750
Default

Can you share one of the files?
schwa is offline   Reply With Quote
Old 05-11-2022, 02:10 PM   #4
audiotect
Human being with feelings
 
audiotect's Avatar
 
Join Date: Mar 2018
Location: Denmark
Posts: 168
Default

HI Schwa
I made a session with the video file that gave me the odd length
is around 750mb - how can I upload it?

I have attached to figs
one from the reaper session (latest MAC version) + info
one from Nuendo (12)


Best
Søren/Audiotect
Attached Files
File Type: pdf Reaper_video file length.pdf (64.1 KB, 155 views)
File Type: pdf Nuendo video file length.pdf (24.2 KB, 129 views)
audiotect is offline   Reply With Quote
Old 05-11-2022, 02:14 PM   #5
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,750
Default

All we need is the mp4 file itself, not the .RPP or anything. Can you upload it somewhere and share the link?
schwa is offline   Reply With Quote
Old 05-11-2022, 02:27 PM   #6
audiotect
Human being with feelings
 
audiotect's Avatar
 
Join Date: Mar 2018
Location: Denmark
Posts: 168
Default

You got a link in a pm
from google drive
let me know if it works

best
Søren
audiotect is offline   Reply With Quote
Old 05-11-2022, 03:15 PM   #7
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,750
Default

Thanks for sending the file. In general, decoders can only know the exact length of compressed formats if there is some kind of duration metadata available.

Of the 4 decoders that REAPER can use, 3 of them (wmf, vlc, ffmpeg) are not able to parse the duration metadata from this file, so they all get the duration slightly wrong (21ms in this case). AVFoundation does get the duration right, so you might want to try listing that decoder first in Preferences/Media/Video.

The file does contain duration metadata. It may be that the format is slightly wrong or something, I will look at whether we can find a way to read this information reliably.
schwa is offline   Reply With Quote
Old 05-11-2022, 03:25 PM   #8
audiotect
Human being with feelings
 
audiotect's Avatar
 
Join Date: Mar 2018
Location: Denmark
Posts: 168
Default

Thanks alot

It´s very important (for me)
because i do up to 13 sounddesign in one exhibition, everything in sync, everything looping, everything composed together as one big composition (tempo, loop, modes etc) - and I move many things around from one session to another. so using one program is essential and at the same time have a program that is capable of custom formats.
I like Nuendo and will use it for Dolby Atmos stuff, but I love Reaper :-)

Al the best
Søren/Audiotect
audiotect is offline   Reply With Quote
Old 05-11-2022, 04:52 PM   #9
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,750
Default

After looking at this file more closely, I see the issue. The file contains a video and audio stream, and the file contains metadata saying the video stream is 280.000 seconds long and the audio stream is 280.021 seconds long. Some decoders report the video length, some decoders report the audio length (or the maximum of both). Neither is actually wrong.

If you need this file to loop or be exactly 280.000 seconds long for whatever reason, I suggest opening the media item properties and at the bottom enabling "section" and setting the desired length there.

In any case, I don't think there is a bug to be fixed.
schwa is offline   Reply With Quote
Old 05-11-2022, 09:53 PM   #10
grinder
Human being with feelings
 
grinder's Avatar
 
Join Date: Jan 2009
Location: New Zealand
Posts: 2,905
Default

Very interesting in other words Reaper was getting it right.
I had a similar experience quite a few moons ago where a person was tuning
an instrument (orchestra) I tried to help with a tuner the problem was the
notes were wobbling in the view on the tuner.
I was hung by several in the group as they had "better" tuners.
Later thinking about it the fellow trying to tune his instrument properly
had several effects on his instrument reverb and delay to name two so there was nothing wrong with my tuner it was assessing correct tuning very well!

Grinder
grinder is offline   Reply With Quote
Old 05-12-2022, 08:59 AM   #11
audiotect
Human being with feelings
 
audiotect's Avatar
 
Join Date: Mar 2018
Location: Denmark
Posts: 168
Default

Hi Schwa

When I set the file length in section, the file changes so that it shows the "extra length" as the start of the file loop. Then I shorten the file to the new real length.
So it works.

I agree that it is not a bug and it is actually Reaper who is able to show the correct metadata - and thereby show that the file's audio part is actually currupt, something that must be due to the mp4 format, all the while the converted version (to apple ProRes 422) corrects the entire file to the “correct” format.
I have been told that the mp4 format often does some kind of curruption of the file.
Sometimes the video part, but as I understand it, most often the audio part.
Will there be a point in getting Reaper to decode differently?
So simply read what usually gives the expected "correct" length - the video part?

Or an option where, in the same way as in Premiere pro, you can split the file into video and audio?
The Method I Know For Reaper i Learned From Video With Kenny Gioia and it seem not to be the same - or give the same results.

I imported the file into VLC (my main decoder in Reaper) and it showed the expected length.
Same in Premiere Pro, Nuendo, both in terms of audio and video.
twisted Wave (at least the audio part)

Can you indicate which program you use to display metadata?
I have tried different programs and they make no difference to video / audio.

I will use it for future check.

I imported the movie to Premiere Pro and exported it without audio and then it had the correct length in Reaper. So I got a workaround.

best
Søren/audiotect
audiotect is offline   Reply With Quote
Old 05-12-2022, 09:58 AM   #12
audiotect
Human being with feelings
 
audiotect's Avatar
 
Join Date: Mar 2018
Location: Denmark
Posts: 168
Default

Done some more testing
this time with Davinci resolve (the free version)

Export as quicktime no audio: Expected file length
Export as quicktime w/audio (aac): Expected file length

Changed the setting to MP4, same settings as the file already has.
Export as MP4 no audio: expected file length
Export as MP4 with audio (aac): expected file length

With expected file length I mean 4:40:00
the socalled "correct" file length

I have recieved several files from the my movie provider - I need to talk to them about audio settings.
But anyway I´ve got several workarounds now, sp i can stay in Reaper.

Best
Søren/Audiotect
audiotect is offline   Reply With Quote
Old 05-12-2022, 10:01 AM   #13
audiotect
Human being with feelings
 
audiotect's Avatar
 
Join Date: Mar 2018
Location: Denmark
Posts: 168
Default

And for the "fun" of it
Here is the file in Logic Pro (Latest version)
that´s why I moved out of logic...although I haven´t done any tests of files converted to other formats

Best
Søren/Audiotect
Attached Images
File Type: png Logic pro file length move audio.png (62.6 KB, 92 views)
audiotect is offline   Reply With Quote
Old 05-12-2022, 11:15 AM   #14
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,750
Default

I don't know if I would say these files are necessarily faulty. What's probably happening is that the audio stream length is rounded up to the next AAC block. There may be some other, less standardized metadata in the file that contains information like "ignore the last 21ms of the audio stream if you want it to match the audio", or there might be some informal standard that says, always use the shorter of the two stream lengths when this mismatch occurs. Or, it could be faulty encoding, I don't know.

The specific metadata I'm talking about is the moov/trak/mdia/mdhd "media header" chunk. For the video stream, the media header reports 7000000 duration at 25000 (25 fps) timebase which equals 280 seconds exactly. For the video stream, the media header reports 13441024 duration at 48000 (48kHz) timebase which equals 280.021 seconds. I don't know how common it is for programs to display this raw metadata, REAPER doesn't for example. I looked at the raw binary file to see it.
schwa is offline   Reply With Quote
Old 05-13-2022, 12:54 AM   #15
audiotect
Human being with feelings
 
audiotect's Avatar
 
Join Date: Mar 2018
Location: Denmark
Posts: 168
Default

Thanks
I think I got enough workarounds to check and fix the files.

Best
Søren/Audiotect
audiotect 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 01:11 AM.


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