I want to transcode videos provided by site visitors to different formats and different quality - hopefully the users browser pics up the best version. Now I am playing with video module. But I am lost and need some help. My video module version is the current 7.x-2.7+45-dev.

I set up different presets under admin/config/media/video/presets ... ideally I just enable all the presets and all defined formats will be provided and the one best suits will be provided by the user agent.

Anyway I didn't get one single preset working:

If I want to transcode to flv I have this issue: #1779298: Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Transcoding to mp4 I use Videocodecs: "libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"
For "FFmpeg video preset" I tried to use "nothing" because the help says "Newer FFmpeg installations do not supply libx264 presets anymore, so "Keine" should be selected." I also tried to use libvpx-360p.ffpreset which gives the error: [libvpx @ 0x154fde0] Failed to initialize encoder: Invalid parameter (see attached log).

So I am far away to provide different transcoded videos for one uploaded file. Would be nice if someone could point me on the right way.

CommentFileSizeAuthor
libvpx-360p.error_.txt6.64 KBosopolar
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jorrit’s picture

Could you give the error message that you get when you try to transcode MP4 with no preset selected?

michael.k’s picture

Looks like your video output codec is libvpx.

My advice is to go minimal and use just one preset for testing until you start seeing results. Try "none" for FFmpeg video preset, and "none" for everything, except your video and audio codecs. I'd also suggest using one-pass and a low bitrate like 800, again for testing until you can start to tune your quality.

In case it helps, my copy of FFmpeg is built from the latest Git, which now creates what used to be split into two different choices: ( H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (encoders: libx264 libx264rgb ).

osopolar’s picture

Thanks to Jorrit & michael.k for pushing me in the right direction :)

I think I had the same problem here as in #1779298: Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height. As suggested there in #8: "Two pass encoding is intended to target a specific bitrate. So it is only useful to use two-pass encoding when the audio and video bitrate fields are set".

Using one-pass and a low bitrate like 800 as michael.k supposed works for the beginning. I did never think about changing anything in "Advanced audio/video settings" ... because I am not advanced user yet. Maybe 2-pass should not be the default setting. Yes I did scan the readme.txt befor, but I didn't understand because I was focused on how to get it work with default settings (without touching advanced settings). Now the basic stuff is working, but I guess it's still a long way to tune quality.

I'm still missing something straight forward. I guess a common use case is just have a solution to upload videos in almost any format and convert them somehow (like youtube does) into different formats and levels of quality for different browsers and devices. At least for me it would be enough to just know how to transcode videos for Firefox, Safari, IE and mobile devices like iPhone/iPad and offer 2 or more different levels of quality for each.

Jorrit’s picture

You are fine if you provide MP4 (with h.264 video and aac audio) for most devices/browsers excluding Firefox and Ogg Theora/Vorbis for Firefox. Quality switching is not supported by the video module. You can create multiple MP4 presets, but the player needs to offer a way of determining which to serve to the client. I have no experience with that.

osopolar’s picture

I have to admit that I didn't do my homework. I am a bit in a rush and tried to get things to work out of the box. The video is just one part of the current project. But it's not possible to use video module without the "basic" knowledge. Looking on many issues it seems that I am not the only one ;)

I recommend to start the documentation with pointing at the basics. I found two articles that I like much:

An Overview of Audio and Video Transcoding
Transcoding Best Practices

Simple GUI makes live easier:
http://s1-www.ltvimg.com/cdn/farfuture/9wD5uJ75naJb4o21R9aPOTSGAhmb-hQ7W...

Jorrit’s picture

Status: Active » Closed (works as designed)

Thanks for the links. I hope others will stumble on this issue and are helped by those links too.