Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not play audio with src /static-f03a0c550524/audio.wav: [object MediaError] #1138

Closed
pooooriya opened this issue Jul 18, 2022 · 19 comments · Fixed by #1192
Closed

Could not play audio with src /static-f03a0c550524/audio.wav: [object MediaError] #1138

pooooriya opened this issue Jul 18, 2022 · 19 comments · Fixed by #1192
Labels
bug Something isn't working

Comments

@pooooriya
Copy link

pooooriya commented Jul 18, 2022

hi
i am new user
i cant use audio tag in my code its get me an error
i didnt install ffmpeg cause i didnt need to render my video
please help me here is my code

      <>
        <AbsoluteFill className="items-center justify-center" >
            <Video
                width={width}
                height={height}
                startFrom={0}
                src={video}
            />
          
            <Sequence from={10} durationInFrames={120}>
                <h1 className='text-9xl w-[100%] text-center mt-32 font-extrabold'
                 style={{opacity:interpolated}}>{text}</h1>
            </Sequence>
         </AbsoluteFill>
          <Audio src={staticFile("audio.wav")}/>
          </>

@pooooriya pooooriya added the bug Something isn't working label Jul 18, 2022
@JonnyBurger
Copy link
Member

Hi @pooooriya!

Are you able to play the audio.wav file in a chrome browser?

Also in the original post I saw audio was imported using <Audio src='../../input_data/audio/audio.wav' startFrom={0} endAt={10} /> - this would definitely lead to that error. With staticFile() it looks good though!

@pooooriya
Copy link
Author

pervious code isnt compatible with my description cause i use CTRL+Z
yes i can able to use it in my chrome and my local machin player

@JonnyBurger
Copy link
Member

@pooooriya Alright! What happens if you open http://localhost:3000/static-f03a0c550524/audio.wav in your browser?

Maybe the audio.wav is not inside the public/ folder.

@pooooriya
Copy link
Author

image
that's my folder structure of my project

@pooooriya
Copy link
Author

image
i got this issues in my console

@JonnyBurger
Copy link
Member

@pooooriya

Looks okay to me -

  1. What happens if you enter http://localhost:3000/static-f03a0c550524/audio.wav in the browser? Does it play? (The URL might change if you restart)

  2. If it does, can you send the audio to jonny@remotion.dev for investigation or upload it here?

@pooooriya
Copy link
Author

pooooriya commented Jul 18, 2022

its get me 404 error ( i checked now after restart my project and its start to download my audio instead of playing it )
Captive 60s.zip

@pooooriya
Copy link
Author

pooooriya commented Jul 18, 2022

this error also occur when i use absolute url from intenet !
i think it doesnt depend on folder or ...
an internal error maybe occur during playing audio

@JonnyBurger
Copy link
Member

Audio works for me if I put it in public and import it via audio tag.
It should not return 404, therefore please check the following:

Which error message do you get alongside 404? The static/ prefix has been changed, this URL is no longer valid. or /Users/jonathanburger/remotion/packages/example/public/audio.wav does not exist?
-> Is this true? Does it not exist on the filesystem?
-> Do you have a space or invisible character in the filename or the folder name?
-> Do you use Chromium instead if Chrome? (To diagnose a possible codec error)

@pooooriya
Copy link
Author

image

I edit my previous comment and restart my project and check new URL as you said and it's just starting to download my audio and not play it the URL is valid because IDM shows me a file with a 5mg volume
for your other questions
i use chrome
I change my audio name to "audio" to avoid space or any warmful chars
and the file is existed now and i can play it easily with my system

@pooooriya
Copy link
Author

image
i hidden the error with inspect
its shows it cant figure out which file but it cant play

@JonnyBurger
Copy link
Member

Hmm... getting confused a bit:

  • Does it download or play in the browser or give a 404?
  • Is this the same audio you sent? (10MB vs 5MB size)

Can you clarify that?

@pooooriya
Copy link
Author

after removing IDM (internet download manager) it just work now ! wtf !! :///
i kill (idm agent for browser) and allthing goes well after that !
Thank you for answering me so quickly and soberly, a package of this magnitude will definitely not be made unless the contrbiuters are patient and insightful.

@pooooriya pooooriya reopened this Jul 18, 2022
@pooooriya
Copy link
Author

is there a good idea to add this part to remotion document for audio tag ?
the cool thing was i test this in incognito !!!! and this bug occur there too !!
you cant add section or danger to remove any download app from their browser or kill them to play audio correctly
that was only for audio . video deesnt have any issues !
thanks man again

@JonnyBurger
Copy link
Member

Yes, it's a good idea to create a help page for this error. I'll keep it open

@JonnyBurger
Copy link
Member

And thanks for the nice words! Indeed it takes patience but it's very good that we track these things and learn more things about what can go wrong, for example Internet Download Manager! We can create docs and help out other people who have the problem in the future! 🙌

@AliGharian
Copy link

I have the same issue

@JonnyBurger
Copy link
Member

@AliGharian did you follow my attempts to help in this issue and can you provide info just like @pooooriya did? what can you find out using immer info in this thread?

@JonnyBurger
Copy link
Member

#1192 will add more docs and help links for these types of problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants