Better HN
topnewbestaskshowjobs
Log inSign up

fireattack

1,898 karma · joined Feb 5, 2018 (8y ago) · 703 submissions

fireattack#outlook.com
Submissions

comment 5y ago · link · parent

Without at least some semi-objective compassions on the "visual quality", your data is meaningless. Like, how can you tell crf23 of x264 is closer to your x265-x265 version than, say, a crf24 x264 one?

As a rule of thumb, x265 works better (compared to x264) at lower bitrate / worse quality. You won't be able to achieve "same quality, half size" at higher bitrate easily.

comment 5y ago · link · parent

Content aside, the title alone makes no sense.

comment 5y ago · link · parent

You are absolutely right, I meant to say "green" and reply to your parent. I'm embarrassed..

comment 5y ago · link · parent

Thanks for the correction.

comment 5y ago · link · parent

When paired with mountain, I'd say blue is more accurate. 青山 is a fixed term (not quite "idiom" but you get the idea) originated from Chinese.

comment 5y ago · link · parent

You have to type http:// then.

comment 5y ago · link · parent

Appreciated. It is probably just me, but I find the article itself (which I read in full) relatively hard to follow. So is the other related article [1].

I think it's because the author was trying to fit all the nuances in, which is a problem I suffer from myself when I write.

[1] https://web.archive.org/web/20210209100324/http://www.mattmi...

comment 5y ago · link · parent

It looks a lot of overheads for something that is supposed to be helpful for the environment.

Why not just donate the equivalent of 1-year amount of your [whatever event-triggered actions] directly to one of these Reforestation projects? It saves your time, the cost of running server (albeit not much) while doing the same amount of help.

comment 5y ago · link · parent

As someone not from Europe (nor the US), this is literally the first time I've heard demoscene.

After reading Wikipedia article I'm still a little bit confused. Could someone do a ELI5?

comment 5y ago · link · parent

Wow, just realized Primitive Technology hasn't upload a new video for a year. Did he say something about it?

comment 5y ago · link · parent

Could you elaborate a little bit? Just curious about the technical side of creating this cool application.

comment 5y ago · link · parent

Edit: I just reported the bug to ffmpeg tracker: https://trac.ffmpeg.org/ticket/9141

comment 5y ago · link · parent

I think I know where you're confused: from the guide it looks like there is only a difference where you put -ss; but in reality, where you put -t/-to matters too.

In my Python script, I did input seeking for -ss (start point) part, and then output seeking for -t part (end point). As you can see, the -ss part is before -i {inputfile}, and -t is after.

-ss 1:00 -i file -t 5

is NOT the same as

-ss 1:00 -t 5 -i file.

The latter has a bug that happens frequently when I'm trimming MPEG-TS files recorded from HDTV. It literally doesn't stop at the -t/-to timestamp for reason I don't know. And it only happens when stream copy.

Below is a quick showcase: t.ts is the source, and the filenames show how I generate them with FFMPEG (for example, ss_t_i means input seeking -ss first, then -i t.ts, then -t 1:00).

https://i.imgur.com/lLUSzEM.png

As you can see, if I use -t/-to before -i, it doesn't cut the file properly.

>Also, input seeking should be inaccurate when doing stream copy

Yeah, it's not frame accurate, can only cut at keyframes, but enough for my application. By the way the same inaccuracy exists for output seeking if you're doing stream copy.

comment 5y ago · link · parent

Oh yeah, the level would (should) definitely be kept.

comment 5y ago · link · parent

Encoding settings metatag can be striped.

Regardless, I don't think these software are "matching" anything. TMPGEnc for example has settings to choose what quality you want for these re-encoded frames.

comment 5y ago · link · parent

Yeah, it is literally not possible to not seek to keyframe if you are stream copying.

There are however, plenty of great software that can but at any frame and only re-encode the frames that are outside the whole GOP. Most of them are commercial though, I haven't find one that is free and good.

----

Also, seeking in FFMPEG in practice, is actually more complicated than the guide [1] you linked. Below is a note I keep for own reference for keyframe-copy. Hope someone will find it useful.

How to keyframe-cut video properly with FFMPEG

FFMPEG supports "input seeking" and "output seeking". The output seeking is very slow (it needs to decode the whole video until the timestamp of your -ss) so you want to avoid it if unnecessary.

However, while -ss (seek start) works fine with input seeking, "-to/-t" (seek ending) is somehow vastly inaccurate in input seeking for FFMPEG. It could be off by a few seconds, or sometimes straight up does not work (for some mepeg-ts files recorded from TV).

The best of the two worlds is to use input seeking for -ss and then output seeking for -to. However, this way, the timestamp will restart from 0 in output seeking. So instead of using -to, you should calculate -t (duration) yourself by subtracting -ss from -to, and use `-t duration` instead. Below is a quick Python script to do so.

https://gist.github.com/fireattack/9a100c5a200154937babd1823...

(You can also try to use -copyts to keep timestamp, but not recommended because it doesn't work if the video file has non-zero start time.)

comment 5y ago · link · parent

I feel like their app (or method) is flawed in some way. It can't be that many phones have 300~400ms+ latency!?

comment 5y ago · link · parent

We're talking about tap-to-audio-output latency though, so it has nothing to do with display part of the screen.

And there is no "touch" on PC generally speaking.. input latency would be on mouse or keyboard.

I think you're talking different thing from the topic.

comment 5y ago · link · parent

I chuckled at the fact that their figures still have spell checker wavy underline :p

comment 5y ago · link · parent

Thanks!

Does it have "cosmetic filters" (the ones that block certain elements on page) or similar feature?

comment 5y ago · link · parent

I want to try these DNS-based blockers (AGH or Pi-hole) but am always wondering: is it easy to temporarily disable, or "debug" them?

I have encountered multiple times (not common, but not trivial) that a filter blocks something wrong. With traditional ad-blocker as extension, I can quickly find it out by using build-in logger, and then simply either temporarily disable them or add the site to whitelist with a single click (if I feel like it, I can write my own rule too.)

If I have to change my DNS setting everytime this happens with these DNS-based blockers, I feel like to stick with extensions since I don't really use my phone to browse Internet too much.

comment 5y ago · link · parent

Speak of which, is there any official follow-up from R* yet?

comment 5y ago · link · parent

It doesn't disturb me unless he/she is a core dev of node.js. I mean, anyone can say anything they want. Not to mention it's likely a joke.

comment 5y ago · link · parent

Open dev tool and monitor network?

comment 5y ago · link · parent

I'm surprised by the number of sheep. At least I thought the number for pig would be larger.

comment 5y ago · link · parent

Probably a good place to ask: is there a reason why Wayback Machine's archives often take forever to load?

Most of content on IA loads pretty fast, so WB is a notable exception.

comment 5y ago · link · parent

Just as a reference

    Title                   RMS     Peak    Diff
    clean_p257_011_lyra     -20.07  -1.13   18.93
    clean_p257_011_opus     -26.07  -6.65   19.41
    clean_p257_011_refer    -25.77  -6.15   19.63
PSD (Welch's method, window=213)

https://i.imgur.com/Y8A4kkx.png

comment 5y ago · link · parent

I just noticed you have one for "Create single-image video with audio".

This seemingly easy task is actually pretty hard to get right with FFMPEG.

Just leave a few notes here if anyone want to use that.

Video part

Chroma sampling

Without any `pix_fmt` argument, FFMPEG defaults to 4:4:4 instead of typical 4:2:0. Which has very limited support (for example, Firefox doesn't support it.)

To fix: add `pix_fmt yuv420p`, or chain a `format=yuv420p` vf at the end to your other vf(s).

Color space

FFMPEG by default uses BT.601 when converting your RGB images into YUV. This is an issue if your image / output video is in HD resolution. Almost all video players (including browsers) would assume BT.709 for anything >=720P. This causes color to shift in playback(255,0,0 would become 255,24,0).

To fix: add `-vf zscale=matrix=709`.

Note: there are some other video filters can do the same. The most famous being good ol' `scale` (based on libswscale). However, it has a notorious bug that would cause the color to shift on its own (becomes yellow) if the input is in BGR (all the `.bmp`s). See: https://trac.ffmpeg.org/ticket/979 So stick with better `zscale`.

Framerate etc.

You can set framerate with `-r` to a small number for both input (reading the same image X times per second) and output (since it's a still image, you can get away with very low framerate. `-tune stillimage` should also be used for (default) x264 encoder.

In summary:

ffmpeg -loop 1 -r 1 -i image.png -i audio.wav -r 1 -shortest -vf zscale=matrix=709,format=yuv420p -c:v libx264 -tune stillimage output_video.mp4

Audio part - length mismatch bug

Even if we ignore all the image/video troubles above, `ffmpeg -loop 1 -i image.png -i sound.mp3 -shortest video.mp4` still doesn't work well. "-shortest" argument has a long-standing bug (https://trac.ffmpeg.org/ticket/5456) that is the output video would be longer than your input audio (by quite a few seconds, worse if using -r 1). There are some workarounds (listed in the ticket) but they don't eliminate the issue entirely.

Your best bet (if the length match is crucial) is to just convert the output video again and use -t to cut to the proper length.

comment 5y ago · link · parent

How are cities selected (I meant by the author, I knew some didn't reply)? Noticeably there is no single Texas city.

comment 5y ago · link · parent

Being inconvenient can be a dark pattern on its own, not necessarily needs them to ignore your request.

Like, if I email them and say "hey, I want to remove these 340 comments I made out of 2000", and I do it every other day, would they still be as responsive? Even if they do, collecting and emailing all these links is still a big hassle compared to just clicking "delete" as I go through my own timeline like other social media platforms.

12345
24