[AskJS] How to find the best/ideal ratio or dimensions for a device?

I am working on a P2P video calling client using webRTC.
I am using getMediaDevices() to get the users' stream. If I just do {video: true} it gives me a smaller stream than my device supports.
By default it gives me a 640 x 480 stream. I can set it manually to the max dimensions which is 1920 x 1080.

How can I find the max dimension for any device?

Another thing I wanted to know. I have the video element in a div, which has the width of fit-content. When the incoming stream first arrive from the other peer, The video starts smaller and keeps growing, why is this?

reddit.com
u/EqualTumbleweed512 — 7 days ago

How do I find the max dimensions for a device?

I am working on a P2P video calling client using webRTC.
I am using getMediaDevices() to get the users' stream. If I just do {video: true} it gives me a smaller stream than my device supports.
By default it gives me a 640 x 480 stream. I can set it manually to the max dimensions which is 1920 x 1080.

How can I find the max dimension for any device?

Another thing I wanted to know. I have the video element in a div, which has the width of fit-content. When the incoming stream first arrive from the other peer, The video starts smaller and keeps growing, why is this?

reddit.com
u/EqualTumbleweed512 — 7 days ago

How do I embed the thumbnails of yt videos correctly?

These are my configurations:

# QUALITY & FORMAT
-f "bestvideo[height<=1080]+bestaudio/best[height<=1080]"
--merge-output-format mkv

# METADATA & EMBEDDING
--embed-metadata
--embed-subs
--embed-thumbnail
--embed-chapters

# SUBTITLES
--write-subs
--write-auto-subs
--sub-langs "en"
--convert-subs srt
-o "subtitle:~/Videos/youtube/subs/%(title)s.%(ext)s"

Media Player widget on KDE shows the thumbnails correctly but not my file manager.

The file manager shows the thumbnail correctly only if the video has attached_pic": 1

I only have one video in my library like that.
The thing I noticed was that the attached_pic was set to 1 in another stream. Other videos have only one, av1 stream, but one video where the attached_pic was 1 had a mmjpeg stream

I do not know any of this means though. I just ran a command
ffprobe -v quiet -select_streams v -show_entries stream=index,codec_name:stream_disposition=attached_pic -of json video.mkv

reddit.com
u/EqualTumbleweed512 — 24 days ago

My linux laptop wouldn't go to sleep

When I put it to sleep manually or when it goes to sleep automatically it wakes up in two seconds.

It is an acer laptop. Cachyos. I installed the same distro on my cousin's laptop which was also acer and I think it had the same issue.

It has a ryzen 7 and ryzen integrated gpu

reddit.com
u/EqualTumbleweed512 — 1 month ago
▲ 65 r/typst

When I use their web app, I can smoothly scroll and zoom in and out the document preview. But when I use the tinymist extension in VS code, it gets so slow. scrolling and zooming feels so laggy. And also when the preview is on the keystrokes get reflecting slower than usual.

So does anyone know what their secret is? I might try to create an Typst ide myself as a project, unless there is already a good one out there (for linux)

reddit.com
u/EqualTumbleweed512 — 4 months ago