Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
no se puede generar javascript en miniatura de video .mov

Estoy tratando de generar una miniatura de un video ( .mov ) pero muestra este error

error : error 4; detalles: DEMUXER_ERROR_NO_SUPPORTED_STREAMS: FFmpegDemuxer: no hay flujos compatibles

.mp4 y otros formatos funcionan bien.

versión de Chrome: versión 101.0.4951.67 (compilación oficial) (64 bits)

Código:

 async generateVideoThumbnail(file) { console.log('generating thumbnail') const binaryData = [] binaryData.push(file) const canvas = document.createElement('canvas') const context = canvas.getContext('2d') const video = document.createElement('video') video.setAttribute('src', URL.createObjectURL(new Blob(binaryData))) video.onloadeddata = () => { console.log('Yay! The readyState just increased to ' + 'HAVE_CURRENT_DATA or greater for the first time.'); }; video.loadstart = () => { console.error(`load start`); } video.onwaiting = () => { console.log('Video is waiting for more data.'); }; video.onprogress = () => { console.log("Downloading video"); }; video.onerror = () => { console.log('video error') console.log("Error " + video.error.code + "; details: " + video.error.message); } console.log(video) console.log('video load') video.load() let thumbnail = await new Promise((resolve) => { video.onloadedmetadata = async () => { console.log('on load') canvas.width = video.videoWidth canvas.height = video.videoHeight video.currentTime = video.duration / 2 await video.play() context.drawImage(video, 0, 0) video.pause() const blob = await new Promise((resolve) => { return canvas.toBlob(function (blob) { resolve(blob) }) }) resolve(blob) } }) return thumbnail },
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No creo que Chrome pueda reproducir archivos mov. Puede verificar esto en la consola, escribiendo algo como:

 const video = document.createElement('video') console.log(video.canPlayType('video/mp4')) //expect 'maybe' console.log(video.canPlayType('video/ogg')) //expect 'maybe' console.log(video.canPlayType('video/quicktime')) //expect ''

Firefox, por otro lado, parece poder reproducirlos, puede probar su aplicación allí.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!