rewrite OggFromWebMWriter

* reduce the number of iterations over the output file (less seeking)
* fix audio samples with size of 255 do not handled correctly in the segment table (allows writing audio streams with 70kbps and 160kbps bitrate)
* add support for VORBIS codec metadata
* write packets based on the timestamp
This commit is contained in:
kapodamy 2019-09-25 16:24:52 -03:00
parent 773aa1eff0
commit dab53450c1
2 changed files with 203 additions and 149 deletions

View File

@ -11,7 +11,7 @@ import java.nio.ByteBuffer;
class OggFromWebmDemuxer extends Postprocessing {
OggFromWebmDemuxer() {
super(false, true, ALGORITHM_OGG_FROM_WEBM_DEMUXER);
super(true, true, ALGORITHM_OGG_FROM_WEBM_DEMUXER);
}
@Override
@ -24,7 +24,7 @@ class OggFromWebmDemuxer extends Postprocessing {
switch (buffer.getInt()) {
case 0x1a45dfa3:
return true;// webm
return true;// webm/mkv
case 0x4F676753:
return false;// ogg
}