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

Everything about X, Gnome, KDE, ... and everything running on it

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

Postby fablau » 2016-01-11 18:04

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.
fablau
 
Posts: 6
Joined: 2016-01-11 17:10

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

Postby GarryRicketson » 2016-01-11 18:28

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
User avatar
GarryRicketson
 
Posts: 5048
Joined: 2015-01-20 22:16
Location: Durango, Mexico

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

Postby fablau » 2016-01-11 18:44

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.
fablau
 
Posts: 6
Joined: 2016-01-11 17:10

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

Postby stevepusser » 2016-01-11 19:13

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9912
Joined: 2009-10-06 05:53

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

Postby GarryRicketson » 2016-01-11 19:18

+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
User avatar
GarryRicketson
 
Posts: 5048
Joined: 2015-01-20 22:16
Location: Durango, Mexico

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

Postby fablau » 2016-01-11 19:45

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!
fablau
 
Posts: 6
Joined: 2016-01-11 17:10

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

Postby stevepusser » 2016-01-11 20:06

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9912
Joined: 2009-10-06 05:53

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

Postby fablau » 2016-01-11 23:01

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

Postby fablau » 2016-01-12 15:58

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?
fablau
 
Posts: 6
Joined: 2016-01-11 17:10

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

Postby stevepusser » 2016-01-12 21:07

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9912
Joined: 2009-10-06 05:53

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

Postby fablau » 2016-01-13 16:50

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!
fablau
 
Posts: 6
Joined: 2016-01-11 17:10

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

Postby Dai_trying » 2018-03-05 07:44

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.
Dai_trying
 
Posts: 531
Joined: 2016-01-07 12:25

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

Postby stevepusser » 2018-03-05 19:01

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9912
Joined: 2009-10-06 05:53

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

Postby sunrat » 2018-03-05 22:27

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!
User avatar
sunrat
 
Posts: 2428
Joined: 2006-08-29 09:12
Location: Melbourne, Australia


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable