* Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/sync_queue: use timebase from input frames/packets [not found] <20230409135009.BE4F3410865@natalya.videolan.org> @ 2023-04-10 19:01 ` Michael Niedermayer 2023-04-12 8:06 ` Anton Khirnov 0 siblings, 1 reply; 5+ messages in thread From: Michael Niedermayer @ 2023-04-10 19:01 UTC (permalink / raw) To: ffmpeg-devel [-- Attachment #1.1: Type: text/plain, Size: 1334 bytes --] On Sun, Apr 09, 2023 at 01:50:08PM +0000, Anton Khirnov wrote: > ffmpeg | branch: master | Anton Khirnov <anton@khirnov.net> | Tue Mar 21 12:36:03 2023 +0100| [090950f8327c01b1775615b1da723dc6cc8a30a0] | committer: Anton Khirnov > > fftools/sync_queue: use timebase from input frames/packets > > They are always properly set now. Avoid a separate timebase-setting > call, which duplicates the knowledge of the timebase being used. This looses bitrate information in some cases ./ffmpeg -analyzeduration 1M -y -i ~/videos/mm-short.mpg -vcodec copy -aspect 16:9 -vframes 3 tmp.avi ./ffprobe tmp.avi Stream #0:0: Video: mpeg2video (Main) (mpg2 / 0x3267706D), yuv420p(tv, bt470bg/bt470m/bt470m, bottom first), 720x576 [SAR 16:15 DAR 4:3], 8061 kb/s, SAR 64:45 DAR 16:9, 50 fps, 50 tbr, 50 tbn vs. Stream #0:0: Video: mpeg2video (Main) (mpg2 / 0x3267706D), yuv420p(tv, bt470bg/bt470m/bt470m, bottom first), 720x576 [SAR 16:15 DAR 4:3], SAR 64:45 DAR 16:9, 50 fps, 50 tbr, 50 tbn [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 1 "Used only once" - "Some unspecified defect prevented a second use" "In good condition" - "Can be repaird by experienced expert" "As is" - "You wouldnt want it even if you were payed for it, if you knew ..." [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/sync_queue: use timebase from input frames/packets 2023-04-10 19:01 ` [FFmpeg-devel] [FFmpeg-cvslog] fftools/sync_queue: use timebase from input frames/packets Michael Niedermayer @ 2023-04-12 8:06 ` Anton Khirnov 2023-04-12 8:41 ` Michael Niedermayer 0 siblings, 1 reply; 5+ messages in thread From: Anton Khirnov @ 2023-04-12 8:06 UTC (permalink / raw) To: FFmpeg development discussions and patches Quoting Michael Niedermayer (2023-04-10 21:01:40) > On Sun, Apr 09, 2023 at 01:50:08PM +0000, Anton Khirnov wrote: > > ffmpeg | branch: master | Anton Khirnov <anton@khirnov.net> | Tue Mar 21 12:36:03 2023 +0100| [090950f8327c01b1775615b1da723dc6cc8a30a0] | committer: Anton Khirnov > > > > fftools/sync_queue: use timebase from input frames/packets > > > > They are always properly set now. Avoid a separate timebase-setting > > call, which duplicates the knowledge of the timebase being used. > > This looses bitrate information in some cases > > ./ffmpeg -analyzeduration 1M -y -i ~/videos/mm-short.mpg -vcodec copy -aspect 16:9 -vframes 3 tmp.avi Cannot reproduce with a random mpeg file. Where can I find this sample? -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/sync_queue: use timebase from input frames/packets 2023-04-12 8:06 ` Anton Khirnov @ 2023-04-12 8:41 ` Michael Niedermayer 2023-04-12 8:44 ` Michael Niedermayer 2023-04-12 10:26 ` Anton Khirnov 0 siblings, 2 replies; 5+ messages in thread From: Michael Niedermayer @ 2023-04-12 8:41 UTC (permalink / raw) To: FFmpeg development discussions and patches [-- Attachment #1.1: Type: text/plain, Size: 1268 bytes --] On Wed, Apr 12, 2023 at 10:06:19AM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2023-04-10 21:01:40) > > On Sun, Apr 09, 2023 at 01:50:08PM +0000, Anton Khirnov wrote: > > > ffmpeg | branch: master | Anton Khirnov <anton@khirnov.net> | Tue Mar 21 12:36:03 2023 +0100| [090950f8327c01b1775615b1da723dc6cc8a30a0] | committer: Anton Khirnov > > > > > > fftools/sync_queue: use timebase from input frames/packets > > > > > > They are always properly set now. Avoid a separate timebase-setting > > > call, which duplicates the knowledge of the timebase being used. > > > > This looses bitrate information in some cases > > > > ./ffmpeg -analyzeduration 1M -y -i ~/videos/mm-short.mpg -vcodec copy -aspect 16:9 -vframes 3 tmp.avi > > Cannot reproduce with a random mpeg file. Where can I find this sample? sorry, its here: https://samples.ffmpeg.org/MPEG2/mm-short.mpg [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt. [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/sync_queue: use timebase from input frames/packets 2023-04-12 8:41 ` Michael Niedermayer @ 2023-04-12 8:44 ` Michael Niedermayer 2023-04-12 10:26 ` Anton Khirnov 1 sibling, 0 replies; 5+ messages in thread From: Michael Niedermayer @ 2023-04-12 8:44 UTC (permalink / raw) To: FFmpeg development discussions and patches [-- Attachment #1.1: Type: text/plain, Size: 1397 bytes --] On Wed, Apr 12, 2023 at 10:41:50AM +0200, Michael Niedermayer wrote: > On Wed, Apr 12, 2023 at 10:06:19AM +0200, Anton Khirnov wrote: > > Quoting Michael Niedermayer (2023-04-10 21:01:40) > > > On Sun, Apr 09, 2023 at 01:50:08PM +0000, Anton Khirnov wrote: > > > > ffmpeg | branch: master | Anton Khirnov <anton@khirnov.net> | Tue Mar 21 12:36:03 2023 +0100| [090950f8327c01b1775615b1da723dc6cc8a30a0] | committer: Anton Khirnov > > > > > > > > fftools/sync_queue: use timebase from input frames/packets > > > > > > > > They are always properly set now. Avoid a separate timebase-setting > > > > call, which duplicates the knowledge of the timebase being used. > > > > > > This looses bitrate information in some cases > > > > > > ./ffmpeg -analyzeduration 1M -y -i ~/videos/mm-short.mpg -vcodec copy -aspect 16:9 -vframes 3 tmp.avi > > > > Cannot reproduce with a random mpeg file. Where can I find this sample? > > sorry, its here: > https://samples.ffmpeg.org/MPEG2/mm-short.mpg btw in case anyone wonders, this is just the first 2MB of matrixbench cmp matrixbench_mpeg2.mpg mm-short.mpg cmp: EOF on mm-short.mpg after byte 2048000, in line 9048 thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Elect your leaders based on what they did after the last election, not based on what they say before an election. [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/sync_queue: use timebase from input frames/packets 2023-04-12 8:41 ` Michael Niedermayer 2023-04-12 8:44 ` Michael Niedermayer @ 2023-04-12 10:26 ` Anton Khirnov 1 sibling, 0 replies; 5+ messages in thread From: Anton Khirnov @ 2023-04-12 10:26 UTC (permalink / raw) To: FFmpeg development discussions and patches After some investigation, it seems that before this patch there was a bug in the sync queue setup code that caused a wrong timebase to be used for the audio stream. Because of that, many more audio frames were output than should have been (116 frames/133632 samples/2.8 seconds). After the patch, the correct timebase is used and only 9 audio frames (10368 samples, 0.216 seconds) are encoded. This is much closer to the 3 video frames requested in your commandline and thus more correct. As a result, the file is now much smaller and the if (lensum*9/10 > maxpos || lensum < maxpos*9/10) check currently on line 476 of avidec.c triggers and stops bitrate calculation. I cannot say whether that check is faulty, but this patch seems like it's doing what it should. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-12 10:26 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20230409135009.BE4F3410865@natalya.videolan.org> 2023-04-10 19:01 ` [FFmpeg-devel] [FFmpeg-cvslog] fftools/sync_queue: use timebase from input frames/packets Michael Niedermayer 2023-04-12 8:06 ` Anton Khirnov 2023-04-12 8:41 ` Michael Niedermayer 2023-04-12 8:44 ` Michael Niedermayer 2023-04-12 10:26 ` Anton Khirnov
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git