Sorry I probably confused you a little bit. I was not suggesting removing anything. I tried to convince you that there is some issue with the bitrate calculation.
From your original comments: > This changes the printed values > ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -qscale 2 -vframes 3 -an > test2.avi > frame= 3 fps=0.0 q=2.0 Lsize= 51kB time=00:00:00.12 > bitrate=3495.7kbits/s speed= 12x > video:51kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB > muxing overhead: 11.128063% > vs. > frame= 3 fps=0.0 q=2.0 Lsize= 57kB time=00:00:00.12 > bitrate=3884.7kbits/s speed=11.2x > video:51kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB > muxing overhead: 11.128063% > the file is the same After my change: > frame= 3 fps=0.0 q=2.0 Lsize= 51kB time=00:00:00.12 > bitrate=3495.7kbits/s speed= 12x Before my change(master branch) > frame= 3 fps=0.0 q=2.0 Lsize= 57kB time=00:00:00.12 > bitrate=3884.7kbits/s speed=11.2x The size is different (51 vs 57) because I display the stream size instead of the total file size. I think stream size is more suitable in this context with "frame, fps, time". For bitrate, I use the stream size to calculate it and I think it's more accurate. On Thu, Jul 12, 2018 at 5:01 AM Michael Niedermayer <mich...@niedermayer.cc> wrote: > On Wed, Jul 11, 2018 at 03:47:45PM -0700, Wang Cao wrote: > > > > > > This changes the printed values > > > ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -qscale 2 -vframes 3 -an > > > test2.avi > > > frame= 3 fps=0.0 q=2.0 Lsize= 51kB time=00:00:00.12 > > > bitrate=3495.7kbits/s speed= 12x > > > video:51kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB > > > muxing overhead: 11.128063% > > > vs. > > > frame= 3 fps=0.0 q=2.0 Lsize= 57kB time=00:00:00.12 > > > bitrate=3884.7kbits/s speed=11.2x > > > video:51kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB > > > muxing overhead: 11.128063% > > > the file is the same > > > > > > Thanks for pointing this out! I have noticed the change in the stats but > I > > think the change is correct. Before my patch, the bitrate calculation is > > based on total_size as in > > > > > oc = output_files[0]->ctx; > > > total_size = avio_size(oc->pb); > > > > If I understand this correctly, the size of whole file will be used to > > calculate the bitrate which considers probably header overhead. > > > > I changed it to > > > > > total_size = ost->data_size; > > > > Therefore only the size of the stream under consideration will be used > for > > calculation. > > > > Please correct me if my understanding is wrong. Thanks! > > Do i understand correctly that you suggest to remove the display of the > filesize and file bitrate ? > And in its place would be a display of a randomly picked stream bitrate ? > > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > If you fake or manipulate statistics in a paper in physics you will never > get a job again. > If you fake or manipulate statistics in a paper in medicin you will get > a job for life at the pharma industry. > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > -- Wang Cao _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel