Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

avconv: Two pass encoding .mov to .webm not working

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
fablau
Posts: 6
Joined: 2016-01-11 17:10

avconv: Two pass encoding .mov to .webm not working

#1 Post by fablau »

Hello here.

I am trying to perform a 2-pass encoding of a video from .mov to .webm, but it looks like that the 2-pass encoding is much worse than doing a single pass encoding. Here are the two commands I use:

Code: Select all

avconv -y -i input.mov -r:v 25/1 -c:v libvpx -minrate 400k -maxrate 600k -b:v 400k -s 640x360 -force_fps -b:a 80k -pass 1 output.webm

avconv -y -i input.mov -r:v 25/1 -c:v libvpx -minrate 400k -maxrate 600k -b:v 400k -s 640x360 -force_fps -b:a 80k -pass 2 output.webm
Any ideas? Thank you in advance for any help.

All the best,

Fab.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: avconv: Two pass encoding .mov to .webm not working

#2 Post by GarryRicketson »

Are you using Debian ? if so which version ?

What searches have you all ready done if any ?
Here is a couple of things, that might help.
avconv: Two pass encoding .mov to .webm not working
------------------
https://wiki.debian.org/ffmpeg
--------------------
And

https://libav.org/avconv.html

fablau
Posts: 6
Joined: 2016-01-11 17:10

Re: avconv: Two pass encoding .mov to .webm not working

#3 Post by fablau »

Thank you for your reply.

Yes, I am using Debian (Debian 3.2.68-1+deb7u1 x86_64).

I have already tried different searches to solve this issue, but I couldn't find anything about two-pass encoding for making .webm video files, just for .mp4 which works ok.

Thank you for your referred resource, I already checked out most of them. I'd really need someone expert on avconv which could tell me why the 2-pass encoding gives me a much worse result than using a single pass. Otherwise, I'll just stick with a single pass and that's it, but I know that a 2-pass should work better. Any more help will be greatly appreciated!

Thank you again.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: avconv: Two pass encoding .mov to .webm not working

#4 Post by stevepusser »

Hmmm--so you're using Debian Wheezy. I would guess you're also using the rather ancient avconv that's in the stock Wheezy repo. You could try installing a newer 10.1 version from wheezy-backports, or try using the latest static ffmpeg binary directly downloaded from http://johnvansickle.com/ffmpeg/

Maybe you've encountered a bug and these fix it, though I have also encountered some information suggested that two-pass encoding is less useful with modern encoders.

The static ffmpeg builds won't interact with anything else on your system, unlike installing the ffmpeg from deb-multimedia.
MX Linux packager and developer

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: avconv: Two pass encoding .mov to .webm not working

#5 Post by GarryRicketson »

+1 Stevepusser
Is one of our best experts,..try what he says, maybe you will get better results.
Thank you for your referred resource, I already checked out most of them. I'd really need someone expert on avconv------snip---
Ok, and your Welcome, sadly I don't know much of anything on this, but fortunatley there are some others on the forum much more "expert" with this kind of thing. Give it some time, and probably someone will have some ideas.
That is good to know you all ready have looked at most of those "resources", now we know you did not find anything that you could use in them.
I think it is just a matter of getting your "syntax" right, in the code, commands you posted, but I have no clue as to what the correct options,etc would be. Sorry

fablau
Posts: 6
Joined: 2016-01-11 17:10

Re: avconv: Two pass encoding .mov to .webm not working

#6 Post by fablau »

Thank you guys for your help, appreciated! I'll try then to install the stand-alone version of ffmpeg, and I'll let you know if that sorts any results. May actually be possible, as Stevepusser wrote, that the modern encoders do a pretty good job already with a single pass... that's what I thought as well :)

Thanks!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: avconv: Two pass encoding .mov to .webm not working

#7 Post by stevepusser »

fablau wrote:Thank you guys for your help, appreciated! I'll try then to install the stand-alone version of ffmpeg, and I'll let you know if that sorts any results. May actually be possible, as Stevepusser wrote, that the modern encoders do a pretty good job already with a single pass... that's what I thought as well :)

Thanks!
The standalone ffmpeg will also let you try the latest and greatest (and slowest by far) HEVC (h.265) encoder--it'll be less than half the size of a comparable quality webm file. Its slowness may render it unusable, depending on your hardware and what you're producing, however, it is the future. You'd be restricted to using that ffplay binary to watch it in Wheezy without getting various backported media applications, such as the ones in the MEPIS 12 community repo. Specifically mplayer, mpv, qmplay2, or VLC plus the libhde265 plugin.
MX Linux packager and developer

fablau
Posts: 6
Joined: 2016-01-11 17:10

Re: avconv: Two pass encoding .mov to .webm not working

#8 Post by fablau »

Update: I have tried the standalone ffmpeg but it looks like lacks the right encoder for the .webm format (libvpx). I think I'll stick with the single pass conversion with avconv which gives me already pretty good results.

Of course, if anyone has any more thoughts or tips, please, let me know!

Thank you again for your help.

All the best,

Fab.

fablau
Posts: 6
Joined: 2016-01-11 17:10

Re: avconv: Two pass encoding .mov to .webm not working

#9 Post by fablau »

stevepusser wrote:
fablau wrote:Thank you guys for your help, appreciated! I'll try then to install the stand-alone version of ffmpeg, and I'll let you know if that sorts any results. May actually be possible, as Stevepusser wrote, that the modern encoders do a pretty good job already with a single pass... that's what I thought as well :)

Thanks!
The standalone ffmpeg will also let you try the latest and greatest (and slowest by far) HEVC (h.265) encoder--it'll be less than half the size of a comparable quality webm file. Its slowness may render it unusable, depending on your hardware and what you're producing, however, it is the future. You'd be restricted to using that ffplay binary to watch it in Wheezy without getting various backported media applications, such as the ones in the MEPIS 12 community repo. Specifically mplayer, mpv, qmplay2, or VLC plus the libhde265 plugin.
I missed this posting, thank you for pointing that out. Fact is, I need to encode videos that are readable by FlowPlayer on all standard web browsers and mobile devices, so... I doubt they can read those new encoded files, am I right?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: avconv: Two pass encoding .mov to .webm not working

#10 Post by stevepusser »

Yes, that's right. I can see a use case for h.265 encoded video where space and bandwidth can be limited, such as on mobile devices. I think vp9 is supposed to be a competitor to the h.265 codec.
MX Linux packager and developer

fablau
Posts: 6
Joined: 2016-01-11 17:10

Re: avconv: Two pass encoding .mov to .webm not working

#11 Post by fablau »

Thank you for your reply. In any case, I found a way to double pass .webm files with ffmpeg, even though I don't notice much difference from single and double pass:

./ffmpeg -y -i input.mp4 -codec:v libvpx -quality good -cpu-used 0 -b:v 400k -vf scale=384x216,setsar=1/1 -pix_fmt yuv420p -codec:a libvorbis -b:a 64k -pass x output.webm

Just replace the "-pass x" with "-pass 1" and then "-pass2".

I found very useful this resource:

https://www.virag.si/2012/01/webm-web-v ... fmpeg-0-9/

Thank you again guys!

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: avconv: Two pass encoding .mov to .webm not working

#12 Post by Dai_trying »

Removed comment as the previous post has been removed making my post pointless...
Last edited by Dai_trying on 2018-03-05 21:08, edited 1 time in total.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: avconv: Two pass encoding .mov to .webm not working

#13 Post by stevepusser »

If you're talking about the newer ffmpeg, certainly.

Though h.265 is falling out of favor because of the greed and stupidity of the patent holders. Now the hot thing is the completely free AV1 codec.
MX Linux packager and developer

User avatar
sunrat
Administrator
Administrator
Posts: 6458
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 472 times

Re: avconv: Two pass encoding .mov to .webm not working

#14 Post by sunrat »

stevepusser wrote:Though h.265 is falling out of favor because of the greed and stupidity of the patent holders. Now the hot thing is the completely free AV1 codec.
I've been amazed by the quality obtainable for small file size of H.265. Hope AV1 is at least as good.

Edit: just looked at Wikipedia. It looks promising and well supported by industry big guns.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply