0

I have tried the following URLs, using the streamio wrapper for FFMPEG. The URL's are

http://static.bouncingminds.com/ads/5secs/baileys_5sec.mp4 (works)
http://techslides.com/demos/sample-videos/small.mp4 (doesn't work) 

For the latter I get the following error:

Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

The code I use to transcode them:

movie.transcode("test.webm", "-vcodec libvpx -strict -2") { |p| puts p }

As mentioned this works perfectly for the first video. Is there any specific setting I need in order to work with all mp4 videos?

ShivamD
  • 931
  • 10
  • 21

1 Answers1

3

The audio encoder (vorbis) bails with the following message:

[vorbis @ 0x7ffcc292f600] Current FFmpeg Vorbis encoder only supports 2 channels.

Turns out that the file has only mono.

Either specify -ac 2 to force two channels (fake stereo) or -map v:0 to drop the audio channel.

(Or wait for opus to become available in webm, or ask the ffmpeg developers to fix the encoder to support mono streams)

nmaier
  • 32,336
  • 5
  • 63
  • 78
  • Hello @nmair, thank you for your answer. When I'm adding -map v:0 i get the following message: `Stream map 'v:0' matches no streams.` do you have an idea ? – OOM Jul 23 '22 at 13:25