Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Opus and video in one container? (Read 14197 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Opus and video in one container?

I was thinking of using Opus for means of using it as audio track for a audio/video file.

I'm not entirely sure which container I should use, or what containers I have to chose from. The only container that handles Opus well, is Ogg. I know MKV used to have some Opus support, but I heard it has been removed eventually, due to design incompatibilities.

Ogg limits the palette of video codecs quite severely, I was thinking of using VP8 or perhaps VP9, Ogg doesn't seem to be able to handle them. Experimenting with H.264 would be nice as well.

As I'm actually from a streaming media background, I was thinking about using it for streaming media as well. I don't want to limit myself by using HTML5 video streaming. Using Flash for streaming video playback still makes sense. I'm not sure which containers and video codecs I should use for that.

It may seem as a very niche approach, but the idea is to do some experimenting/testing here. It's not and may never be meant for any production solution.

 

Opus and video in one container?

Reply #1
You will probably have to wait till MKV support has been completed: http://matroska.org/news/opus_additions.html
It will eventually happen, because WEBMv2(based on MKV) will need to support VP9 with an Opus audio track.

Opus and video in one container?

Reply #2
It will eventually happen, because WEBMv2(based on MKV) will need to support VP9 with an Opus audio track.


Oooh, I didn't know WebMv2 was even under development. I was thinking WebM and WebP is pretty much a one-off thing.

Thanks for the insight. The only info I could find about WebMv2 is pretty old, though. It's mostly old discussions on Google groups. I hope this doesn't become vapor-ware.


Opus and video in one container?

Reply #4
Quote
Oooh, I didn't know WebMv2 was even under development. I was thinking WebM and WebP is pretty much a one-off thing.

It seems that it still will be called WebM not WebMv2 like I mentioned.

Opus and video in one container?

Reply #5
So, there is going to be a date or something when the standard procedure for creating WebM and WebP will be using VP9 instead of VP8 and Opus instead of Vorbis, respectively?

WebP is a VP8 intra-frame right now, it's going to be updated to a VP9 intra-frame, as I understand it.

It seems to be quite some time till the new WebM starts appearing in tools like ffmpeg. I wonder when I'll see the first Youtube videos encoded in VP9 with Opus.

Opus and video in one container?

Reply #6
* WebM is just a subset of Matroska, so the same shortcomings Matroska has with Opus apply to WebM.

* You can create VP9/Opus Matroska files today in ffmpeg. It's just Matroska can't handle Opus 100% correctly ATM (e.g. preskip, preroll). Discussions are taking place here to add elements that allow Matroska (specification-wise) to handle those requirements.

* You can do Opus A/V (live) streaming with RTP. It's a lossy network channel (UDP) which should work mostly okay unless you have a droppy connection.

Opus and video in one container?

Reply #7
Edit: some how this ended up in the wrong.


Opus and video in one container?

Reply #9
WebP is a VP8 intra-frame right now, it's going to be updated to a VP9 intra-frame, as I understand it.


The advances in VP9 aren't primarily at the still image level, so the Webp team have said they don't see an immediate benefit that outweighs the cost of the change. They've been busy adding animation, lossless, transparency and other non-VP8 features anyway so it's no longer strictly true that WebP is just a still frame of VP8.

Also of relevance to this thread, apparently the plan is to allow Opus paired with VP8 (and Vorbis with VP9) as well in WebM now, rather than have two strict generational pairings.

Opus and video in one container?

Reply #10
I wonder when I'll see the first Youtube videos encoded in VP9 ...

Close your eyes.

ok, now open it http://www.youtube.com/user/WebMVP9/videos 

You will need chromium canary or nightly build for that. And HTML5 should be enable http://www.youtube.com/html5


Did you test that?

Those videos were uploaded around the time Google I/O 2013 was held. Many bitstream changes took place since then before it was finalized.
VP9 was enabled by default in Chrome's dev channel after finalizing the bitstream and importing the latest VPx code.

Opus and video in one container?

Reply #11
I have HTML5 video enabled in Chrome and Firefox (Chrome dev-m and (Firefox) Nightly), but I'm not sure if Youtube hasn't re-encoded the VP9 video streams into something else.

The best test would be to have a WebM(VP9 + Opus) file and play that directly in the browser. I do something like that from time to time with audio files.

Speaking of Youtube, though. What about Flash? Will this kind of video files be supported in Flash as well? Or is Flash based video playback more or less put to rest for those codecs?

I'm gonna do a test or two with an MKV(VP9 + Opus) files when I get back home. I believe if FFmpeg cannot mux them, I should be able to do that with the Matroska tools (putting the video and audio stream into the MKV container).

Opus and video in one container?

Reply #12
I have HTML5 video enabled in Chrome and Firefox (Chrome dev-m and (Firefox) Nightly), but I'm not sure if Youtube hasn't re-encoded the VP9 video streams into something else.

There are actual VP9 videos in the WebMVP9 youtube channel. But they are not compatible with the final bitstream. They might be compatible with VP9-enabled Chrome 27. But I never tested that myself.

The VP9 files I analyzed in that youtube channel have no audio. Example mkvinfo output:
Code: [Select]
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ EBML maximum ID length: 4
|+ EBML maximum size length: 8
|+ Doc type: webm
|+ Doc type version: 2
|+ Doc type read version: 2
+ Segment, size 231956880
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 23)
|+ Segment information
| + Timecode scale: 1000000
| + Duration: 671.771s (00:11:11.771)
| + Muxing application: google
| + Writing application: google
|+ Segment tracks
| + A track
|  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
|  + Track UID: 1739287428
|  + Track type: video
|  + Codec ID: V_VP9
|  + Video track
|   + Pixel width: 1920
|   + Pixel height: 1080
|+ Cluster


Quote
Speaking of Youtube, though. What about Flash? Will this kind of video files be supported in Flash as well? Or is Flash based video playback more or less put to rest for those codecs?

That depends on what Adobe decides. My guess is that there will be no VP9 or Opus support anytime soon in flash.

Quote
I'm gonna do a test or two with an MKV(VP9 + Opus) files when I get back home. I believe if FFmpeg cannot mux them, I should be able to do that with the Matroska tools (putting the video and audio stream into the MKV container).

With a recent enough ffmpeg, and a VP9 enabled libvpx, you can create VP9+Opus mkv files:
Code: [Select]
ffmpeg -i infile.ext -c:v vp9 -strict -2 -c:a opus out.mkv

Opus and video in one container?

Reply #13
Did you test that?

Those videos were uploaded around the time Google I/O 2013 was held. Many bitstream changes took place since then before it was finalized.
VP9 was enabled by default in Chrome's dev channel after finalizing the bitstream and importing the latest VPx code.


Yes, those videos were encoded during May and the bitstream of VP9 was completed recently in this month. More likely  these Youtube videos are just a demonstration that VP9 is not a waporware.

There will be new versions those will make obsolete a previous release.  The difference between the first VP8 and later releases is a day and night. The MSU's video codec comparison  http://www.compression.ru/video/codec_comparison/h264_2011/ (pdf, page 134)

Opus and video in one container?

Reply #14
I wouldn't be totally shocked if Flash started supporting Opus, I believe they already use speex for example, and presumably Opus is a good fit for whatever usecase they were targetting with that. They did promise support for VP8 a long time ago, but it looks like that's not going to happen, so probably no VP9 either.

When you're watching Youtube in HTML5 mode you can use the right-click menu to get some details on the codecs etc. of the video you are watching. The option is called "stats for nerds". I'm not sure but I think that may have been updated to be more specific about the file being VP8+vorbis, I think it may have previously just said WebM, but got changed because now WebM alone isn't enough info to id the codecs.

It wouldn't surprise me if Youtube had started encoding videos in the finalised VP9 already (they claimed they'd be "adding the code" to Youtube last week), but I've no idea how you'd find them. Probably still at a ratio that makes needle in a haystack look like good odds.

Opus and video in one container?

Reply #15
Supporting Opus would make sense for Flash for streaming purposes. But It'll mostly depend on wider acceptance elsewhere, so Flash is going to have to be peer pressured into supporting it. Then again, we don't know how long Flash will last, Adobe might retire it before they start bothering putting new codecs into it.