News:

--

Main Menu

bug last frame

Started by scscorpin, June 21, 2024, 11:12:55 AM

Previous topic - Next topic

scscorpin

нашёл баг:
  • если вставить видео с fps=1, то при нажатии кнопки end на клавиатуре каретка установится перед крайним кадром, то есть хорошо видно на таймлайне, что крайний кадр невозможно выделить такими методами как, покадровое перемещение или нажатие кнопки end на клавиатуре, поэтому, когда вставляешь фрагмент в конец видео, то он вставляется перед крайним кадром,
  • Я думаю необходимо сделать возможность перемещения каретки в конец за пределы видео и показывать там чёрный кадр
казус:
  • можно поставить метку А и, таким образом метка B установится в конец видео, но это непозволит переместить каретку в конец видео нажатием кнопки PgDn на клавиатуре ;)

found a bug:
  • if you insert a video with fps=1, then when you press the end button on the keyboard, the carriage will be placed before the last frame, that is, it is clearly visible on the timeline that the last frame cannot be selected by such methods as frame-by-frame movement or pressing the end button on the keyboard, therefore, when you insert a fragment at the end of the video, it is inserted before the last frame,
  • I think it is necessary to make it possible to move the carriage to the end beyond the video and show a black frame there
case:
  • you can put mark A and, thus, mark B will be placed at the end of the video, but this will not allow you to move the carriage to the end of the video by pressing the PgDn button on the keyboard ;)

eumagga0x2a

Quote from: scscorpin on June 21, 2024, 11:12:55 AMI think it is necessary to make it possible to move the carriage to the end beyond the video and show a black frame there

This would constitute a bug for me. The default position of the B marker is the full video duration, i.e. the end point of the duration of the last frame. This is mathematically correct.

scscorpin

Quote from: eumagga0x2a on June 21, 2024, 02:26:45 PM
Quote from: scscorpin on June 21, 2024, 11:12:55 AMI think it is necessary to make it possible to move the carriage to the end beyond the video and show a black frame there

This would constitute a bug for me. The default position of the B marker is the full video duration, i.e. the end point of the duration of the last frame. This is mathematically correct.


в предыдущем сообщении Я ошибся, то есть то, что Я написал происходит редко, но происходит и это сложно повторить в новом проекте
очевидно баг вообще в другом, или это не баг, а дело в том, что алгоритм перевыкручен и, его необходимо как-нибудь правильно докрутить, чтобы можно было вставлять произвольно выделенные фрагменты из видео в конец видео, то есть, и после, и перед крайним кадром

in the previous message I was mistaken, that is, what I wrote happens rarely, but it happens and it is difficult to repeat in a new project
obviously a bug in something else, or it is not a bug, but the fact is that the algorithm is over-screwed and it needs to be somehow correctly tweaked so that it is possible to insert arbitrarily selected fragments from the video at the end of the video, that is, both after and before the last frame

scscorpin

Quote from: eumagga0x2a on June 21, 2024, 02:26:45 PM
Quote from: scscorpin on June 21, 2024, 11:12:55 AMI think it is necessary to make it possible to move the carriage to the end beyond the video and show a black frame there

This would constitute a bug for me. The default position of the B marker is the full video duration, i.e. the end point of the duration of the last frame. This is mathematically correct.

ты сам осознаёшь то, что твой алгоритм неверный?, убери неверный алгоритм!

как вставить фрагмент перед крайним кадром?, это невозможно из-за твоего неверного алгоритма!

Я предложил хороший вариант с чёрным кадром, цвет кадра может быть любой хоть фиолетовый ;)

обязанность программиста:
  • позиция бегунка неможет обманывать пользователей!

задачи:
  1. вставлять фрагменты в позиции бегунка и не иначе
  2. сделать количество позиций у бегунка равным количеству кадров + 1
  3. добавить пустой кадр после видео, то есть за пределы таймлайна

решение:
  • при установке на таймлайне бегунка в позицию равную количеству кадров + 1 нужно показать пустой кадр в окне предпросмотра, а бегунок при этом установить в самый конец таймлайна, тогда пустой кадр никогда небудет выделен, а копирования и вставки всегда будут происходит правильно

do you realize that your algorithm is wrong?, remove the wrong algorithm!

how to insert a fragment before the last frame?, it is impossible because of your wrong algorithm!

I suggested a good option with a black frame, the frame color can be any, even purple ;)

programmer's responsibility:
  • the slider position cannot deceive users!

tasks:
  1. insert fragments at the slider positions and not otherwise
  2. make the number of slider positions equal to the number of frames + 1
  3. add an empty frame after the video, that is, outside the timeline

solution:
  • when setting the slider on the timeline to a position equal to the number of frames + 1, you need to show an empty frame in the preview window, and set the slider to the very end of the timeline, then the empty frame will never be selected, and copying and pasting will always happen correctly

sark

#4
The simple rule is that paste places content in front of the currently selected frame, with the exception that if the last frame is selected, content is pasted behind that frame. There are logical reasons for this.

Quote from: scscorpin on June 22, 2024, 03:51:50 AMhow to insert a fragment before the last frame?

The solution to your problem is to place the cursor on the last frame and paste twice. This will place your content both in front of, and behind the last frame. Now move the cursor forward one frame, select the A marker button and hit Delete. All pasted content forward of the original last frame will be removed.

There is some inconvenience for the rare occasions this would be required, but considerably less than having an additional unnecessary black frame at the end of all sessions.

sark

Quote from: sark on June 22, 2024, 06:31:52 PMThe simple rule is that paste places content in front of the currently selected frame, with the exception that if the last frame is selected, content is pasted behind that frame.

Edit: Got that the wrong way round. Should be:

paste places content behind the currently selected frame, with the exception that if the last frame is selected, content is pasted in front of that frame.

scscorpin

Quote from: sark on June 22, 2024, 06:31:52 PMThe solution to your problem is to place the cursor on the last frame and paste twice. This will place your content both in front of, and behind the last frame. Now move the cursor forward one frame, select the A marker button and hit Delete. All pasted content forward of the original last frame will be removed.

There is some inconvenience for the rare occasions this would be required, but considerably less than having an additional unnecessary black frame at the end of all sessions.

пустой кадр не учитывается на этапе сохранения, прочтите задачу 3. внимательнее, написано- "после видео", а не в само видео
  • чтобы показать пустой кадр ненужно ничего дополнительного сохранять в сессиях, нужно лишь выполнять функцию FillRect для имитации кадра в конце таймлайна, то есть термин- "пустой кадр" в данном случае означает имитацию кадра в окне предпросмотра без приминения к нему фильтров, то есть это исключительно логическая обработка позиции бегунка на таймлайне, который если в крайней правой позиции, то необходимо выполнить FillRect в окне предпросмотра
плюсы Моего варианта:
  1. отсутствие дополнительных действий перед вставкой фрагмента перед крайним кадром, который, например, в слайдшоу может быть с длительностью в 1 одну секунду и более
  2. отсутствие неверной обработки крайней позиции бегунка на таймлайне, в связи с которой присутствуют ошибки в редакторе, например, невозможно воспроизвести крайний кадр
  3. присутствие возможности воспроизведения крайнего кадра
      
минусы присутствующего алгоритма:
  1. присутствие дополнительных действий перед вставкой фрагмента перед крайним кадром
  2. невозможно воспроизвести стартовый и крайний кадр
  • при старте воспроизведения стартовый кадр невоспроизводится, а бегунок на таймлайне моментально меняет позицию на следующий кадр
  • это идеально видно в Avidemux при воспроизведении видеозаписей с одиним кадром в секунду fps=1, то есть при воспроизведении слайдшоу из 10 слайдов с fps=1 в Avidemux воспроизведение длится 8 секунд вместо 10

the empty frame is not taken into account at the save stage, read task 3. more carefully, it says "after the video", not in the video itself
  • to show the empty frame, you do not need to save anything extra in sessions, you only need to execute the FillRect function to simulate the frame at the end of the timeline, that is, the term "empty frame" in this case means simulating a frame in the preview window without applying filters to it, that is, this is exclusively logical processing of the position of the slider on the timeline, which if in the extreme right position, then you need to execute FillRect in the preview window

pros of My option:
  1. no additional actions before inserting a fragment before the extreme frame, which, for example, in a slideshow can be with a duration of 1 second or more
  2. no incorrect processing of the extreme position of the slider on the timeline, due to which there are errors in the editor, for example, it is impossible to play the extreme frame
  3. the presence of the ability to play the extreme frame

cons of the existing algorithm:
  1. presence of additional actions before inserting a fragment before the last frame
  2. it is impossible to play the starting and last frame
  • when starting playback, the starting frame is not played, and the slider on the timeline instantly changes position to the next frame
  • this is perfectly visible in Avidemux when playing video recordings with one frame per second fps=1, that is, when playing a slideshow of 10 slides with fps=1 in Avidemux, playback lasts 8 seconds instead of 10

eumagga0x2a

Quote from: scscorpin on June 21, 2024, 11:12:55 AMif you insert a video with fps=1, then when you press the end button on the keyboard, the carriage will be placed before the last frame

Apart from imprecise slider display (seems to be a hopeless endeavor fighting Qt and different display of the handle depending on Qt theme in use), the seek is performed correctly to the last frame. The last frame PTS is less than video duration, thus going to the last frame should not position the slider fully to the end of the range.

Quote from: scscorpin on June 23, 2024, 08:07:31 PMit is impossible to play the extreme frame

Audio output stopping when no next frame can be fetched instead of continuing for the duraton of the last frame is a valid bug in the playback function, on my todo list after ffmpeg7x gets merged. Has nothing to do with the navigation slider though.

Quote from: scscorpin on June 21, 2024, 11:12:55 AMthat is, it is clearly visible on the timeline that the last frame cannot be selected by such methods as frame-by-frame movement or pressing the end button on the keyboard

Wrong. The last frame is selected by seeking to it and setting the A marker with the B marker reset (set to the total duration).

Quote from: scscorpin on June 21, 2024, 11:12:55 AMtherefore, when you insert a fragment at the end of the video, it is inserted before the last frame

Content of the clipboard is appended to the video instead of inserted before the last frame which is an intentional inconsistency as almost nobody ever needs a single last frame of the video to appear after a pasted selection. This makes life for almost everyone easier, just not for the extreme use case of a slideshow by means of using a very low framerate.

However, there is a different, genuine bug, which prevents an obvious workaround for your use case:

1. Copy a selection to clipboard

2. Seek to the last frame of video

3. Paste the content of the clipboard

4. Set the A marker

5. Go to the next frame

6. Set the B marker

7. Cut the selection

8. Seek to the end of video

9. Paste the selection

The actual results: two frames are pasted instead of one = bug.

Quote from: scscorpin on June 23, 2024, 08:07:31 PMwhen starting playback, the starting frame is not played, and the slider on the timeline instantly changes position to the next frame

A valid bug, fixed locally, the fix to be pushed when ready once ffmpeg7x has been merged.

scscorpin

Quote from: eumagga0x2a on June 24, 2024, 09:56:57 PM
Quote from: scscorpin on June 23, 2024, 08:07:31 PMwhen starting playback, the starting frame is not played, and the slider on the timeline instantly changes position to the next frame

A valid bug, fixed locally, the fix to be pushed when ready once ffmpeg7x has been merged.
отличная новость, возможно она решит проблему с переходами между фрагментами, которые имеют разное колличество кадров в секунду, при использовании слайдшоу в проэктах это очень важно

great news, maybe it will solve the problem with transitions between fragments that have different frames per second, when using slideshows in projects this is very important

Quote from: eumagga0x2a on June 24, 2024, 09:56:57 PM
Quote from: scscorpin on June 21, 2024, 11:12:55 AMtherefore, when you insert a fragment at the end of the video, it is inserted before the last frame

Content of the clipboard is appended to the video instead of inserted before the last frame which is an intentional inconsistency as almost nobody ever needs a single last frame of the video to appear after a pasted selection. This makes life for almost everyone easier, just not for the extreme use case of a slideshow by means of using a very low framerate.

However, there is a different, genuine bug, which prevents an obvious workaround for your use case:

1. Copy a selection to clipboard

2. Seek to the last frame of video

3. Paste the content of the clipboard

4. Set the A marker

5. Go to the next frame

6. Set the B marker

7. Cut the selection

8. Seek to the end of video

9. Paste the selection

The actual results: two frames are pasted instead of one = bug.


эта ошибка связана с копированием разделителя фрагментов, поэтому Я вставляю дважды
  , то есть после 8. и 9. нажимаю shift+up и делаю 9. после этого ошибочный разделитель (красная линия разделения фрагментов в конце таймлайна) пропадает, а Я споккойно удаляю крайний фрагмент, Я это ненаписал раньше, в силу того, что и так с крайним кадром много ошибок связано, поэтому Я про этот момент просто забыл вообще, прошу прощения :-*

this error is related to copying the fragment separator, so I paste it twice
, that is, after 8. and 9. I press shift+up and do 9. after that the erroneous separator (the red line separating the fragments at the end of the timeline) disappears, and I calmly delete the last fragment, I didn't write this earlier, due to the fact that there are already a lot of errors associated with the last frame, so I simply forgot about this moment altogether, I apologize  :-*

eumagga0x2a

Quote from: eumagga0x2a on June 24, 2024, 09:56:57 PMAudio output stopping when no next frame can be fetched instead of continuing for the duraton of the last frame is a valid bug in the playback function, on my todo list after ffmpeg7x gets merged.

Just to keep you updated: this particular issue as well as frame duration shift should be fixed now. There are no official nightlies yet, but it should be quite easy* to cross-compile for Windows on Linux yourself.

*) It has been a while since MXE setup has been tested the last time though ;D

eumagga0x2a

A fresh official cross-compiled nightly build was uploaded on August 4.