Skip to content

Video quality  #704

@thefastman

Description

@thefastman

Hi !
How can I setup quality ? Compared to VLC QtAV looks really not god.
I tried several render backends (widget, glwindget2 etc) and all of them sjow the same quality.
vlc


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

thefastman

thefastman commented on Aug 19, 2016

@thefastman
Author

Ok, It's not a bug.
HLS stream contains more than one video track with different bitrate/resolution/quality

e:\tools\ffmpeg\bin>ffprobe.exe http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
ffprobe version N-80906-gd5edb6c Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib
 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enab
le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --e
nable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib

  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, hls,applehttp, from 'http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8':
  Duration: 00:30:01.00, start: 10.000000, bitrate: 0 kb/s
  Program 0
    Metadata:
      variant_bitrate : 200000
    Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 22050 Hz, mono, fltp, 34 kb/s
    Metadata:
      variant_bitrate : 200000
    Stream #0:1: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m/smpte170m/bt709), 192x144, 14.99 fps, 14.99 tbr, 90k tbn, 180k tbc
    Metadata:
      variant_bitrate : 200000
  Program 1
    Metadata:
      variant_bitrate : 311111
    Stream #0:2: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m/smpte170m/bt709), 320x240, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc
    Metadata:
      variant_bitrate : 311111
    Stream #0:3: Audio: aac (LC) ([15][0][0][0] / 0x000F), 22050 Hz, mono, fltp, 34 kb/s
    Metadata:
      variant_bitrate : 311111
  Program 2
    Metadata:
      variant_bitrate : 484444
    Stream #0:4: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m/smpte170m/bt709), 480x360, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc
    Metadata:
      variant_bitrate : 484444
    Stream #0:5: Audio: aac (LC) ([15][0][0][0] / 0x000F), 22050 Hz, mono, fltp, 34 kb/s
    Metadata:
      variant_bitrate : 484444
  Program 3
    Metadata:
      variant_bitrate : 737777
    Stream #0:6: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m/smpte170m/bt709), 480x360, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc
    Metadata:
      variant_bitrate : 737777
    Stream #0:7: Audio: aac (LC) ([15][0][0][0] / 0x000F), 22050 Hz, mono, fltp, 34 kb/s
    Metadata:
      variant_bitrate : 737777

So, question now is: how I can choose/switch program/video track for playback ?
Thanks

wang-bin

wang-bin commented on Aug 30, 2016

@wang-bin
Owner

what about ffplay?

added this to the 2.0 milestone on Aug 30, 2016
self-assigned this
on Aug 30, 2016
thefastman

thefastman commented on Aug 31, 2016

@thefastman
Author

With ffplay is possible to set programm ID/stream number
For example:
ffplay -vst p:0 -i http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8

alijafari97

alijafari97 commented on Nov 7, 2020

@alijafari97
  1. first send a get req to .m3u8 link
  2. find out link of each quality
  3. now you can set play("new link you received")

assume that hls link is http://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel.ism/.m3u8
before using this link in player, send a get request to it.
in answer you will see something like this:
#EXTM3U
#EXT-X-VERSION:1
## Created with Unified Streaming Platform (version=1.10.28-22736)

# variants
#EXT-X-STREAM-INF:BANDWIDTH=493000,CODECS="mp4a.40.2,avc1.66.30",RESOLUTION=224x100,FRAME-RATE=24
tears-of-steel-audio_eng=64008-video_eng=401000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=932000,CODECS="mp4a.40.2,avc1.66.30",RESOLUTION=448x200,FRAME-RATE=24
tears-of-steel-audio_eng=128002-video_eng=751000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1197000,CODECS="mp4a.40.2,avc1.77.31",RESOLUTION=784x350,FRAME-RATE=24
tears-of-steel-audio_eng=128002-video_eng=1001000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1727000,CODECS="mp4a.40.2,avc1.100.40",RESOLUTION=1680x750,FRAME-RATE=24,VIDEO-RANGE=SDR
tears-of-steel-audio_eng=128002-video_eng=1501000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2468000,CODECS="mp4a.40.2,avc1.100.40",RESOLUTION=1680x750,FRAME-RATE=24,VIDEO-RANGE=SDR
tears-of-steel-audio_eng=128002-video_eng=2200000.m3u8

# variants
#EXT-X-STREAM-INF:BANDWIDTH=68000,CODECS="mp4a.40.2"
tears-of-steel-audio_eng=64008.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=136000,CODECS="mp4a.40.2"
tears-of-steel-audio_eng=128002.m3u8

now you can select each quality you want. next line after "#EXT-X-STREAM-I ..." is its link that should replace with last part of main link.
for example, for 784p just use:
play("http://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel.ism/tears-of-steel-audio_eng=128002-video_eng=1001000.m3u8")

if you add a setBufferValue(200) you can fix the freezing problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @wang-bin@thefastman@alijafari97

      Issue actions

        Video quality · Issue #704 · wang-bin/QtAV