AVRational FFMPEG::to_sample_aspect_ratio(double aspect_ratio)
{
+#if 1
int height = 1000000, width = height * aspect_ratio;
float w, h;
MWindow::create_aspect_ratio(w, h, width, height);
return (AVRational){(int)w, (int)h};
+#else
+// square pixels
+ return (AVRational){1, 1};
+#endif
}
AVRational FFMPEG::to_time_base(int sample_rate)
break;
}
if( asset->ff_audio_bitrate > 0 ) {
+ ctx->bit_rate = asset->ff_audio_bitrate;
char arg[BCSTRLEN];
sprintf(arg, "%d", asset->ff_audio_bitrate);
av_dict_set(&sopts, "b", arg, 0);
break;
}
if( asset->ff_video_bitrate > 0 ) {
+ ctx->bit_rate = asset->ff_video_bitrate;
char arg[BCSTRLEN];
sprintf(arg, "%d", asset->ff_video_bitrate);
av_dict_set(&sopts, "b", arg, 0);