muxinc / upchunk

Uploads Chunks! Takes big files, splits them up, then uploads each one with care (and PUT requests).
MIT License
336 stars 46 forks source link

Audio data is corrupted if the video has a variable frame rate #52

Closed damechen closed 3 years ago

damechen commented 3 years ago

Step to repro:

  1. get a video with VFR
  2. UpChunk.createUpload with chunkSize to be 5MB
  3. video will be uploaded the MUX
  4. get the streaming URL, and see the audio is corrupted
dylanjha commented 3 years ago

Thanks @damechen if you create the Mux asset directly like the request below, does the same issue happen? Curious if this is an issue with UpChunk or if this issue should be tracked somewhere else.

curl https://api.mux.com/video/v1/assets \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{ "input": "{URL_TO_FILE}", "playback_policy": ["public"] }'
  -H "Content-Type: application/json" \
  -u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}  

Would you be able to send me a video file that reproduces the issue? I'd love to dig in more.

damechen commented 3 years ago

Thank you so much Dylan!!!

I tried stream.new and the same issue occurred.

Since it's one of my customer's file, I can't make it public here. Let me send you the link to your Twitter DM.

damechen commented 3 years ago

Also, for the curl command, what if the video file is on my local machine, and I don't have URL for it, how to use it to upload the file?

dylanjha commented 3 years ago

Yep, please DM or email me the file. If you can get it on Dropbox then a Dropbox URL will work!

damechen commented 3 years ago

Just sent you the Twitter DM, pls check

dylanjha commented 3 years ago

Closing because this is not an Upchunk specific issue, confirmed it happens when passing this video file as an "input" param