I’d like to point out that this still has deficiencies compared to Vimeo or YouTube, who transcode the source file into multiple bitrates and adaptively serve an appropriate quality based on the viewer’s available bandwidth and screen size.
This manifests as buffering on slower connections, where YouTube or Vimeo would just downgrade the user to a lower bitrate transparently (or nearly transparently).
An end user today will expect that behavior and have very little tolerance for buffering if their connection is unable to smoothly play the one bitrate the creator published (no matter how fast the CDN is).
Edit: I’m aware that it’s possible to do adaptive bitrate streaming outside of using Vimeo or YouTube (as several commenters have explained below) however this isn’t what TFA describes and I think it’s important to note this deficiency in the author’s described approach to serving their own video.
I used MPEG-DASH to build a netflix-party clone when the pandemic started, mostly following this tutorial: https://www.isrv.pw/html5-live-streaming-with-mpeg-dash. It could easily be adapted to on-demand video streaming.
My solution was pretty janky, but it's an interesting problem space to explore.
video2hls looks awesome, thanks for sharing that! I usually use AWS MediaConvert[0] to do the conversion for me, but nice to see an open-source tool to easily do the same.
I can't think of a device that would support MPEG-DASH that wouldn't support HLS. What are some? HLS has been around for a decade.
I think you're thinking of certain DRM mechanisms. HLS with FairPlay wouldn't work on an Android device running Chrome, just as iOS Safari doesn't support Widevine. But for most of us, we don't need DRM.
Sorry, I didn't think we were talking about native support. I'm just so used to shipping something like videojs.
In any event, nothing natively supports MPEG-DASH. https://caniuse.com/#feat=mpeg-dash Though there is a disclaimer "DASH can be used with a JavaScript library in browsers that doesn't support it natively as long as they support Media Source Extensions." the same is true for HLS, without the requirement of MSEs.
Just want to point out all CDNs support HLS for on-demand assets. It’s just static http files. With HLS you just encode your file into multiple different nitrate files which are then split into small 5-10 second chunks and then wrapped in a text playlist for consumption. The protocol is still just static assets over http though.
Also of note: HLS supports byte range addressing, so you can create the various stream files as single .ts files rather than a collection of segments per stream. A client can use the Range HTTP header to select the window of bytes it wants for the stream/bandwidth slot it wants. This mode is supported from something like iOS 5 and up, and ffmpeg has flags to produce such streams.
If you want good cache hit ratios, you probably want to use segments as files rather than segments as byte ranges. Off the shelf http caching software tends to have filesize limits and may not cache large files in ram or even on disk if they're large enough, and may do unexpected things with range requests like request the whole file, then serve the range to the client. CDNs may be running totally custom http stacks or off the shelf stacks with tuned configs or somewhere in between, but if you intend to use one, it makes sense to build your content so it'll be easily cached.
Everyone is replying to you mentioning HLS, which (as your edit mentions) isn't described in the article.
Which is... a bit shocking. From the title of the article, I assumed the content would be related to hosting video. HLS was the first thing that came to mind and I assumed it'd be mentioned up top. I clicked to see if it listed any HTTP-related considerations I wasn't aware of in addition to HLS.
Turns out it's just an advertisement for a (very non-video-specific) CDN service, with some lines tacked on at the end telling you to use Handbrake (oddly, the cli, rather tham ffmpeg???)
It is a tutorial for stringing together a bunch of tools to transcode a video to multiple formats, upload it to S3, and pull that to a cheap CDN (that does get complimented heavily).
And it spawned a great discussion about self-hosting.
I wonder if that really what users expect? I hate auto-downgrading, I always set quality to the highest option and I'm happy to do other work while video is downloading and buffering.
If I'm watching a movie I probably want to quality to remain reasonably high, if I'm watching a Youtube video of people talking or something where visuals don't really matter I'll take 480p over buffering.
Youtube is pretty decent for that, you can either let it figure out what format to use, or force the resolution. That's a good compromise IMO.
I've pretty much switched over to youtube-dl for video viewing, as I find it to be superior to the web interface in most ways. I get the highest-quality file every time, instead of what their AI thinks I want. I can easily request audio-only or video-only. Download once, watch over and over without using more bandwidth each view. No suggested videos. No recommendations. No comments.
Adaptive delivery could easily be added by converting the files with a video encoding service. Transloadit’s community plan is free and should have enough traffic included for these use cases. Full disclose: I’m a transloadit founder
I hope you can enable doing the vice versa some day. I mean HLS/DASH to single file containers like MP4. It seems that you can't pull segments from remote URLs in M3U file for the time being.
> I’d like to point out that this still has deficiencies compared to Vimeo or YouTube, who transcode the source file into multiple bitrates
This may be generally true, but for any screencast (including the author's use cases), automatically downgrading to a lower quality video based on connection speed is a bug, not a feature.
>This manifests as buffering on slower connections, where YouTube or Vimeo would just downgrade the user to a lower bitrate transparently (or nearly transparently).
As a user, I _never_ want to watch shit quality content and _MUCH_ prefer buffering to it.
Back in the day, you could open a tab, hit pause, go back to whatever you are reading, and by the time you finish that article and maybe grab a cup of coffee, the video is fully loaded and you can watch at your leisure.
These days, all the websites are so smart that they realise that you are not on the tab and load nothing so even though the page is been open for 20-minutes, you still have the lovely privilege of sitting there staring at the throbber every so often, thanks to your work insisting on full VPN tunnelling.
> thanks to your work insisting on full VPN tunnelling
Do work in a VM on your main machine. That way you can have full VPN tunnelling in the VM but the host (and other VMs if you use them) use your normal direct connectivity.
Of course you might be breaking rules in a way that might invite discipline, if working in a highly regulated environment where so measures are essentially dictated by your work's clients, by taking technical measures to circumvent policy, so take care.
This can be easily solved by presenting an option set like "slow/fast/HD" to the user, then stream accordingly. Open source has always been about lots of choices anyway!
Just my anecdote, I'm annoying that non-live video service uses adaptive bitrate. I prefer waiting spinner or degrade quality manually than automatically downgrading to awful quality.
Maybe I don’t understand this, but unless something is encrypted, why does the downsampling have to happen at the source?
Alternatively, is there a way to encrypt something, such that you can apply a transform to the encrypted data to downsample it without knowing the contents of the file?
Isn't that just as ridiculous of a notion? A DEA agent shaking down an identify theft victim for Target gift cards, calling from a government phone? It's a hell of a yarn, no matter how you read it.
No? You're saying that someone shouldn't have believed that one kind of scam was happening, because only the other kind of scam is real. That's a much more subtle distinction than just "payment in gift cards is a scam". It also doesn't seem like a thing that can really be supported with definitive evidence or authoritative decree.
SEEKING WORK - SF Bay Area on-site (remote is fine too)
Generally available for freelance web app engineering work. I've been working with Rails and JS for ~10 years now, at all points up and down the stack. Everything from performance work on existing code to bringing up a full-fledged product from wireframes. I’ve also been doing some Swift lately.
In the past, I've worked with companies like CircleCI, Remind, Leap Motion, Anki, Rocket Fuel, and TaskRabbit. Before that, I had two startups of my own. In my spare time, I fly airplanes.
SEEKING WORK - SF Bay Area on-site (remote is fine too)
Generally available for freelance web app engineering work. I've been working with Rails and JS for ~10 years now, at all points up and down the stack. Everything from performance work on existing code to bringing up a full-fledged product from wireframes. I’ve also been doing some Swift lately.
In the past, I've worked with companies like CircleCI, Remind, Leap Motion, Anki, Rocket Fuel, and TaskRabbit. Before that, I had two startups of my own. In my spare time, I fly airplanes. Currently booked through the end of July, but I’m always happy to meet up for coffee and chat.
Generally available for freelance web app engineering work. I've been working with Rails and JS for ~9 years now, at all points up and down the stack. Everything from performance work on existing code to bringing up a full-fledged product from wireframes. I’ve also been doing some Swift lately.
In the past, I've worked with companies like CircleCI, Remind, Leap Motion, Anki, Rocket Fuel, and TaskRabbit. Before that, I had two startups of my own. In my spare time, I fly airplanes. Currently booked through Q1 2018, but I’m always happy to meet up for coffee and chat.
Generally available for freelance web app engineering work. I've been working with Rails and JS for ~9 years now, at all points up and down the stack. Everything from performance work on existing code to bringing up a full-fledged product from wireframes. I’ve also been doing some Swift lately.
In the past, I've worked with companies like CircleCI, Remind, Leap Motion, Anki, Rocket Fuel, and TaskRabbit. Before that, I had two startups of my own. In my spare time, I fly airplanes. Currently booked through the end of the year, but I’m always happy to meet up for coffee and chat.
However Boeing is also quite subsidized, just more indirectly through defense contracts. And what's more, Boeing doesn't even offer a competitive product. They don't sell any aircraft in this size range.
Boeing is subsidized in many ways, including defense contracts.
Boeing is the largest winner of state and local tax incentives valued in $13 billion. Most of these go to commercial aircraft manufacturing. DoD also awards defense contracts that intend to keep strategic commercial technologies within US (just like all large nations).
Boeing and Airbus have been involved in legal battle over subsidies over a decade. When WTO found that there was only $1 billion in illegal subsidies in 777X development and rest $8 billion were legal subsidies, Boeing was celebrating.
You have to be careful when you see claims of a company receiving $x in subsidies. There is often some questionable accounting which going into computing those numbers. For example, the $64 billion figure from the headline of the first article appears to be mostly from loan guarantees. Loan guarantees are definitely a form of subsidy, but computing their value is not trivial. You need to figure out what the rate would have been without government backing and compare that with what the actual rate was. Simply taking the notional value of the loan, as was done to get the $64 billion figure, vastly overstates the magnitude of the subsidy.
Yep. Every country with an advanced export industry has an Export-Import Bank. Small countries making capital purchases of hundreds of millions of dollars wouldn't be able to secure the financing, otherwise; at least, not at any reasonable rate. The fact that the U.S. Export-Import Bank has never had a net loss (at least, none of note AFAIK) is really all we need to know about how much of an unfair subsidy they're providing: none. IOW, they aren't guaranteeing transactions that aren't economically viable. It's just that, say, Ethiopia has zero chance of not getting gouged by major American or European banks. Among other things, big western banks don't have any appetite for dealing with the risk--currency exposure, foreign liquidation headaches. Even though ultimately they could recover their losses, it would ruin a few quarters of profits and throw their shareholders into fits.
When people argue that Boeing exports make up the bulk of the Export-Import Bank's financing, well, d'uh. For political reasons the bank likes to sell itself as supporting small business, but the fact of the matter is that the global banking industry is competitive enough to finance smaller purchases. The economic function of an Export-Import Bank is to improve the transactional efficiency at the very high-end of the market. More importantly, as an advanced economy the U.S. primarily exports advanced (i.e. extremely costly) capital goods.
Some national export-import banks are primarily in the business of funneling subsidies to domestic exporters. You can tell because they hide huge losses. But that's just not the case in the U.S., Canada, or most of Europe.
That's kind of like arguing that because housing prices have never(!) gone down (pre-2008), housing prices will never go down, and therefore underwriting any mortgage carries 0 risk. It's simply bad math.
I'm not saying it's 0 risk. My point was merely that given the absence of such losses--losses that similar banks (e.g. in China) regularly sustain to support blatant industrial subsidies--then it's a stretch to call it a subsidy given the loaded meaning of that word in both politics and international affairs.
Yes, technically it's a market intervention. But unless someone is prepared to say that the Export-Import Bank is creating a bubble in exports, driving more exports than is economically sustainable, then criticism of the Export-Import Bank is unwarranted. Some economists are prepared to say that. But I think most economists--the ones who aren't ideological radicals--would say that it's a complex question, admit that it's probably serving some useful economic function, and shrug their shoulders. And of course most other people in the industry would absolutely say that it serves useful and necessary function.
One of my teachers in high school was complaining about Boeing being exempt from Washington state sales tax for the sale of...airplanes. Is that a subsidy? I wouldn't count it as such.
For a company with international sales, sales tax (and VAT) should be handled in the district where the sale occurs, not where the product is manufactured. The big problem with the USA is that it doesn't have a VAT system in place to make it all work out equitably.
In effect maybe, but this isn't considered a subsidy on paper though... from my understanding the distinction is "giving" is a subsidy vs "not taking" is a tax break?
That's true, but beyond the jobs there is a legitimate issue of national security. If we're going to have a military at all then that implies we need a domestic aerospace industry capable of producing large aircraft. That capability has to be preserved as a strategic necessity regardless of cost.
Other countries do quite well military-wise, without having domestic aerospace industries. They just buy the planes from other countries that do have them.
Maybe not feasible on a scale such as the US military, but still.
The problem is that this gives other countries a big stick to beat you with, just by refusing to sell you more aircraft or spare parts or whatever. Iran is a case in point. Under the shah, Iran was a US ally, and purchased US aircraft. After the revolution, the US shifted its favour to Iraq and refused to sell spare parts and supplies for the aircraft, severely hampering the Iranian air force. This might not have been such a problem, but Iran was at war with Iraq at the time.
This sort of thing is why most countries are keen to manufacture as much of their military equipment domestically as possible.
Who don't? Governments certainly do. Food is commonly subsidised so that domestic production is maintained. Oil is commodity number one in governments exerting influence to control it. I'm not so sure on computer manufacturing.
Or if not subsidized, then subject to enough import restrictions that domestic producers survive. I'm a pretty hard-core free trader, but in this case I think some restrictions to ensure a local industry make sense. You shouldn't have to starve or freeze just because other countries close the border. Security comes before prosperity or you're partying on the Titanic.
What do you think why, if a German comoany such as Infineon or Aixtron plans to sell parts of their business to the Chinese, the US President gets a veto?
Because you do apply the same logic — it has to be produced by us or our closest allies — to all these industries.
Boing is one of the most subsidized companies in the world. Funny how they have even the courage to point this out against Airbus. This shows that to be a big company it is not enough to get government money, you need to be shameless.
Every news outlet I've read on this states that Boeing proposed used embraer jets to compete with the bombardier c series and has no directly competing aircraft.
In order to have a valid complaint, Boeing had to identify a "Domestic Like Product", which was indeed the 737-700 and 737 MAX 7, capable of carrying 126 and 138 passengers respectively, comparable to the C300's capacity. That part of it is true. The aspect in which boeing's product does not compete is that the 737 is a 50-year-old frame by now, whereas the C300 is a modern and technologically far advanced design. Needless to say, Boeing did not over-emphasise that point in their submission.
Boeing's complaint is actually factually correct and pretty much rock solid. BBD is indeed being subsidised via tax breaks and sweetheart loans from its various interested governments, and it did indeed sell the airframes to Delta at well below cost. The trouble is that Boeing does exactly the same thing all the time.
These kind of tactics are, regrettably, par for the course in competition between Boeing and Airbus. I think the main reason everyone is pissed off at Boeing is not only that the C300 is inarguably a profoundly superior product to Boeing's ageing cash cow, but they're employing their most ruthless "nuclear" legal tactics against a company so much smaller than them, in a friendly, neighbouring country, which is a customer to boot! At the very least, it's not very gentlemanly. It's pretty rich to shriek about "predatory behaviour" from a company a hundredth their size.
Your characterization that the 737 is a 50-year old airframe and wouldn't compete with the CS300 is entirely inaccurate.
Boeing just keeps the same model numbers for a series of aircraft, but through gradual evolution of sub-models the newest 737 MAX that exists today is an entirely different plane from the original 737-100 released in 1966.
Pretty much the only thing that's the same is that the fuselage is the same diameter. Everything else from length, height, wing span, passenger count & even how fast it cruises has changed over the years. It now has over twice the range that it did in 1966.
Secondly just because two aircraft aren't exactly the same size doesn't mean they aren't competing for the same market. As an example no airline sits down and decides they need a plane that carries exactly 150 passengers, and 180 would be out of the question.
Instead they look at the overall price, efficiency etc. Maybe they'll buy a smaller plane and run more flights per day, rather than a bigger plane with fewer flights.
You can trivially see this by looking at the multitude of airframes you can choose to fly with between pretty much any two major international airports.
> Your characterization that the 737 is a 50-year old airframe and wouldn't compete with the CS300 is entirely inaccurate.
Of course the 737 has been updated over the years but it's still fundamentally the same frame and has numerous drawbacks over newer models:
- it's aluminium, not composite, so is much heavier than the C300, meaning worse fuel efficiency per pax, and will have smaller windows, less comfortable cabin air pressure, etc
- it sits too low to the ground to carry the most efficent high-bypass turbofans - again less fuel efficient
- again because it's so low to the ground, the MAX 10 is so tail-heavy some (most?) airlines have passed on it in fear of tailstrikes and load restrictions at the gate
- still not fully fly by wire AFAIK
and the list goes on. You're right that it's been refreshed over the years but even boeing wants to replace it with a clean sheet design, just as the composite 787 has replaced the 767. Advancements have been made and eventually you just need a new frame.
Another factor in favour of the C300 is that it's optimised for its load capacity. The 737-7 (and a318/9 for that matter) are shrinks of their design and thus carry too much wing & superstructure for comparable loads. This again increases weight and reduces cost effectiveness.
Even the mass media has been saying that if the C300 gets a foothold into the US market that Boeing may be forced to invest in a clean sheet new frame to effectively compete, and they're right.
Sure, at the CS100 and CS300 sides Boeing doesn't have any competitive options. But if BBD succeeds into stretching the C-series into the CS500 that very directly competes with Boeing's bread and butter (the 737). The E2 can't be stretched that much. This is why they've gone after BBD and not Embraer.
It's not like the defense department would not be developing and buying jets if Boeing didn't exist. I don't really think of defense business as a subsidy. Though admittedly I'm sure there's plenty of grease money being spread around.
Defense spending isn't supposed to be a direct subsidy, but the DoD does sometimes blatantly choose one product instead of better competing products based on industrial concerns. E.g. that tanker buy where Airbus won the competition, but the DoD reversed it and leaked emails showed that it was done purely to benifit Boeing. Or that the US Army refused to allow the widespread introduction of a modern infantry rifle that isn't made by Colt, forcing the US Marines to designating their new rifle as a "light machine gun".
Every country does this, since having your own defense industry is a massive strategic boon and keeping those high-tech jobs are good for the economy. But it's definitely anti-competitive behavior and the respective defense companies do get a lot more taxpayer money for the capabilities the country gets than would be optimal.
Not always subsidy by itself, but DoD and NASA are used to subsidy Boeing and others. DOD and NASA transfer economic resources to the industry on terms more favorable than available on the market.