SamuelScheit / puppeteer-stream

A Library for puppeteer to retrieve audio and/or video streams
MIT License
357 stars 114 forks source link

Using FFMPEG give an error #142

Closed koalitiondavid closed 10 months ago

koalitiondavid commented 10 months ago

I'm using the code in ffmpeg.js. When I start it, I'm receiving this error and nothing works.

const ffmpeg = exec(ffmpeg -y -i - -c copy output.mp4);

[ipod @ 0x557ce155f040] Could not find tag for codec vp8 in stream #0, codec not currently supported in container Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Stream mapping: Stream #0:1 -> #0:0 (copy) Stream #0:0 -> #0:1 (copy)

Thank you!

koalitiondavid commented 10 months ago

Finally, I solved my problem.

Here my arguments used const exec_ffmpeg = [ 'ffmpeg', '-thread_queue_size', '4096', '-f', 'webm', '-r', '30', '-i', 'pipe:0', '-c:v', 'libx264', '-preset', 'veryFast', '-pix_fmt', 'yuv420p', '-acodec', 'aac', '-movflags', '+faststart', "output.mp4" ];