No.22
Well this is pretty cool. Hope moot can be convinced to fold this into 4chan at some point. Is it possible to make these behave more like .gifs (no seek bar, audio etc.)?
No.23
>>22If you right-click on a video, you can turn the controls off. Speaking more generally, when you put a <video> on an HTML5 website, the controls attribute tells the browser whether it should add controls.
There's an option in the settings to mute the sounds when you start playing a video, although it doesn't apply when you open the file directly using the link above the thumbnail. And it's not hard to block the posting of videos with sound tracks if one wishes (obviously I haven't).
I'm more interested in getting GIF and APNG files to behave more like videos. Having a seek bar and pause button available is a good thing.
No.128
>>17An update to this:
Adding
-quality best
will make the encoding run slower, but will give you better file sizes for the same quality. This is a good idea for short clips, but may exceed your patience for longer ones.
Here is the result of
ffmpeg -i tmp2.mkv -qmin 10 -qmax 10 -quality best out.webm
For more details on tweaking the encoding parameters, read
https://trac.ffmpeg.org/wiki/vpxEncodingGuidehttp://www.webmproject.org/docs/encoder-parameters/ No.129
>>128I'm pretty sure "-qmin 10" and "-qmax 10" override the "-quality best" parameter, I tried and the output file was bigger when I removed qmin and qmax but left "quality best".
By the way, Avidemux isn't necessary for that kind of job, you can do it all with one command in ffmpeg.
These were the settings I used for this file:
ffmpeg -ss 05:45.70 -i source.mkv -t 9.70 -vf crop=292:388:731:414 -sn -quality best out.webm
source.mkv is just SnW ep2 renamed.
>snRemoves the subtitles. Always use this parameter when encoding a video with subtitles to webm.
>-vf crop=292:388:731:414Applies the crop filter. You can read this page to learn about more video filters and how they work:
http://ffmpeg.org/ffmpeg-filters.html No.130
>>129>I'm pretty sure "-qmin 10" and "-qmax 10" override the "-quality best" parameterNo, they're entirely separate things. The -quality setting is about the CPU time, and -qmin and -qmax are about bitrate vs quality.
If you remove the -qmin and -qmax, you get encoding at the default bitrate of 250 kbits/second. Depending on your video, that may be too large or far too small.
Another option worth trying is the -crf option; with libvpx that gives you something close to the -qmin -qmax thing, but frames which may be used as references for other frames get encoded with a higher quality than the others. But with -crf you still have to set -b:v (unless you want the default 250 kbits/s), which functions as a maximum bitrate.
>By the way, Avidemux isn't necessary for that kind of job, you can do it all with one command in ffmpeg.That's true and worth pointing out. Although it's convenient to have a GUI for cutting and cropping so I can see what I'm doing.
No.131
>>130My bad, I should've looked it up in the docs. There's a lot of options and I get easily confused.
>Although it's convenient to have a GUI for cutting and cropping so I can see what I'm doing.Fair enough.
Testing crop filter combined with scale, settings used:
ffmpeg -ss 11:10 -i garupan07.mkv -qmin 10 -qmax 10 -t 9 -vf "crop=w=1000:h=1064:x=920:y=16,scale=500:532" -sn panzer.webm
No.135
Another thing to watch out for:
Apparently ffmpeg doesn't do the necessary colorspace conversions automatically, so you have to do it by hand with the colormatrix filter.
ffmpeg -ss 13:25 -i "[Mazui]_Ore_No_Imouto_-_10v2_[9D348AB9].mkv" -t 4.25 -vf colormatrix=bt709:bt601,ass=subs.ass -sn -qmin 10 -qmax 10 -q:a 5 "gaki no anime.webm"
There are multiple ways of defining the Y'CbCr colors usually used in compressed video files in terms of RGB. Two common ones are BT.601 and BT.709. For details, read:
http://en.wikipedia.org/wiki/YCbCrH.264 has a flag to indicate which colorspace definition is being used, but for stuff at resolutions of 720p and higher, it's usually BT.709. VP8 uses BT.601:
http://tools.ietf.org/html/draft-bankoski-vp8-bitstream-00#section-9.2Unfortunately, it seems that many players (I tested MPC-HC and VLC) will display VP8 videos as if they were BT.709. But the browsers I tested (Firefox, Chrome, Opera) all use the correct colors.
No.136
For comparison, here's
>>135 without the conversion.
No.137
>>135>>136Fortunately, as you can see, it's a relatively small difference. But it's worth knowing about.
No.141
What encode as done in the OP video?
No.142
>>141You can read it on the first frame.
No.143
>>142That's just to record it; it was then sped up and converted to VP8 with something like
ffmpeg -i capture.mkv -vf "setpts=0.5*PTS" -qmin 20 -qmax 20 capture.webm
No.144
Here are some slides about the "constrained quality" mode of libvpx (-crf X -b:v Y). In their tests, they got better results than with constant-quantizer mode (-qmin X -qmax X).
http://blog.webmproject.org/2011/03/vp8-constrained-quality-cq-encoding.htmlTheir example settings on slide 12 have the quality set rather low, so you'll probably want to tweak the parameters and see what works best.
No.183
VirtualDub seems to be pretty convenient for doing this, but it requires a bit of setup. Also it's Windows only.
VirtualDub may not open your videos out of the box, but there's a plugin that will allow it to open anything you have DirectShow filters for. So install LAV Filters if you don't have it already. Then unzip
http://forums.virtualdub.org/index.php?act=ST&f=7&t=15093and place the appropriate DShowInputDriver.vdplugin file in your VirtualDub plugins folder.
Cutting in time involves using these buttons (see pic) to select the beginning and end of your clip, and choosing "Crop to selection" from the edit menu. For cropping, you use the Filters dialog in the Video menu. You have to add a "null transform," after which you can use the cropping dialog to select the region you want.
The last issue is saving the clips in WebM format. VirtualDub supports piping video data to external encoders. A guide to this can be found here:
http://forums.virtualdub.org/index.php?act=ST&f=3&t=18840&st=0So you can use FFmpeg to convert raw video and audio to VP8 + Vorbis in a WebM container. Here's a setup file which should get it working if you save it as webm.vdprof, edit the paths to ffmpeg and cmd, and import it into the External Encoders dialog:
http://pastebin.com/raw.php?i=br77bNVZOnce you have this set up correctly, you can go to "File > Export > Using external encoder…" and select the option you want. I've included two settings; the q=10 one gives you higher quality but larger video files.
No.190
>>183Update: I've been having trouble getting the DShowInputDriver plugin to work right with just LAV Filters. It seems to work okay with LAV Splitter + ffdshow-tryouts.
There's another plugin which is an ffmpeg wrapper, which seems to work a bit more reliably:
http://forums.virtualdub.org/index.php?act=ST&f=7&t=20025&st=0Currently, if you try to open a WebM file with it, it will tell you it's not a supported file type, but since ffmpeg obviously supports WebM, you can just change the file extension to one of the ones in the "supported" list, and it will work.
Depending on your version of Windows, you may find that the most recent version crashes, in which case you should install a previous version.
There's also a handy list of input plugins for VirtualDub here:
http://forums.virtualdub.org/index.php?act=ST&f=7&t=19488&hl=ffmpeg&s=75826452466bb803d6bb063a1e1d57b5 No.191
Also
>>183>choosing "Crop to selection" from the edit menuit's not necessary to do this; you can just select the section you want and save it.
No.193
Here's a batch script to help set up output from VirtualDub. This generates a webm.vdprof file you can import into VirtualDub given the location of ffmpeg.
http://pastebin.com/raw.php?i=WgjThaGp No.194
>>193So, an updated setup guide:
1. Download VirtualDub from
http://virtualdub.sourceforge.net/and FFmpeg from
http://ffmpeg.zeranoe.com/builds/Extract the files and put them in your Program Files directory, or wherever you want to install them.
2. Download the FFmpeg input plugin for VirtualDub from
http://forums.virtualdub.org/index.php?act=ST&f=7&t=20025&st=0Unzip it and move the contents of the plugins32 directory (or plugins64 if you installed the 64-bit version of VirtualDub) to the plugins32 (or plugins64) directory in the copy of VirtualDub you just installed.
3. Download
http://pastebin.com/raw.php?i=WgjThaGpand name it outputsetup.bat
Find ffmpeg.exe in the copy of FFmpeg you installed (it should be in the bin directory) and drag and drop it on outputsetup.bat. It should create a file named webm.vdprof. Open VirtualDub, go to Options > External Encoders… > Import…, and select this webm.vdprof file.
No.195
I should note that VirtualDub with the FFmpeg input plugin doesn't yet have the ability to tell whether a file is BT.709 or BT.601, and it will assume BT.601, which can lead to the problem discussed at
>>135.
Fortunately, it's easy to correct this. If the input is BT.709, you can add an "alias format" filter to tell it that.
The left hand side is the video before filters (slightly wrong colors), and the right hand side is the video after filters (colors fixed and video cropped).
No.211
The chrome in my iPad Isnt Running ;-;
No.265
How do I include subtitles?
No.266
>>265In ffmpeg you can use the ass filter for hardsubs. There's supposed to be a way to do softsubs in WebM (it's called WebVTT), but I haven't gotten it working, and I'm not sure which browsers support it.
In
>>135 what I did was
[extract the fonts from the .mkv]
ffmpeg -dump_attachment:t "" -i "[Mazui]_Ore_No_Imouto_-_10v2_[9D348AB9].mkv"
[install fonts]
ffmpeg -ss 13:20 -i "[Mazui]_Ore_No_Imouto_-_10v2_[9D348AB9].mkv" -t 10 subs.ass
[edit subs.ass, subtract 0:13:25]
[transcode with hardsubs]
ffmpeg -ss 13:25 -i "[Mazui]_Ore_No_Imouto_-_10v2_[9D348AB9].mkv" -t 4.25 -vf colormatrix=bt709:bt601,ass=subs.ass -sn -qmin 10 -qmax 10 -q:a 5 "gaki no anime.webm"
I had some initial trouble getting the ass filter working properly on Windows. What worked for me was creating an [ffmpeg installation path]\bin\fonts\fonts.conf containing:
http://pastebin.com/xPCcEV5A No.269
>>266Sadly I couldn't get it to work.
I made the fonts.config. Extracted and installed the fonts.
I assume what you meant by 'Subtract' was re-time the subs, pic related.
I then used.
ffmpeg -ss 15:33 -i "Legend.of.the.Galactic.Heroes.039.[x264.720p.10bit.AAC].mkv" -t 21.46 -vf ass=subs.ass -sn -qmin 10 -qmax 10 -q:a 5 "alcholic.webm"
ffmpeg spits out an error and transcodes without including the subs.
>[parsed_ass_0 @ 00000000052e4c20] No usable fontconfig configuration file found, using fallback. No.279
Here's a quick way to retime the subs when cutting:
($sourcefile, $starttime and $duration should be substituted with the values you want)
# After extracting and installing the fonts with something like
sourcefile=`readlink -f "$sourcefile"` # $sourcefile needs to contain the full path for this
mkdir -p ~/.fonts/tmp
pushd ~/.fonts/tmp
ffmpeg -dump_attachment:t "" -i "$sourcefile"
popd
# and extracting the subs
ffmpeg -i "$sourcefile" subs.ass
# first create an intermediate version of the clip without subs (I'm assuming this is a BT.709 source, otherwise remove that filter)
ffmpeg -ss $starttime -i "$sourcefile" -t $duration -vf colormatrix=bt709:bt601 -c:v ffvhuff -c:a flac -sn clip.mkv
# and use -itsoffset to offset the timestamps in the intermediate clip so they match the subs:
ffmpeg -itsoffset $starttime -i clip.mkv -vf ass=subs.ass -qmin 10 -qmax 10 -q:a 5 clip.webm
# When you're done, you can delete the fonts you temporarily installed:
rm -r ~/.fonts/tmp
No.280
>>279And it might be a good idea to replace
ffmpeg -itsoffset $starttime -i clip.mkv -vf ass=subs.ass -qmin 10 -qmax 10 -q:a 5 clip.webm
with
ffmpeg -itsoffset $starttime -i clip.mkv -vf ass=subs.ass -c:v ffvhuff -c:a copy clip2.mkv
ffmpeg -i clip2.mkv -qmin 10 -qmax 10 -q:a 5 clip.webm
so that the timestamps in the final file start from zero.
No.281
>>280>ffmpeg -itsoffset $starttime -i clip.mkv -vf ass=subs.ass -c:v ffvhuff -c:a copy clip2.mkv>ffmpeg -i clip2.mkv -qmin 10 -qmax 10 -q:a 5 clip.webmFound a better way:
ffmpeg -itsoffset $starttime -i clip.mkv -vf ass=subs.ass,setpts=PTS-$starttime -qmin 10 -qmax 10 -q:a 5 clip.webm
No.365
is there a way to add a seperate audio track to a image or video if you wanted to? or is it limited to audio from video you are using?
No.366
>>365Maybe if you add a vocaroo.
Would be neat if you could play both at once.
No.369
>>365combine the video with the audio in windows movie maker.
also, I'm not too knowledgable bu I think you can combine multiple files with ffmpeg; if so you can just make the video with -an, and the audio with -vn, and combine the two.
No.375
>>351may i ask for source?
No.387
>>379Excellent, now this can finally be posted in "Your favorite OP/ED" threads.
No.431
>>430Do you have an extension that blocks videos from autoplaying? Or perhaps an old version of Firefox?
No.434
>>431Yes, I do have ClickToPlay enabled under about:config, but as I understand that only applies to Flash and other plugins. I'm not really sure.
No.443
Someone on /tv/ asked if this stuff works on 4chan. Answer is that it should work if you strip the sound. You need the option -an for that.
Be aware that if you're running up against the file size limit, it's best to set the bitrate (-b:v) to the value you want, rather than using -crf or the -qmin 10 -qmax 10 thing. You should also use two passes when you do it this way. So you'd do something like
ffmpeg -ss 3:00 -i source.mkv -t 20 -b:v 3*1024*1024*8/20*.975 -quality best -an -sn -pass 1 -c:v libvpx -f null -
ffmpeg -ss 3:00 -i source.mkv -t 20 -b:v 3*1024*1024*8/20*.975 -quality best -an -sn -pass 2 output.webm
No.453
>>172From what anime is this?
No.465
>>454If you want the smallest acceptable-quality file, you generally have to try a few different encoder settings.
But you are not going to get 5 minute long 1920x1080 resolution videos with like 2MB filesize without making the video look like shit.
No.478
>>363Anyone know where this is from?
No.482
WebM Gui 1.1
Now every retard is able to make WebMs in HQ.
You dont have to deal with the ugly commando line annymore.
WebM made with the gui!
https://sourceforge.net/projects/kennysoft/ No.486
>>482>>483Apparently recent versions of ffmpeg have started putting WebVTT subtitles in, which is causing issues with Firefox. Subtitles can be suppressed with the -sn option.
No.493
Can some one help me.
I have set the environmental variables:
FC_CONFIG_DIR=C:\Program Files\ffmpeg\fonts.conf
FC_CONFIG_FILE=C:\Program Files\ffmpeg\fonts.conf
FONTCONFIG_FILE=C:\Program Files\ffmpeg\fonts.conf
It worked once but now doesn't work. I keep get:
No usable fontconfig configuration file found, using fallback.
No.572
>>194i did these and these is my first webm ever
i make 2 one VP8 (q=10) + Vorbis and the other VP8 (q=20) + Vorbis
600kp
400kp
what you think
and how yo make loop
and can i make it with out audio
No.860
test
No.870
>>17>>128A note to anyone reading this in 2017: FFmpeg now supports a proper constant-quality mode with -crf 10 -b:v 0. This should replace the -qmin 10 -qmax 10 thing.
No.877
<s>asdasdad</s>
No.878
[spoiler]asdasdasd[/spoiler]
No.879
[spoiler] asdsadasd [/spoiler]