Giter VIP home page Giter VIP logo

Comments (10)

dmrschmidt avatar dmrschmidt commented on May 11, 2024 1

Thanks for sharing. So I had another look at it. I'm not intimately familiar enough with the mp4 format to figure out what exactly the problem is with the file, but it definitely has a defect, which passing it to multiple other audio apps confirmed.

So I'll just file this as "mysterious bug in ytdl" and close this issue. Thanks for your help!

from dswaveformimage.

dmrschmidt avatar dmrschmidt commented on May 11, 2024

Hmm... For WaveformView it should actually scale correctly to the full width. How long is that audio file? Does it have silence at the end? Could you share the audio maybe, so I could have a look? Definitely doesn't look correct, no.

For the WaveformLiveView the answer I'm afraid for now is "not really possible, no". It would require constant dynamic downsampling, which is quite compute intensive, so it would require to also make use of Accelerate operations. Doable of course, but not currently in scope for me to do.

Apart from that technical side, it's also currently intended for a different use case, which is more to show "time progress" during recording, rather then present the entire recording in one view. So it's designed to be used in places like a voice message recording a la WhatsApp, etc where the waveform "scrolls". I don't think I'd want to change that currently.

from dswaveformimage.

AndrewSB avatar AndrewSB commented on May 11, 2024

ahh hey! nice to have you here live

yeah the waveform at the top is generated by (0 ..< 200).map { _ in Float.random(in: 0 ..< 1) }. if i make the number > 1200, it fills the width

the audio file i'm using is https://rr1---sn-4g5e6nsk.googlevideo.com/videoplayback?expire=1669679074&ei=gvOEY5-JNZSQ1gLk7IHoBg&ip=157.90.242.21&id=o-AHARjRnReqIcHP_PeF7VD3H3WkmGjDFLYVrp2s-KO5k6&itag=140&source=youtube&requiressl=yes&mh=Lp&mm=31%2C29&mn=sn-4g5e6nsk%2Csn-4g5edndd&ms=au%2Crdu&mv=m&mvi=1&pl=23&initcwndbps=287500&vprv=1&mime=audio%2Fmp4&ns=pXFa13Xa7VVvhsIAutUHZrAJ&gir=yes&clen=2887491&dur=178.375&lmt=1652043521368789&mt=1669657070&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=WEB&txp=4511222&n=P6lkM_epuLRxKLP&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAMBXn1p0eIWr7_RKn5ZefhXwn9pODfTVgi6OjfSNhQv7AiBZXNsNGa26hE9mZgJjP63QbMWk80fgX4ndh2-gSxk9YQ%3D%3D&ratebypass=yes&sig=AOq0QJ8wRAIgD5A_vbS4wF4UECx88Dqcr_2y4mQuekTmOMNVzoUKJ9wCIBcLZtLp_q9pTR9QgxAGpDXvuJa7WM2WA7yoz47i6aIe

from dswaveformimage.

AndrewSB avatar AndrewSB commented on May 11, 2024

keeping the scrolling live view is seems like a fine direction, but i'm surprised that the file doesn't fit width

from dswaveformimage.

dmrschmidt avatar dmrschmidt commented on May 11, 2024

This is what that same audio file looks like when it is imported into Ableton:

Screenshot 2022-11-28 at 19 21 28

So there must be something strange about the audio file itself.

It looks like its taking up half the space than it should. Which makes me think it does sth like saying it's stereo when it's in fact mono, or claims to have a different sample rate than it actually has or sth. along those lines.

Given that Ableton renders it in the exact same way, I'm inclined to treat the audio file as buggy. I'm still curious what's going on here, but it looks low priority to me?

from dswaveformimage.

dmrschmidt avatar dmrschmidt commented on May 11, 2024

Hey @AndrewSB, I wanted to have another look at the file, to understand what the issue with it is. I'm still quite sure the issue is with the file itself and not the library, but I'd like to understand exactly how the file is weird to make sure there's not some other potential issue that may come up later for files like that.

Unfortunately the link you had pasted doesn't work anymore. Do you still have a copy of it lying around anywhere?

And did you maybe figure out what was wrong with it? Which app / encoder / etc. actually created it originally?

from dswaveformimage.

AndrewSB avatar AndrewSB commented on May 11, 2024

for sure! i was downloading it using ytdl from youtube, with one of the highest quality audio options. m4a i think

https://youtu.be/Z0Uh3OJCx3o is the video

from dswaveformimage.

AndrewSB avatar AndrewSB commented on May 11, 2024

let me know what it is, if you figure it out! i'm curious too

from dswaveformimage.

dmrschmidt avatar dmrschmidt commented on May 11, 2024

Thanks! If I google ytdl it's giving me tons of things that don't look like what you probably used. Do you have a URL?

from dswaveformimage.

AndrewSB avatar AndrewSB commented on May 11, 2024

found the audio file i was testing with!

victory-royale.mp4

from dswaveformimage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.