Skip to content

Commit 4edc13f

Browse files
authored
temporary logging
1 parent fa897f4 commit 4edc13f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/audio_mixer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ namespace ffmpeg {
144144

145145
void AudioMixer::mixVideoRaw(std::filesystem::path videoFile, const std::vector<float>& raw, std::filesystem::path outputMp4File, uint32_t sampleRate) {
146146
const int frameSize = 1024;
147+
148+
geode::log::debug("raw size {}", raw.size());
147149

148150
AVFormatContext* videoFormatContext = nullptr;
149151
if (avformat_open_input(&videoFormatContext, videoFile.string().c_str(), nullptr, nullptr) < 0) {
@@ -241,6 +243,8 @@ namespace ffmpeg {
241243
return;
242244
}
243245

246+
geode::log::debug("1 timebase {} {}", videoFormatContext->streams[videoStreamIndex]->time_base, outputVideoStream->time_base);
247+
244248
AVPacket packet;
245249
while (true) {
246250
if (av_read_frame(videoFormatContext, &packet) >= 0) {
@@ -292,6 +296,8 @@ namespace ffmpeg {
292296
audioPacket.data = nullptr;
293297
audioPacket.size = 0;
294298

299+
geode::log::debug("2 timebase {} {}", audio_codec_context_encoder->time_base, outputAudioStream->time_base);
300+
295301
while (true) {
296302
int ret = avcodec_receive_packet(audio_codec_context_encoder, &audioPacket);
297303
if (ret == 0) {

0 commit comments

Comments
 (0)