tried to post a vp8 webm clip and got:
> Error: File contains an invalid stream
there are no webm guidelines in the FAQ Sup Forums.org/faq
what are the correct specs for a Sup Forums webm?
tried to post a vp8 webm clip and got:
> Error: File contains an invalid stream
there are no webm guidelines in the FAQ Sup Forums.org/faq
what are the correct specs for a Sup Forums webm?
happens to me too, just re-encode it
here's what i used
> ffmpeg -i infile.mkv -ss 00:12:54 -t 7 -c:v libvpx -b:v 3.3M -an -vf scale=1280:720 outfile.webm
outfile.web is under 3MB
> re-encode it
using what settings?
>ffmpeg -i VID_20160522_151947.mp4 -ss 00:00:00 -t 7 -c:v libvpx -b:v 3.3M -an -vf scale=1280:720 outfile.webm
hmmm, i'm doing the exact same thing, except my source file is .mkv
here's the output of "ffmpeg -i" for my invalid webm:
Input #0, matroska,webm, from 'colbert_girl_kek.vp8.webm':
Metadata:
encoder : Lavf57.29.101
Duration: 00:00:08.08, start: 0.000000, bitrate: 2850 kb/s
Stream #0:0: Video: vp8, yuv420p, 1280x720, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 1k tbn, 1k tbc (default)
Stream #0:1(eng): Subtitle: webvtt
your file is:
Input #0, matroska,webm, from '1463956918525.webm':
Metadata:
encoder : Lavf56.40.101
Duration: 00:00:07.02, start: 0.000000, bitrate: 3362 kb/s
Stream #0:0: Video: vp8, yuv420p, 1280x720, SAR 1:1 DAR 16:9, 29.78 fps, 29.78 tbr, 1k tbn, 1k tbc (default)
is it the fps? does Sup Forums not support 60fps?
Has to be the fps.
changed the fps to 30 - still getting the same error
wtf?!
Webvtt subtitles aren't supported, use -sn to disable subtitles, then it'll be accepted.
Do -sn to make sure there's no subtitles stream.
If even that fails, do ffprobe on your source and -map out all the non video streams during the encode.
I didn't even notice he had that second stream derp.
Why do you put -ss after -i?
-sn worked! thank you!!
i wanted to grab a 7 second clip from a long video, starting at 00:12:54
> -ss 00:12:54 -t 7
You should put -ss before -i and -t/-to after both, its much faster.
...
But it really is way faster and recommended by ffmpeg documentation.
If you put in the -ss after the input file then ffmpeg will decode every single frame up until the time specified by -ss. That means that if you tried to cut 10 seconds from a movie 1 hour and 40 minutes after the start, ffmpeg will decode every single frame up until this point before encoding, which could take a long while (e.g. 30x realtime -> 2 minutes or so).
Putting -ss before the input file will seek to the nearest keyframe and only decode a couple of frames (should be no longer than a few tens of miliseconds).
But hey, don't take my word for it, test it. Get a movie and try taking the last 20 seconds, with both cases.
interesting, will try it.
what did you mean by "after both"?
you're right. thanks 4 pro tip!
$ time ffmpeg -i in.mkv -ss 00:12:54 -t 7 -sn -c:v libvpx -b:v 3.3M -an -vf scale=1280:720 out.webm
> real 2m12.565s
$ time ffmpeg -ss 00:12:54 -i in.mkv -t 7 -sn -c:v libvpx -b:v 3.3M -an -vf scale=1280:720 out.webm
> real 1m11.507s