[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
I am making an FFMPEG command automator (where you enter inf
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /wsr/ - Worksafe Requests

Thread replies: 16
Thread images: 1
I am making an FFMPEG command automator (where you enter info and it will give you the command to run).
>pic related, is of the web app

I would also like to have it automatically use the correct codecs based on the output file's container.

For example
>output file ".webm"
>codec for video "VP8"
>codec for audio "vorbis"

But the only issue with this is I can't find any documentation of what codec goes with what container. The most I found is this wikipedia page

https://en.wikipedia.org/wiki/Video_file_format

But I don't trust it because
>QuickTime File Format
>Many
>others
and the citation doesn't give shit.

Any of you know where I can find a list of video containers and the codecs for them?
>>
>>124601
What do you mean the citation doesn't give shit?
>QTV_Apple, QuickTime Video, Apple Codec
>QTV_Cinepak, QuickTime Video, Cinepak Codec
>QTV_DV, QuickTime Video, DV Digital Video
>QTV_MPEG, QuickTime Video, MPEG Codec
>QTV_MJPEG, QuickTime Video, Motion JPEG Codec
>QTV_MP4_V, QuickTime Video, MPEG-4 Visual Coding
>QTV_MP4_AVC, QuickTime Video, MPEG-4 Advanced Video Coding
>QTV_Sorenson, QuickTime Video, Sorenson Codec
>QTV_SWF, QuickTime Video with SWF Flash
>QT_210, QuickTime File Format with V210 Video Encoding. Uncompressed 10-bit 4:2:2 Picture.
>QT_UYVY, QuickTime File Format with UYVY (2vuy) Video Encoding. Uncompressed 8-bit 4:2:2 Picture.
>QT_YUY2, QuickTime File Format with YUY2 (yuv2) Video Encoding. Uncompressed 8-bit 4:2:2 Picture.
>QTV_AppleProRes422, QuickTime Video, Apple ProRes 422 Codec Family

Here's another list
https://en.wikipedia.org/wiki/Comparison_of_video_container_formats

Would you really ever use anything besides webm and mp4?

You should probably start with all video encoders supported by ffmpeg and then figure out the container you want to relate to each.
https://ffmpeg.org/ffmpeg-codecs.html#Video-Encoders

And good luck figuring out the proper options for making good encodes with each one.
>>
why?

ffmpeg does that automatically

if the output ends in .webm and no codecs are specified, ffmpeg will automatically pick vp8 and vorbis. you don't need to set defaults on your own. you'd only need to specified if you wanted vp9 or opus.

if you really needed the info: why not look at the ffmpeg documentation or code? obviously the defaults must be specified somewhere.

>>124688
>Would you really ever use anything besides webm and mp4?
who the fuck uses mp4 when mkv is available?
also, not sure if op wants to cover that, but i often use ffmpeg to transcode or edit audio files, so there's a bunch more relevant containers (mp3, m4a, flac, ogg, opus, etc).
>>
>>125083
>ffmpeg does that automatically
I didn't know that, last time I tried it gave me an error so I haven't tried again

now it works

I'm fucking retarded
>>
>>125083
>who the fuck uses mp4 when mkv is available?
YouTube.
Netflix.
The HTML5 video tag.
Every mobile phone in the entire world.
Every DVD and Bluray player in the entire world.
Every console.
Every web browser.

In short, absolutely everything that plays video and isn't a pirate's PC.

MKV is just a container. It doesn't mandate codecs, and it doesn't have a conformance suite, so you can't encode a video once to one standard and know it will play on anything that says "MKV" on it.
>>
>>125122
>The HTML5 video tag
>Every web browser
not anymore, mp4 is being heavily deprecated by both Chrome and Firefox due to the cost/royalties. They still support it currently because there are too many sites that haven't switched to webm yet, and it would hurt those sites heavily, but they are planning on removing mp4 completely in favor of webm.
>>
>>125141
Yeah, good luck with that.

They just need to wait for every discrete video decoder in every device in the world to be replaced with one that supports their standard, even though all the companies that make video-decoders are key stakeholders in MPEG-LA.

Not to mention Apple and Microsoft.

I predict about as much success as DAB radio.
>>
>>125122
>isn't a pirate's PC.

if we disregard piracy - what videos are we even talking about? Netflix doesn't allow up- or downloading. DVDs and Blurays come with video already on them and you're not allowed to copy or rip them. YouTube doesn't allow downloading and I've found conflicting information whether they allow mkv upload (which is more than i expexted - if they don't, that's fucking retarded).

so - what videos did you have in mind that are not piracy related but you still end up transcoding them, allowing you to choose between mp4 and mkv? and stuff you've recorded and edited yourself you don't want to playback in browsers or on consoles anyway, so i fail to see your argument. mkv is still superior as an archive format and should be the number 1 choice inside and outside of piracy.

just like 5 years ago people frowned upon avi, because it wasn't the late 90s anymore, you should now frown upon mp4. it's a pretty bad container and proprietory. have you ever looked into mp4 subtitles? they have a proprietary fucking subtitle format that's outright horrible. dedicated video playback devices (especially with physical media) will die out very soon. and any computer (including consoles) should be able to handle mkv. the bloody format is free! the implementation in ffmpeg libs is free. it's already in 80% of software that deal with codecs. now stick it into the remaining 20% and we can be done with this shit.

also, let's not forget that webm is just a gimped mkv. it's a step in the right direction, although not going all the way.
>>
>>125159
>YouTube doesn't allow downloading
Have you heard of YouTube Red? pay $10 a month and get
-ad free videos
-play video in background of your phone
-download videos
-google play music

>you should now frown upon mp4. it's a pretty bad container
very true, but it's also the most common
Similarly, IE is objectively the worst browser, but is the most common, so developers have to code for IE.
>>
>>125083
>who the fuck uses mp4 when mkv is available?
>>125159
>so - what videos did you have in mind that are not piracy related but you still end up transcoding them, allowing you to choose between mp4 and mkv?

If you have a website and you want to serve html5 videos for all browsers, you need to have a webm and an mp4 available. If, for any reason, you can only have one of them, it should be the mp4, since apple products, IE and chrome play them natively and, for most systems, firefox plays them as well.

Analogously, one might ask, why is OP using vp8+vorbis when vp9+opus is available? Clearly because he wants to post his videos to 4chan, which only accepts vp8+vorbis. Sometimes you can't choose the best format if you want other people to watch your videos.
>>
>>125141
That sounds like replacing mp3 with opus holy fucking lel
>>
>>125297
kek yeah but webm is free for Google/Mozilla, while mp4 costs a lot

http://www.zdnet.com/article/a-closer-look-at-the-costs-and-fine-print-of-h-264-licenses/
>...no royalty for the first 100,000 units...sublicensees pay 20 cents per unit up to 5 million and 10 cents per unit above 5 million. ...The maximum annual...cap...[is] $6.5 million per year...
>Although the license agreement uses the word sold, the royalties have to be paid even on software that is given away.

http://expandedramblings.com/index.php/google-app-statistics/
>1B users as of 5/28/15

With this info, Google would pay $100.48M/year if it weren't for the $6.5M/year cap

So Google removing MP4 support on Chrome saves the company $6.5M/year
>>
>>125416
On Windows it uses the decoder (and patent license) included with Windows.
>>
>>124601
>But the only issue with this is I can't find any documentation of what codec goes with what container
You need to look at the documentation for what stream types are supported by the muxer / for each container. FFmpeg implements a specification (in most cases), they don't define it. Look to the container specifications / project sites (or in the muxer source code) to see what's acceptable. To see what muxers / demuxers are available in your build, use ffmpeg -formats.

>>125083
>if the output ends in .webm and no codecs are specified, ffmpeg will automatically pick vp8 and vorbis.
Not true, FFMPEG's default for webm is now VP9 and OPUS.

>obviously the defaults must be specified somewhere
You can also look at the default for any muxer by running: ffmpeg -help muxer=MUXER_NAME

>>125122
>it doesn't have a conformance suite, so you can't encode a video once to one standard and know it will play on anything that says "MKV" on it.
That's absolutely not true. The Matroska project has very clear definitions for their specifications.

>different containers
Different containers had different uses cases in mind when they were designed. Take a look at mpeg-ts for example, it's vastly different from containers that are meant to be accessed as a local file. mpeg-ts has communication streams, error correction (non-retransmit), and stream synchronization tracking; in it's design it's meant to be transmitted over an unreliable medium (network). eg
>Each stream is chopped into (at most) 188-byte sections and interleaved together; because of the tiny packet size, streams can be interleaved with less latency and greater error resilience compared to program streams and common containers such as AVI, MOV/MP4, and MKV, which generally wrap each frame into one packet.
This adds processing (not relevant anymore) and data overhead though, which provides you with zero benefit if it's a local file, or on a reliable / fast network / big buffer.

cont.
>>
>>125865
cont.

>>125141
>>125416
>deprecated by both Chrome and Firefox due to the cost/royalties
There aren't any for h.264 decoders for them; Cisco gave them a licensed open implementation. webm may succeed in the long run, but not with VP8, it's garbage compared to h.264.

Oh, I know, what about VP9, right? VP9 is great, at least as good as h.264 (most of the time), but not only is it not in place on devices (that will never receive another update), but it's ABI isn't stable (the 1.5 release broke compatibility with 1.4). However, the biggest issue still remains: the massive processing overhead for decoding VP9 video streams. Moderate to high framefrate HD (full HD, qHD, uHD) content can't be decoded quickly enough on anything but a powerful laptop / desktop computer. You would be SOL on phones, tablets, small devices, TVs, older consoles, anything aside from powerful computers that are also using the FFmpeg decoder (FFVP9, standard in Firefox) which is currently 100% necessary as it beats the Google reference decoder by up to 100% in decode speed (libvpx-vp9 decoder doesn't do meaningful multithreading).

>>125194
>Similarly, IE is objectively the worst browser, but is the most common, so developers have to code for IE.
Not any more, as of a few months ago IE is no longer the most popular browser.

>>125297
>That sounds like replacing mp3 with opus holy fucking lel
Similar, given that opus is a much better audio codec, but isn't supported by devices, which is why mp3 refuses to die.
>>
>>125874
>Not any more, as of a few months ago IE is no longer the most popular browser.
Holy shit finally
Thread replies: 16
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.