search for: nb_streams

Displaying 20 results from an estimated 32 matches for "nb_streams".

2016 Sep 07
2
[PATCH] Fix ambisonics bitrate when bitrate_bps is OPUS_AUTO
...src/opus_multistream_encoder.c index 30cafe1..c07132f 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -747,7 +747,8 @@ static void ambisonics_rate_allocation( if (st->bitrate_bps==OPUS_AUTO) { - total_rate = num_channels * (20000 + st->layout.nb_streams*(Fs+60*Fs/frame_size)); + total_rate = (st->layout.nb_coupled_streams + st->layout.nb_streams) * + (Fs+60*Fs/frame_size) + st->layout.nb_streams * 15000; } else if (st->bitrate_bps==OPUS_BITRATE_MAX) { total_rate = num_channels * 320000; -- 2.8.0.rc3.226.g39...
2014 Jun 04
4
opus_multistream_encode_float not working in libopus 1.1
On Wed, Jun 4, 2014 at 4:31 PM, Timothy B. Terriberry <tterribe at xiph.org> wrote: > Alpha Thinktink wrote: >> max_data_bytes=-11 > > That value is passed in by you. I also don't think passing such a value > would have worked in earlier releases. It indicates the size of the > buffer you are passing to the encoder to receive the encoded output. Actually, I'm
2018 Aug 30
0
[PATCH] Apply equal bit allocation to ambisonic channels
...tover_bits; - - /* Each nondirectional channel gets (rate_ratio_num / rate_ratio_den) times - * as many bits as all other ambisonics channels. - */ - const int rate_ratio_num = 4; - const int rate_ratio_den = 3; + opus_int32 per_stream_rate; + const int nb_channels = st->layout.nb_streams + st->layout.nb_coupled_streams; - /* The omnidirectional ambisonics and non-diegetic stereo channels */ - const int nb_nondirectional_channels = st->layout.nb_coupled_streams * 2 + 1; - /* The remaining ambisonics channels */ - const int nb_directional_channels = nb_channels - nb_non...
2017 Apr 10
2
[Patch] Non-diegetic support for channel mapping 254
...PUS_BAD_ARG. OPUS_UNIMPLEMENTED is used for things that may one day be implemented. Done. Also, many sure you catch all non-sensical values. For example, what if channels is set to 1000? Done. 3) From the draft, it seems like you can only have two nondiegetic channels, so instead of: + nb_streams = acn_channels + ((nondiegetic_channels / 2) % 2); + nb_coupled_streams = nondiegetic_channels / 2; Why not just have: + nb_streams = acn_channels + nondiegetic_channels; + nb_coupled_streams = nondiegetic_channels != 0; Done 4) About this change: - if (!validate_layout(&st...
2017 Apr 07
2
[Patch] Non-diegetic support for channel mapping 254
Hello all, Attached is a proposed patch for Opus that allows support for encoding non-diegetic stereo audio as a coupled stream for use with channel mapping 254. It also rejects channel counts that are not (n+1)^2 + 2j, where n is 0 to 14 and j is either 0 or 1 (See IETF public draft doc attached for clarification). Please let me know any suggestions / concerns / comments. Thank you for your
2019 Jul 11
2
Need help with streaming to Icecast
...return false; } } // Configure output video stream _pOutputStream = ffmpeg.avformat_new_stream(_pOutputFormatContext, null); AVStream* pInputVideoStream = null; for (var i = 0; i < _pInputFormatContext->nb_streams; i++) { if (_pInputFormatContext->streams[i]->codec->codec_type == AVMediaType.AVMEDIA_TYPE_VIDEO) { pInputVideoStream = _pInputFormatContext->streams[i]; } } _pOutputStream->avg_...
2018 Mar 19
3
[PATCH] Support for Ambisonics
Hi Drew, I think the libopusenc patch is better, but there's still a few issues left: 1) The static MAX_PACKET_BUFFER_SIZE value is still problematic because if you link libopusenc with a new version of libopus that supports higher order projection or just more projection channels for order 3, then you will overflow the buffer. I think what you'd want is a _ope_opus_header_get_size() call
2014 Jun 05
0
opus_multistream_encode_float not working in libopus 1.1
...t->bitrate_bps was set to -1000 to indicate Auto bitrate. I imagine Max bitrate (-1) has a slightly similar effect. then in the same c file line 846 curr_max = max_data_bytes - tot_size; curr_max becomes -2 as tot_size was 0. then line 848 curr_max -= IMAX(0,4*(st->layout.nb_streams-s-1)-1); cur_max becomes -13 as nb_streams was 4 and s was 0. then line 849 curr_max = IMIN(curr_max,MS_FRAME_TMP); which left curr_max at -13 The result at line 853 is opus_encode_native is called with parameters so thusly: (encoder state pointer, buf pointer, frame_size=960, tmp_data...
2014 Jun 21
1
opus_multistream_encode_float not working in libopus 1.1
...rate. I imagine Max bitrate (-1) has a slightly > similar effect. > > then in the same c file > line 846 > curr_max = max_data_bytes - tot_size; > > curr_max becomes -2 as tot_size was 0. > > then line 848 > > curr_max -= IMAX(0,4*(st->layout.nb_streams-s-1)-1); > > cur_max becomes -13 as nb_streams was 4 and s was 0. > > then line 849 > > curr_max = IMIN(curr_max,MS_FRAME_TMP); > > which left curr_max at -13 > > The result at line 853 is opus_encode_native is called with parameters > so thusly: > (...
2017 Apr 07
0
[Patch] Non-diegetic support for channel mapping 254
...ould just return OPUS_BAD_ARG. OPUS_UNIMPLEMENTED is used for things that may one day be implemented. Also, many sure you catch all non-sensical values. For example, what if channels is set to 1000? 3) From the draft, it seems like you can only have two nondiegetic channels, so instead of: + nb_streams = acn_channels + ((nondiegetic_channels / 2) % 2); + nb_coupled_streams = nondiegetic_channels / 2; Why not just have: + nb_streams = acn_channels + nondiegetic_channels; + nb_coupled_streams = nondiegetic_channels != 0; 4) About this change: - if (!validate_layout(&st->la...
2018 Mar 20
2
[PATCH] Support for Ambisonics
...libopusenc patch: + int _oge_use_projection(int channel_mapping); These functions are part of libopusenc, so I'd expect them to have an ope prefix like the other functions in the libopusenc library. + if (_oge_use_projection(h->channel_mapping)) + { + len=27+(h->channels*(h->nb_streams+h->nb_coupled)*2); + } + else + { + len=27+h->channels; + } The fixed part of the header is 19 bytes; where does the 27 come from here? +struct OpusGenericEncoder { + OpusMSEncoder *ms; +#ifdef OPUS_HAVE_OPUS_PROJECTION_H + OpusProjectionEncoder *pr; +#endif + int family; +}; op...
2017 Apr 24
0
[Patch] Non-diegetic support for channel mapping 254
...gt; Done. > > > Also, many sure you catch all non-sensical values. For example, what if > channels is set to 1000? > > > Done. > > > 3) From the draft, it seems like you can only have two nondiegetic > channels, so instead of: > + nb_streams = acn_channels + ((nondiegetic_channels / 2) % 2); > + nb_coupled_streams = nondiegetic_channels / 2; > > Why not just have: > + nb_streams = acn_channels + nondiegetic_channels; > + nb_coupled_streams = nondiegetic_channels != 0; > > Done >...
2019 Jul 11
1
Need help with streaming to Icecast
...// Configure output video stream > > _pOutputStream = > > ffmpeg.avformat_new_stream(_pOutputFormatContext, null); > > > > AVStream* pInputVideoStream = null; > > > > for (var i = 0; i < _pInputFormatContext->nb_streams; i++) > > { > > if > > (_pInputFormatContext->streams[i]->codec->codec_type == > > AVMediaType.AVMEDIA_TYPE_VIDEO) > > { > > pInputVideoStream = > > _pInputFormatContext->streams[i]...
2017 Apr 25
2
[Patch] Non-diegetic support for channel mapping 254
...re you catch all non-sensical values. For example, what > if > > channels is set to 1000? > > > > > > Done. > > > > > > 3) From the draft, it seems like you can only have two nondiegetic > > channels, so instead of: > > + nb_streams = acn_channels + ((nondiegetic_channels / 2) % 2); > > + nb_coupled_streams = nondiegetic_channels / 2; > > > > Why not just have: > > + nb_streams = acn_channels + nondiegetic_channels; > > + nb_coupled_streams = nondiegetic_channels !=...
2019 Jul 11
0
Need help with streaming to Icecast
...} > } > > // Configure output video stream > _pOutputStream = > ffmpeg.avformat_new_stream(_pOutputFormatContext, null); > > AVStream* pInputVideoStream = null; > > for (var i = 0; i < _pInputFormatContext->nb_streams; i++) > { > if > (_pInputFormatContext->streams[i]->codec->codec_type == > AVMediaType.AVMEDIA_TYPE_VIDEO) > { > pInputVideoStream = > _pInputFormatContext->streams[i]; > } >...
2016 Apr 26
2
opus-tools: Fix potential uninitialized access for set-ctl-int
Here is a simple patch to fix a bug in opusenc's set-ctl-int code -- Thanks, Michael Graczyk -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Fix-potential-uninitialized-access-for-set-ctl-int.patch Type: text/x-patch Size: 992 bytes Desc: not available URL: <http://lists.xiph.org/pipermail/opus/attachments/20160425/22994ffa/attachment.bin>
2004 Dec 16
0
[patch] ffmpeg2theora A/V sync
...0.0; + double v_pts_in = 0.0; + double a_pts_out = 0.0; + double v_pts_delta = 0.0; + double v_pts_delta_new = 0.0; + double a_pts_delta = 0.0; + double framesync = 0.0; + const double v_pts_smoothness = 8; + const double framesync_thresh = 0.6; + int j; + for (i = 0; i < this->context->nb_streams; i++){ AVCodecContext *enc = &this->context->streams[i]->codec; switch (enc->codec_type){ @@ -520,14 +532,46 @@ len -= len1; } first=0; + + /* 20041216/DK Check and correct A/V sync */ + v_pts_in = (double)pkt.pts / AV_TIME_BASE; + v_pts_delta_n...
2004 Nov 20
0
ffmpeg2theora start and end time support - patch
...his->start_time=0; + this->end_time=0; /* ZERO denotes no end time set */ } return this; } @@ -142,7 +146,7 @@ AVCodec *acodec = NULL; AVCodec *vcodec = NULL; float frame_aspect; - + int frame_number=0; double fps = 0.0; for (i = 0; i < this->context->nb_streams; i++){ @@ -426,9 +430,23 @@ info.vorbis_quality = this->audio_quality; info.vorbis_bitrate = this->audio_bitrate; theoraframes_init (&info); - + /*seek to start time*/ + av_seek_frame( this->context, -1, (int64_t)AV_TIME_BASE*this->start_time, 1); + /*check for end tim...
2004 Dec 19
0
[patch] more ffmpeg2theora improvements
..._pts_delta_new = 0.0; + double a_pts_delta = 0.0; + double framesync = 0.0; + double was_framesync = 0.0; + int frameadjust = 0; + const double v_pts_smoothness = 8; + double max_good_framesync_change = 0.5; + const double framesync_thresh = 0.6; + int j; + for (i = 0; i < this->context->nb_streams; i++){ AVCodecContext *enc = &this->context->streams[i]->codec; switch (enc->codec_type){ @@ -414,16 +436,18 @@ info.ti.dropframes_p = 0; info.ti.quick_p = 1; info.ti.keyframe_auto_p = 1; - info.ti.keyframe_frequency = 64; - info.ti.keyframe_frequency_force = 6...
2015 Oct 08
2
[PATCH 0/1] opusenc support for WavPack input
This patch to opus-tools adds optional support to WavPack lossless format as input to opusenc. Like support to FLAC, it depends on an external library, libwavpack, and may be disabled on configure. Lucas Clemente Vella (1): Reading input from WavPack files. Makefile.am | 7 +- configure.ac | 37 ++++++++ src/audio-in.c | 71 ++++++++------- src/opusenc.c | 19 +++- src/opusenc.h