moviemasher / moviemasher.js

JavaScript library for realtime, browser-based video and audio editing
Mozilla Public License 2.0
304 stars 63 forks source link

a video without soundtrack problem #13

Closed think-01 closed 7 years ago

think-01 commented 7 years ago

Hey, I have a problem, one of our users ( rekt.gg ) tries to upload a video file without an audio. Once such a video gets transcode via MovieMasher Transcoder it results with frame files and original; mp4 file ( audio.mp3 and waveform.png are not being produced ). The problem is that moviemasher.js does not autoplay such a mash after loaded.

Here is a mash I use: http://www.jsoneditoronline.org/?id=5e61bc109296e2d288dd97045a52a470

The questions are:

  1. what is wrong with the mash and why mm does not autoplay it?
  2. how can I know in transcoder callback that a file had no audio?

Thanks in advance! Slaw rekt.gg

syntropo commented 7 years ago

I'm not sure why the mash wouldn't play, but should have a chance to test next week. In answer to your second question, the no_audio and no_video properties should be available in the completed callback.

think-01 commented 7 years ago

Thanks Doug! Let me know if you need mp4 file to reproduce this, I can eventually send you a link to email.

Also I noticed that there are two types od non-audio files, the first one has literally no audio ( audio.mp3 is not being produced on import ) and the other one has an audio which is silence ( audio.mp3 gets produced ). The second one works and the first one does not.

syntropo commented 7 years ago

I'm just realizing the media object for your video lacks an audio property, which should have been added when the callback script called the api_import_data() method. When it's undefined the system tries to load the URL in the source property, which is really old behavior from when the code base was in ActionScript and we could easily grab audio from video files. Evidently JavaScript is not up to the task, which is sad but not unexpected. To indicate there is no audio track in a video the audio property should instead be set to zero.