What parameters for lightweight HTML5 video with avconv?

0

I have this:

avconv version 0.8.16-6:0.8.16-1, Copyright (c) 2000-2014 the Libav developers
built on Sep 16 2014 23:10:48 with gcc 4.7.2

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'film.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2013-07-09 17:41:04
  Duration: 00:00:15.04, start: 0.000000, bitrate: 6132 kb/s
    Stream #0.0(eng): Video: h264 (Main), yuv420p, 1280x720 [PAR 1:1 DAR 16:9],                                                               5951 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
    Metadata:
      creation_time   : 2013-07-09 17:41:04
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 189 kb/s
    Metadata:
      creation_time   : 2013-07-09 17:41:04

and want to down quality to standard PAL - how to do with ffmpeg/avconv?

As a result I want mp4/webm/ogg - something html5 compliant - but as light as possible (that's why I downscalling into PAL)

Tomasz Brzezina

Posted 2015-01-07T06:52:24.723

Reputation: 173

Question was closed 2015-01-10T11:57:07.400

Do you need the exact resolution specified by PAL? Or just something smaller? And when you say "as light as possible", wouldn't you just rather want to reduce the bitrate? – slhck – 2015-01-07T13:24:15.047

Again, please include the complete console output so we know what version of ffmpeg you are using and what its capabilities are. – llogan – 2015-01-07T18:34:30.350

I think that PAL is the lowest acceptable resolution, because content would be played on 42" TV – Tomasz Brzezina – 2015-01-08T06:50:51.083

On a 42" TV, PAL would look quite bad. But it depends on your application. Is it Internet streaming? Have you already tried resizing the video? – slhck – 2015-01-08T07:40:19.173

Yes, but i'm confused with parameters. When I take some two pass example with 640x380 it looks much better than 800x600 which i made from mp4 - with just scalling – Tomasz Brzezina – 2015-01-08T08:05:38.797

Well, you also have to set the quality or bitrate when re-encoding a video. Have you done that? See https://trac.ffmpeg.org/wiki/Encode/H.264 (please mention me with @slhck, otherwise I will not get a reply). Can you include the commandline output of those two processes?

– slhck – 2015-01-08T14:44:50.910

@slhck you're right - the two pass example from web has lots of parameters but I just take first of google search example, copy&paste and got good looking avi. But i'm sure, that parameters doesn't prepared for my needs (it would be very lucky shot) - If you ask about bitrate/quality - i definitely doesn't know what bitrate would be just fine - I expect advice - "take 128k bitrate - and check if it satisfy your needs" - and than I would take 2x and 0x5 of 128k to check if i could go better or hardware force me to change of expectations. But there're to many of variables for first guess. – Tomasz Brzezina – 2015-01-08T17:25:27.490

Please see the linked (duplicate) question. It explains what commands you have to run for MP4/WebM/Ogg video compatible with HTML5. I would suggest that you do not resize the video. 720p is quite acceptable and I wouldn't go lower on a big TV. Rather reduce the bitrate to about 1 MBit/s by setting -b:v 1M as parameter. – slhck – 2015-01-10T11:58:37.100

This is exactly what i want.. Now i see, that good subject of question is priceless ;D Than you @slhck – Tomasz Brzezina – 2015-01-10T12:31:29.763

No answers