/tech/ - Technology

Technology & Computing

New Reply
Files Max 5 files32MB total
[New Reply]

7d74793bc85116e57152ce564d2d0256e6bd4d98023fbe44899bbedae9ae7e81.png (u)
[Hide] (133.3KB, 474x266)
I was looking through the video editing thread on /v/ and figured it would be appropriate to have something similar here now that /tech/ exists. Except I think it would be ideal if the focus was on free software solutions, and also encompassing a broader spectrum of content rather than just videos.

In this thread give tips and ask questions about image editing, video editing, encoding, and anything else you think might be relevant for creating content.

Recommended Software
Video Editors
Recording & Streaming
>OBS (Open Broadcaster Software)
Image Editing
General Tools
>FFmpeg (Encoding)
>HandBrake (FFmpeg GUI)
>youtube-dl (Downloading video files from virtually any site)
Replies: >>130 >>237
Let me mention gallery-dl, which is an extremely useful tool for gathering large volumes of images and other media from most online art gallery places.  It even takes Nitter/Twitter URLs, although the default output file paths are weird.  You can find it easily with a search, either on Github or the Python file hosting community.

My copy of Vegas is getting kind of old, so I figured I'd give it a shot.  It's pretty lean and smooth, which I like, but every time I jump to a different frame in the timeline it plays the audio at that specific point.  Is there any way to disable this without disabling the audio from the timeline itself?  I'm on the wangblows version if that makes a difference.
Replies: >>973 >>1005
>>128 (OP) 
>no Blender
unironically a good video editor, what other video editor allows you to render a spinning 3d cube on top of a video?

Also OBS decided to fug my shit up, might have to look into logs if it has any. So I had to fall back to the chad ffmpeg
ffmpeg \
	-f pulse -ac 2 -i default \
	-r 60 \
	-f x11grab $(slop -l -n 1 -f '-video_size %wx%h -i +%x,%y') \
	-b:v 4M \
	-b:a 80k \
	~/"$(date +%Y-%m-%d_%H-%M-%S)".mp4
As long as you don't move the window around, it should be ok but isn't as good as Windows' gdigrab feature

I would also recommend Aegisub, absolute god tier subtitle editor - pretty sure most dedicated fansubbers use this program.
Replies: >>1005
Is there an equivalent of WebM for Retards on Linux? It doesn't work under wine and I don't want to put in 100 different modifiers in a terminal just to make a file under 16MB or whatever the limit is for my Estonian bus enthusiast forums. A GUI is simpler for all the options it has. QWinFF doesn't have the features I want, most specifically how it dynamically changes commands to get it under a certain filesize.
Replies: >>145 >>146 >>1005
HandBrake used to let you target file size in an earlier version but they removed it for some reason. You could maybe try using that version but it's quite old, it's 0.9.5. A more clean solution is probably some bash scripting, but that's out of my depth.
The target file size feature in webm for retards never worked properly for me anyways. These days I just do the bitrate calculations manually. Target file size / duration. If you're using handbrake you might need to account for the audio bitrate as well. Hopefully some other anon has a better more retard proof solution up their sleeves. I have almost no clue what I'm talking about
> I don't want to put in 100 different modifiers in a terminal just to make a file under 16MB or whatever the limit is
It's 32MB here (literally read the post form, newfag), but are you really making videos that are so complex?  My default use case for encoding a webm or MP4 is like:
ffmpeg -i input.mp4 -b:v video_bitrate -b:a audio_bitrate -s resolution -fs 16MB -f webm output.webmwhich is hardly difficult to modify with a bit of trial and error, since the only things I ever really change are the video bitrate and the resolution.  I imagine you must be making something more complicated.
Replies: >>147
Unless I'm mistaken -fs just cuts off the video when it reaches the file size.
Is there a realistic replacement for GIMP at this point? Every update makes the UI worse and tools worse. It's become difficult to use these days.
Try Krita. It's targeted at mostly artfags, but it can also be used as an image manipulation program.
>>128 (OP) 
I have some txt files that i need to convert to mp4, any reliable program to do that?
How do you calculate estimated webm size, to help you pick bitrates without completely blind trial and error? I remember there was some method to do it.
Replies: >>263 >>1005
1470505874679.webm (u)
[Hide] (194KB, 640x360, 00:05)
>too many packets buffered for output stream 0:1, conversion failed!
On my first day too.
I don't know that much about ffmpeg and conversion, but the only format that is reliably calculated is constant bitrate. As simple as taking the bitrate and multiplying it by seconds, just keep in mind that it's measured in bits. However, some sources say that constant rate factor is better, since it gives a less blocky picture during sudden movements as opposed to CBR. With CRF, there is no size estimation per se, you just specify a desired size and 2-pass encoding picks a CRF value to match that. I've seen a manual method mentioned, where it takes 5-10% of overall frames in the video and does a one pass encode with the value you specified. It's supposed to be fast enough to estimate size and play around with the settings, but I have no idea if it works.
On a side note, does anybody have that ffmpeg image guide that circulated around boards for video posting?
webm_guide.png (u)
[Hide] (1.1MB, 2400x3420)
How did no one post this.
Replies: >>502 >>505
thank you so much i was looking for this
Replies: >>505
When I make webms, I usually consult >>397 and the presets on https://developers.google.com/media/vp9/settings/vod\ .
it only works on windows but I like paint.net a lot
Krita is pretty good. The UI is a little weird but nowhere near as janky as GIMP's, and it has a few useful features that GIMP never had (like an actually usable color-to-alpha tool, or rectangles).
How can I split a single FLAC file into multiple FLAC files with the cue file, preferably with ffmpeg?
Replies: >>1005
I like Openshot for video editing, although I think I had problems with it crashing when I used it on Linux.
Replies: >>1005
Thanks, been looking for something like this and was worried I'd have to write something myself. Anything you know of for hashing large numbers of images and moving unique ones?
ruski_boorder.jpg (u)
[Hide] (168.7KB, 1024x768)
How does blender's video editing mode compare to kdenlives and such?
Audacity a shit, any alternatives? Not looking for anything fancy just very basic audio editing and maybe a few effects.

Thanks for this. I have a question; when downloading from tumblr, does it download the original uncompressed images or only the publicly available 1280px versions?
>Is there any way to disable this
Settings -> (uncheck) Scrub audio

>Also OBS decided to fug my shit up
What happened? I don't use it much but it runs pretty smoothly, granted I only use the internal ffmpeg encoder and never the stock one.
I already managed to capture application audio using it but there's always a delay of a few seconds and the audio sometimes gets choppy. Ironically I don't have that problem with OBS.

Use webm.py: https://github.com/Kagami/webm.py it's a small wrapper for ffmpeg with very sane encode settings that I've backported into my own vanilla ffmpeg scripts, it's that good.
To get a 16MB video you just do webm -i input.mp4 -l 16

Disable tool grouping and rearrange the tools any way you want, that should fix most/all UI woes. Alternatively downgrade to 2.8.22: https://download.gimp.org/mirror/pub/gimp/v2.8/windows/

>How do you calculate estimated webm size
Exact formula is covered here: https://trac.ffmpeg.org/wiki/Encode/H.264#twopass

On windows you can use CUETools, on linux you can use flacon (needs flac to be installed). This is the easiest, graphical way.
Otherwise google found this for ffmpeg: https://gist.github.com/Theldus/bf7b9fd7370f4ea4c57da5cb596e9da9

It crashes on windows too, no reason to use it when Shotcut exists.
Replies: >>1019
>what happened
obs works on my machine now
prog.png (u)
[Hide] (148.4KB, 954x524)
outberg.gif (u)
[Hide] (97.2KB, 400x225)
Any ffmpeg experts that can help me? I'm trying to create a program that makes creating webms and gifs easier, think of it like 'Webm for Retards' 2.0.

The idea is that you can accurately pick the time/frame that you want and see a thumbnail of the current time, but my problem is that I don't know how to accurately measure time, specifically frame-by-frame.

To give a more concrete problem: when the video is seeked to a specific HH:MM:SS time, I want to be able to see the frame number and/or press a key to move to the next frame. How could I accomplish this? Is there some trick I could use to convert a timestamp into a frame number and vice-versa?
Replies: >>1028 >>1045 >>1181
Oh and I can get info with ffprobe as well, in case that has a way.
Cool, not an expert dude but ffmpeg has fuckeasy any video to gif creation commands all you have to do simplify and call it with the UI right? You can even do variable fps feasible up to 60(i dont have the commands on hand right now) and if you dont already know you can set time and cuts in ffmpeg, this only requires you to watch the given video and memorize numbers to figure what you want to cut which you will try and eliminate with your GUI.

>To give a more concrete problem: when the video is seeked to a specific HH:MM:SS time, I want to be able to see the frame number and/or press a key to move to the next frame. How could I accomplish this? Is there some trick I could use to convert a timestamp into a frame number and vice-versa?
I don't know but read ffmpeg source code to get inspired and maybe you can rip it off, I know it has neat stuff like frame counters of a given input (on conversion.)
out.gif (u)
[Hide] (373.2KB, 400x225)
dither.png (u)
[Hide] (122.2KB, 1200x675)
How do I improve the quality of gifs made with ffmpeg? Mostly talking about dithering and the color palette. I tried searching but can't figure out how to apply the shit I find. Pics related, it bleeds dithering out of it's ass even though the image is full of flat solid colors.

The command used for pic related was:
ffmpeg  -i "/path/to/file.mkv"  -ss starttime  -t duration  -filter:v scale=w=400:h=400:force_original_aspect_ratio=decrease  -y  "path/to/out.gif"

How can I modify it to remove dithering, limit the number of colors to somewhere between 32-128, or make the color palette less retarded? I can't figure out the answer to any one of those questions.
Replies: >>1045
rain.png (u)
[Hide] (37.8KB, 320x240)
rain-no.png (u)
[Hide] (4.3KB, 320x240)
rain-pz.png (u)
[Hide] (7.7KB, 320x240)
rain-fs.png (u)
[Hide] (12KB, 320x240)
rain-fsr.png (u)
[Hide] (12KB, 320x240)
The way Shotcut does it is represents time as HH:MM:SS:FF where FF is the frame number in a given second SS. For example a 60 FPS video would have FF values from 00 to 59 for every second... There was an alternative method from what I recall where you could just input HH:MM:SS.MS where MS is milliseconds and it automatically converts it to the first format... You could look into implementing that system.

The dithering algorithm in your picture is called "Positioned" and it's what MS Paint uses lol, you're better off using an algorithm called "Floyd-Steinberg". Pics related (in order) show the difference between the original image, no dithering, positioned dithering, Floyd-Steinberg (normal) and Floyd-Steinberg (reduced color bleeding).
Now I don't know how to tune ffmpeg for creating GIFs however here is a very simple way to do it using GIMP:
>export your video as PNG/JPEG frames using ffmpeg (resize if needed)
>make a new file in GIMP with the dimensions of the video and delete the default Background layer
>drag all frames into the GIMP window and they will be inserted on top of each other in a stack way (from bottom to top 1,2,3...etc)
<save the file as XCF (backup)
>click Image -> Mode -> Indexed
>- choose the maximum number of colors (128-256 is good)
>- check "Remove unused"
>- uncheck both "dithering transparency" and "dithering text"
>- choose Floyd-Steinberg dithering or F-S (reduced color bleeding) and click convert
>click File -> Export as and type filename.gif then go from there
Replies: >>1046 >>1047
Forgot to say, before you export go to
>Filters -> Animation -> Optimize (for GIF) or (Difference) it doesn't matter much)
to reduce file size as much as possible.
>represents time as HH:MM:SS:FF where FF is the frame number in a given second SS
That won't make sense for videos with 29.97 fps for example. I also don't want to approximate the duration of frames in milliseconds, because that may lead to frames being skipped when you jump forward frame-by-frame, supposedly the frames don't always have the same duration.

For now I'm jumping forward 10 milliseconds when you press the arrow keys, and 100 if you hold shift. It's good enough for finding the frame you want, but it's obviously not ideal.

I need it for the aforementioned program, so Gimp is not an option. Exporting the animation as frames is something I didn't consider though, I suppose I could have that option so they can be used in a different program to finish the job, maybe even use imagemagick to create the final animation automagickally.
Replies: >>1048
>That won't make sense for videos with 29.97 fps for example.
You can probably do HH:MM:SS:FF.FF who knows. Anyway vanilla ffmpeg supports HH:MM:SS.MSS where MSS is milliseconds so you can just go with that.
See the color mapping section.
>> 1048
>See the color mapping section.
This is exactly the kind of shit that I don't know how to apply. I get how to generate the palette since all I need to do is add ",palettegen" to the filters, but I have no idea how to then use it because all the examples use -filter_complex with seemingly completely different syntax and the ffmpeg documentation doesn't tell me anything about what the difference is.
Replies: >>1050
I think this is a two-pass process: first pass generates the palette and stores it in a temporary location, then second pass uses that palette to encode. Check the "usage" section in the link.
Replies: >>1051
shit_bayer.gif (u)
[Hide] (515.4KB, 400x225)
bloated_sierra2.gif (u)
[Hide] (6.7MB, 400x225)
I know it is, but the syntax suddenly goes from a relatively understandable "s1=xxx,s2=zzz" style to having brackets and semicolons in a nonsensical pattern.

Anyway I did get it to work but the results are worse than they were at the beginning. It generates a stupid palette that completely misses certain colors, the dithering becomes incredibly noisy and bloats the filesize, and the only dithering methods that even use the generated palette remotely correctly in the first place have the most noise and create a file that's literally 20 times larger than the non-paletted one. Even if I disable dithering, the filesize is still about 12% bigger despite looking like complete trash.

I think ffmpeg is a lost cause and I just need to use a different program to make a gif from extracted frames or something.
Replies: >>1054
source.mp4 (u)
[Hide] (61.7KB, 608x352, 00:00)
output.gif (u)
[Hide] (491.2KB, 400x225)
And here's an example of it missing colors.
Replies: >>1054
test.gif (u)
[Hide] (1MB, 400x225)
Can't believe I spent an entire day fighting with that shit. Just exporting frames and putting them together in imagemagick immediately gives great results. Only problem is that it's having a stroke and jumping to the first frame over and over.
Replies: >>1054 >>1056 >>1060
Look, I don't mean to discourage you but I think you have a long way to go in understanding how ffmpeg works to begin with before even attempting to leverage it with an automated script, let alone your own tool.
You need to google more until you get to a point where you already know how to do everything through commands, and only need a simple program to call these commands.
Replies: >>1057
By the way if imagemagick isn't cutting it try graphicsmagick.
the truth is thats actually the best gif itt
Replies: >>1057
frames.png (u)
[Hide] (401.8KB, 1612x1100)
>you have a long way to go in understanding how ffmpeg works to begin with before even attempting to leverage it with an automated script, let alone your own tool
I'm already doing it though. The problem is that I've googled everything I'm capable of and have exhausted my ability to get any more out of it. ffmpeg just doesn't seem to be capable of exporting good gif animations period.

Meanwhile imagemagick gives a glitchy result even though I literally copypasted the exact command someone mentioned, there's nothing esoteric about it, just input frames output gif.
magick frame_*.png output.gif
The command I used for the previous gif was a bit different but it's glitched no matter what. There's nothing wrong about the frames either, pic related.

Well yeah, that's the first gif made with imagemagick instead of ffmpeg.
Replies: >>1058 >>1113
That command was written for linux, take note of the * implying a wildcard. Windows doesn't work that way.
Replies: >>1059
Well it successfully finds the frames anyway. It's not a call to windows, it's something I'm giving as an input to ffmpeg.
>Well yeah, that's the first gif made with imagemagick instead of ffmpeg.
I mean in that it's terrorizingly glitching
out.gif (u)
[Hide] (525.7KB, 400x225)
What the fuck, all I had to do was rename the files to frame_001 etc instead of frame_1. I can kind of guess why, but I don't understand why it only jumps to the first frame every time instead of repeating frame_1, frame_10, frame_11 or similar pattern. Maybe they were too similar so they got merged into a single frame which is why I only saw a single incorrect frame at a time in gimp.
Replies: >>1113
Forgot, but here's the commands in case anyone wants a way to make gifs.

First, use ffmpeg to create a list of images from the video frames (as seen in >>1057 )
ffmpeg   -ss 00:00:00.000   -i INPUTFILE   -t 00:00:00.000   -filter:v scale=w=400:h=400:force_original_aspect_ratio=decrease  OUTPUTPATH/frame_%04d.png
Put the start time after -ss and the duration after -t. w=400:h=400 is the maximum width and height of the gif you want, around 400-600 is good for gifs. Replace INPUTFILE and OUTPUTPATH with whatever you want, I recommend outputting to an empty folder since it creates tons of files.

If you want to crop it, you can put it before the scale:
-filter:v crop=WIDTH:HEIGHT:X:Y,scale=w=...
You can also crop in the next step, but I don't have the command for that.

Next, use imagemagick to combine the frames into an optimized gif animation:
magick   -delay 1xFRAMERATE   INPUTPATH/frame_*.png   -fuzz 2%   -layers OptimizeFrame -layers OptimizeTransparency   +fuzz   OUTPUTFILE.gif
FRAMERATE must be the framerate of the video, for example 1x30 if the video is 30fps, see below. Again replace INPUTPATH and OUTPUTFILE with whatever. You can increase the fuzz value to improve filesize (it ignores pixels whose color changes less than 2%), but it may create artifacts, 1-3% seems usually fine.

You can find out the fps of a video by using ffprobe: ffprobe   -hide_banner   -i INPUTFILE there should be "xx fps" somewhere. If it's something like 29.97, then it's fine to just pretend it's 30.
Is there a way to get ffprobe's functionality with ffmpeg?

I'm trying to put together >>1026 and want to make a separate version with ffmpeg included with it so you don't have to install it separately, but I don't want to include both ffmpeg and ffprobe because they're 64MB each. Their file sizes are almost identical so I thought maybe ffmpeg has a command or something that makes it act like ffprobe.
Replies: >>1184 >>1206
My ffprobe is only about 150K. You can bundle a dynamically linked version. Or write a C wrapper around it's library in your program(which should be what you are doing anyway).
Replies: >>1188
I have no idea how to use it as a library. Literally every single library except stb_* is incompatible with my environment, and I'm not going to start digging for macros and types within the source code so I could nigger rig a dll. I would be much happier and my program would be much better if I was able to use it that way though.
Replies: >>1191
>on losedows
Replies: >>1195 >>1206 >>1504
Untitled.png (u)
[Hide] (16.8KB, 783x213)
Replies: >>1200 >>1486 >>1504
Maybe forums with bigger market share are more suitable for you.
Replies: >>1500 >>1504
Look into libffmpeg, I haven't personally used it but a lot of programs do. Pretty sure the ffprobe functionality is included, besides you can compile with only the codecs you want in order to shrink size.
And seconding what >>1191 said, you're better off programming on linux, even when targeting windows. Make a linux VM and develop on it, should be much easier.
8bbd150da485805ea726daa3168ba1ad7a5a2374b1d443982d5f6c1260343c5c.mp4 (u)
[Hide] (2.9MB, 960x720, 03:08)
1.webm (u)
[Hide] (3MB, 960x720, 03:09)
I adapted ffmpeg command for music  webm (vp8) to mp4 (h264) and it worked great everywhere but in mpv, for some reason .mp4 version makes mpv crash if I try skipping 5 seconds with arrow keys. Any ideas why?

Original command. 
ffmpeg -i audio -r 1 -loop 1 -i pic.jpg -c:v libvpx -crf 20 -b:v 0 -g 9999 -sn -c:a libopus -b:a 96k -ac 2 -metadata title="title" -shortest -auto-alt-ref 0 -f webm out.webm 
Adapted command for .mp4
ffmpeg -ss 0 -i audio -r 1 -loop 1 -i pic.jpg -crf 20 -b:v 0 -g 9999 -sn -t 3:08 -pix_fmt yuv420p -c:a libopus -b:a 96k -ac 2 -metadata title="title" -shortest -auto-alt-ref 0 -f mp4 out.mp4 
Is code tag broken?
Replies: >>1505 >>1544
What are you even doing in this website? You don't belong here.
Replies: >>1500 >>1504
The sheer crude mentality of linux users. Always complain why nobody uses and if somebody uses it they lash out like death was tomorrow.
Replies: >>1501 >>1504
The sheer crude mentality of windows users. Always complain why it is so shitty and if somebody suggests an alternative they lash out like death was tomorrow.
Replies: >>1504 >>1507
>>1191 >>1195 >>1200
>>1486 >>1501 >>1500
The fact is that all your OS's are shit and if you say otherwise you are delusional nigger cattle with stockholm syndrome. Wake up.
32e9d76ec566e8195cd98425467fed3ec6bf6e18892b13cf5fe1c630f33bbbf5.jpg (u)
[Hide] (191.3KB, 775x800)
Thank you for sharing this.
Speaking of that, now that Linux got shilled plenty, it's also common in the Linux world.

All the university-raised sysadmins, (((RedHat))) software users, Desktop Environment streetshitters, trannies, and other assorted trash, do that shit all the time.
This has always got me the best results easily: https://github.com/HelpSeeker/Restricted-WebM

This is a piece of shit but GUI opts for when you're lazy: https://github.com/Kagami/boram

And for some fuckery stuff: https://gitlab.com/Baut/imgboardtools
Replies: >>1533
And here's a couple of .bashrc functions

possible language: bash, relevance: 44
# Spoof webm duration
spooflen() {
	declare -r filen=${1?No input given}
	declare vidlen
	[[ -f ${filen} ]] || { printf '"%q" - not a file.\n' "${filen}" >&2; return 1; }
	vidlen=$(ffprobe -i "${filen}" -show_entries format=duration -v quiet -of csv="p=0")
	# 1ms
# 	LC_ALL=C sed 's/\x44\x89\x88[\x00-\xFF]\{4\}/\x44\x89\x88\x3F\xF0\x00\x00/g' "${filen}" > "${filen%.*}_(Len_${vidlen}s).webm"
	# 2 min
# 	LC_ALL=C sed 's/\x44\x89\x88[\x00-\xFF]\{4\}/\x44\x89\x88\x40\xFD\x4C\x00/g' "${filen}" > "${filen%.*}_(Len_${vidlen}s).webm"
	# 5 min
	LC_ALL=C sed 's/\x44\x89\x88[\x00-\xFF]\{4\}/\x44\x89\x88\x41\x12\x4F\x80/g' "${filen}" > "${filen%.*}_(Len_${vidlen}s).webm"

# Split video into parts of n seconds per segment
splitvid() {
	declare -r filen=${1?No input given}
	declare -ri vidlen=${2:-600}
	[[ -f ${filen} ]] || { printf '"%q" - not a file.\n' "${filen}" >&2; return 1; }
	mkdir -p split-vids/
	ffmpeg -i "${filen}" -sn -acodec copy -f segment -segment_time "${vidlen}" -vcodec copy -reset_timestamps 1 -map 0 -segment_start_number 1 split-vids/"${filen%.*}_Part%d.${filen##*.}"
here is this mess automated, enjoy 

` bash

titl="$(youtube-dl $1 --get-filename -o '%(title)s_%(id)s' --restrict-filenames)"
length="$(youtube-dl $1 --get-duration)"
filename="$(youtube-dl $1 --get-filename -o '%(title)s' --restrict-filenames)"

youtube-dl -f 251  -o - $1|ffmpeg -ss 0 -i pipe:0 -r 1 -loop 1 -i /tmp/cover.jpg  -c:v libvpx-vp9 -pix_fmt yuv420p -t $length  -crf 20 -b:v 0 -g 9999 -sn -c:a libopus -b:a 96k -ac 2 -metadata title="$titl" -shortest -auto-alt-ref 0 -f mp4 $filename.mp4
Yukikaze_01_sylph_(use_headphones).webm (u)
[Hide] (5MB, 640x480, 02:04)
ffmpeg -ss XX:XX.XX -to XX:XX.XX -i sauce.mkv subtitles.ass
ffmpeg -i sauce.mkv -vf subtitles="subtitles.ass" -f yuv4mpegpipe - | aomenc --codec=av1 --webm -t X --lag-in-frames=25 --end-usage=vbr --target-bitrate=250 --auto-alt-ref=1 --tile-columns=6 --tile-rows=6 --frame-parallel=0 --row-mt=1 --min-q=0 --max-q=63 --frame-boost=1 --deltaq-mode=2 --cpu-used=4 --sharpness=7 --sb-size=128 --enable-qm=1 --qm-min=0 --qm-max=15 --kf-max-dist=9999 --enable-tpl-model=1 --enable-fwd-kf=1 -w 640 -h 480 --passes=2 --pass=X --fpf=2pass.log -o "output" -
ffmpeg -i sauce.mkv -c:a libopus -b:a 96k -af sofalizer=/path/to/HRIR.sofa audio.opus
ffmpeg -i output -i audio.opus -c copy -map 0:v:0 -map 1:a:0 -f webm "final.webm"

ffmpeg's libaom wrapper a shit! SHIT!
Replies: >>1551
Isn't it faster for the same size to do two pass vp9 at the highest compression/quality present?
mpv-shot0130.jpg (u)
[Hide] (103.2KB, 1280x720)
mpv-shot0129.jpg (u)
[Hide] (108.6KB, 1280x720)
mpv-shot0128.jpg (u)
[Hide] (106.6KB, 1280x720)
mpv-shot0127.jpg (u)
[Hide] (97.7KB, 1280x720)
mpv-shot0126.jpg (u)
[Hide] (84.8KB, 1280x720)
Is it possible to fix interpolated frames in video like this?
Search engines only show how to interpolate video to 60 fps.
Replies: >>1762
May as well just remove those frames and interpolate again. If those frames got inserted every x frames, shouldn't be hard to remove them.
Something I just seemed to find out yesterday: FF (and pale moon, which has been a different browser for some time now) won't play .webm if the audio isn't 48K opus.

FFmpeg complains if I try to use libmp3lame with the .webm container, and while the browser doesn't seem to have a problem with -ac 1 (mono not stereo) or low bitrates like -b:a 42K it breaks if I use -ar 12K or even -ar 24K.

 When the audio is just some guy rambling slowly, it seems needless to have a high sample rate. and VLC, HPC-64, both play the downloaded file fine but FF says 'nope'

...is there a list somewhere, of things to do to make sure your content can be rendered by an average browser? TIA, -anon
Replies: >>1801
>in a webm
That won't work because the WEBM container doesn't support MP3 audio, only Opus and Vorbis audio. And Opus' sampling rate is locked at 48kHz. See:
>is there a list somewhere
Yes there is:
But here's an even shorter list:
  1. VP9 video + Vorbis/Opus audio in a WEBM
  2. H.264 video + AAC/MP3 audio in a MP4
Anything other than these 2 combos is not guaranteed to work across browsers.
Replies: >>1804
example.webm (u)
[Hide] (3.1MB, 640x332, 03:17)
>And Opus' sampling rate is locked at 48kHz

1: By whom?
2: That's really dumb.

Okay, thanks. Now I know it's broken. As I said media players render opus at any sample rate FFmpeg will agree to encode it in, which seems to be 8K, 11K, 12K, 24K, and yes double that to 48K.

MP3 standbys like 22050 and 44100 don't agree with FFmpeg, so I figure that would not render correctly but... seriously? Why does it make sense to take a 22K sound and pad it with a bunch of zeroes so it could be transcoded into a format most useful for compressing for overworked network usage.
Replies: >>1806
>1: By whom?
The Xiph.Org foundation which designed it in the first place... The answers to your questions are most probably in the specification: https://archive.ph/cEaYu#selection-1205.3-1205.22
Regardless of how the codec works, its massive quality to file size ratio alone is more than enough reason to use it in videos. You need every kilobyte you can get for storing the encoded video, so it makes sense to minimize the size of the audio as much as possible.
Replies: >>1807
>need every kilobyte
>that's why we choose to waste data with literal non sense

That's not at all what the page you just linked to say. It lists the effective sample rates to be 8, 12, 16, 24 & 48 kilohertz.
Which means that FFmpeg & VLC are right, and whoever wrote the subroutines for this browser decided to chintz out and only include half the code.
Maybe less than that; scrolling down I read that any opus decoder can decode audio encoded to any bandwidth. By definition, then, FF and I guess Pale Moon can't render the opus audio codec.

 Now, I can kinda understand that, because I don't consider a web browser to be a media player, and I have a separate MP3 player exactly because I also don't consider my phone to be an MP3 player.

 and for as frustrated by this as I am, I obviously need to thank you for having these weblinks handy since I new about Xiph but hadn't gone looking for the codec specification because I was expecting it to talked about by more-normal people than the math nerds making lossy ways of writing down the description of the parts of sound you care about hearing.
But that page was surprisingly readable, so I'm impressed at whoever they hired to act as translator.
Replies: >>1817
warthog_44k.flac (u)
[Hide] (17.8MB, 1400x1400, 03:22)
warthog_44k.opus (u)
[Hide] (2.9MB, 03:22)
warthog_8k.opus (u)
[Hide] (2.6MB, 03:22)
>That's not at all what the page you just linked to say. It lists the effective sample rates to be 8, 12, 16, 24 & 48 kilohertz.
You are right, however I think it's impossible to encode an opus file at any rate other than 48kHz.
I just tested the official opusenc and it doesn't even let the user specify an output sample rate. See https://opus-codec.org/docs/opus-tools/opusenc.html And regardless of the input sample rate, the program always outputs at 48kHz. I tested ffmpeg as well and it, too, always outputs 48kHz opus files, regardless of the input sample rate or the -ar specified...
How exactly did you produce the 12/24kHz opus files?
>that's why we choose to waste data with literal non sense
You're talking about defaulting to 48kHz when encoding opus? If so, I disagree that data is wasted, because my tests showed a decrease in file size... If you throw a 44.1kHz flac file and a 8kHz flac file at opusenc, you'll find the output of the former to be larger than the output of the latter. Similarly, if you encode a 44.1kHz flac file using ffmpeg twice, once without -ar and once with -ar 8000, you'll get the same difference in file size. Attached are example files showing this.
>and for as frustrated by this as I am, I obviously need to thank you for having these weblinks handy
No problem, glad I could help.
Replies: >>1823
ffmpeg always reports 48kHz for decoding opus, see https://stackoverflow.com/questions/39186282/ffmpeg-not-honoring-sample-rate-in-opus-output
Is there a way to make ffmpeg shut the fuck up? I have a video that has 800 million chapters and ffmpeg spams the fuck out of my console with them every time I touch it. I don't want to see them, but I do want to see the conversion progress and errors and the like.
Replies: >>2009
RTFM, faggot
man ffmpeg
Regex loglevel
I've been using handbrake to re-encode video and hardcode extant subs. I'm using .mkv files and converting into mp4 files. For most of the files it has worked fine. But in two of the videos (which use PGS files for subs) the subs are shifted to the right side of the screen. They're all there but off-center and it's giving me cancer. All attempted ffmpeg solutions have failed outright (maybe I am retarded at ffmpeg, but trying to use ffmpeg to accomplish what I'm doing with handbrake just results in one sub being stuck on the screen for the whole video duration). Obviously ffmpeg won't be helpful with hardsubs. So I guess what I'm asking is - is there a way to use ffmpeg to convert a .mkv video with subtitles into a .mp4 video with hardsubs that actually works?
Replies: >>3992
The problem should be caused by the original softsub. Are they shifted in the mkv? If so, you can either extract the subtitle and fix it, or download a working subtitle. ffmpeg + subtitles filter should work then.
Replies: >>3998
They're normal and in the right place in the mkv when I use mpv to play it. How would I extract PGS subs to a workable file?
cute.png (u)
[Hide] (9.2KB, 640x640)
How do I make .mp4 files streamable? So I can open them before encoding is finished.
Replies: >>4000
They are streamable, try opening it with mpv after encoding some percent of it.
Replies: >>4003
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found
[lavf] avformat_open_input() failed
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: moov atom not found
[lavf] avformat_open_input() failed
Failed to recognize file format.
Replies: >>4004
Interesting, maybe I was encoding webm. https://stackoverflow.com/questions/16131616/how-to-create-streamable-audio-file-with-ffmpeg
First time I had problem with overhead, how do I lover or avoid it?
video:19998kB audio:7249kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 27.373976%
It's 2 hour video.
Replies: >>4049
What codec are you using and which container? A couple searches say some format may need tweaking or another tool to do a better job.
bb452a2417f2444a3108e3762be82ce22c65564442df8e2098fa9bf076043ced.webm (u)
[Hide] (334.2KB, 854x480, 01:26)
What codec should I use to destroy audio and video, like webm related?
Anything with low bitrate.
The audio codec definitely sounds like opus at <16kbps. Couldn't say for the video, but obviously try doing the same thing for mp4/webm/etc.
Source for the video: https://invidious.snopyta.org/watch?v=U-sd4mKcOXM
Strategic_bombing_with_HRTF.webm (u)
[Hide] (32MB, 1920x1080, 06:47)
Is there a way to convert ((( (((Dolby Atmos))) ))) metadata into something that can be encoded into a regular ol' stereo bitstream using libmysofa with an appropriate HRIR?
Proprietary standards for object-based 3D Audio disgust me.
Replies: >>4273
No, software ((( (((atmos))) ))) decoding is not possible. The sofalizer plugin only works with decoded audio. https://github.com/mpv-player/mpv/issues/3903
If you only use the TrueHD/AC3 part of the audio, then it will work. But the atmos data is ignored.
ika_shakal.mp4 (u)
[Hide] (640.8KB, 1280x720, 01:29)
Have you also became hyper sensitive to video artifacts after you started encoding videos?
Single pass low bitrate x264/opus.
Replies: >>4313 >>4319
Yes, to encode videos I'd tweak the bitrate until I could stare at a still and only barely see the artifacts, with the idea that if it looks almost perfect on stills then it looks perfect in movement.
But I learned what to look for instinctively and now I can spot what is an artifact and what isn't more easily.
[New Reply]
94 replies | 38 files
Show Post Actions



- news - rules - faq -
jschan 0.1.7