Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Название темы: FFMPEG framerate very high
Показать сообщение отдельно

Ветеран


Сообщения: 2605
Благодарности: 247

Профиль | Отправить PM | Цитировать


более того, поиск по vsync/fps_mode дает описание именно переменной частоты кадров в ролике, что, как понимаю, телефоны сами не делают. Тем более, произвольно, то да, то не. Тем более, вплоть до диких величин фпс-а. Или ошибаюсь?
https://www.reddit.com/r/ffmpeg/comm.../?ref=readnext
Цитата:
-vsync was just renamed to -fps_mode, nothing about the behavior has changed.

If you want to convert a CFR stream to VFR, you need to drop superfluous frames somehow, using the mpdecimate filter, for example. That filter also lets you configure the maximum number of consecutive frames it'll drop.
https://superuser.com/questions/1513...le-with-ffmpeg

==========
интересное предложение еще в
https://superuser.com/questions/9082...with-a-maximum

Цитата:
You simply need to combine the -vsync 2 option with the -r $maxfps option, of course where you replace $maxfps with the maximum framerate you want! And it WORKS! It doesn't duplicate frames from a source file, but it will drop frames that cause the file to go over the maximum framerate!

By default it seems that -r $maxfps by itself just causes it to duplicate/drop frames to achieve a constant framerate, and -vsync 2 by itself causes it to pull the frames in directly without really affecting the PTS values.

I wasn't optimistic about this because I already knew that -r $maxfps puts it at a constant framerate. I honestly expected an error or for it to just obey whichever came first or last or whatever. The fact that it does exactly what I wanted makes me quite pleased with the FFMPEG developers.
Цитата:
actually you need to specify the framerate both for the input and output for that case. Something like: ffmpeg -f image2 -framerate 30 -i "input-%03d.png" -c:v libvpx-vp9 -r 30 output.webm Note: I haven't tested the above command, but it should be something like that. -framerate might need to be -r, but the documentation specifies that they used to be the same but that nowadays they aren't, and -framerate is to be preferred for inputs. It doesn't mention outputs, and I see different examples that use either for outputs. Also, the -f image2 might not be necessary.
решил начать видоизменять с малого, добавил опцию -r 30 перед названием output файла - внезапно сработало.
хз, насколько совпадение, насколько нет - но сработало.

Отправлено: 20:04, 09-07-2023 | #2

Название темы: FFMPEG framerate very high