News:

--

Main Menu

Apply a filter to specific section of video

Started by hfrmobile, August 20, 2016, 04:04:21 PM

Previous topic - Next topic

hfrmobile

Tried this tutorial: http://www.howtogeek.com/108584/how-to-quickly-edit-combine-transcode-apply-filters-to-videos-with-avidemux/

I  want to apply a filter to only a specific section of the video but under Windows there is no "Partial" button.

Adding filters to the whole video works, but I just need a short section to add a crop filter ....

Of course, workaround works: Cut video into parts and apply the filter to a specific parts and combine the parts .... But this is a lot of effort I'd like to avoid.

Thanks in advance!

Jan Gruuthuse

#1
There is no "Partial" button. see using Partial Filter(YouTube)
Forum: Partial applying filter


mean

It is back in 2.6.13 but not with all filters
Only with filters that :
* Dont change framerate
* Dont change size
* Dont need several frames (e.g. deinterlacer)

hfrmobile

#3
Thank you for your responses!

Quote from: mean on August 20, 2016, 04:16:43 PM
It is back in 2.6.13 but not with all filters
Only with filters that :
* Dont change framerate
* Dont change size
* Dont need several frames (e.g. deinterlacer)

Well, I never had the "Partial" button and also not in 2.6.13! Seems to be that it is not available for the Windows edition.


Quote from: Jan Gruuthuse on August 20, 2016, 04:15:55 PM
There is no "Partial" button. see using Partial Filter(YouTube)
Forum: Partial applying filter

Thank you, found now the "Make Partial" context menu. But even when I just add a black border at the bottom (to hide news flash in a TV show I recorded) I always get:
This filter cannot be made partial.

Even I don't change size etc. as suggested by "mean".

What is the best way to "hide"  a news flash at the bottom of a video?

e.g.

Jan Gruuthuse

#4
Blacken border is only for full length video.
My best guess for now:
- Filters: Sharpness: Mplayer delogo2

or create a black png, matching the rectangular part of video you want to mask
- Filters: Add logo: select your BlackRectangular.png

The mark [A ] & [ B] are not filter related, these are cut or saving points.
take note of time in A: [00:05:13.440] and B: [00:07:29.440]
and use these times in Partial Filter: (fill in yourself)
Start time (ms) from A: [00:05:13.440]
End Time (ms) from B: [00:07:29.440]

Jan Gruuthuse

#5
black .png used as logo:

black 256 pixels high for 720p:
black 256 pixels high for 1080i/pp:

Jan Gruuthuse

#6

hfrmobile

Well, blackborder.png approach is exactly what I am looking for, but AviDemux crashes when selecting the png file:





QuoteADM_setCrashHook  [libADM_core6.dll]
ADM_setCrashHook  [libADM_core6.dll]
ADM_backTrack  [libADM_core6.dll]
decoderFF::frameType()  [libADM_coreVideoCodec6.dll]
ADM_coreCodecGetDecoder(unsigned int, unsigned int, unsigned int, unsigned int, unsigned char*, unsigned int)  [libADM_coreVideoCodec6.dll]
createImageFromFile(char const*)  [libADM_coreImageLoader6.dll]
Ui_logoWindow::tryToLoadimage(char const*)  [libADM_vf_logoQT5.dll]
Ui_logoWindow::imageSelect()  [libADM_vf_logoQT5.dll]
QMetaObject::activate(QObject*, int, int, void**)  [Qt5Core.dll]
QButtonGroup::checkedId() const  [Qt5Widgets.dll]
QAbstractButton::mousePressEvent(QMouseEvent*)  [Qt5Widgets.dll]
QWidget::event(QEvent*)  [Qt5Widgets.dll]
QApplicationPrivate::notify_helper(QObject*, QEvent*)  [Qt5Widgets.dll]
QApplication::notify(QObject*, QEvent*)  [Qt5Widgets.dll]
QCoreApplication::notifyInternal(QObject*, QEvent*)  [Qt5Core.dll]
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)  [Qt5Widgets.dll]
non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const  [Qt5Widgets.dll]
non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const  [Qt5Widgets.dll]
QApplicationPrivate::notify_helper(QObject*, QEvent*)  [Qt5Widgets.dll]
QApplication::notify(QObject*, QEvent*)  [Qt5Widgets.dll]
QCoreApplication::notifyInternal(QObject*, QEvent*)  [Qt5Core.dll]
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)  [Qt5Gui.dll]
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)  [Qt5Gui.dll]
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Gui.dll]
QEventDispatcherWin32Private::sendTimerEvent(int)  [Qt5Core.dll]
DispatchMessageW  [USER32.dll]
DispatchMessageW  [USER32.dll]
QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Core.dll]
unknown function  [qwindows.dll]
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Core.dll]
QDialog::exec()  [Qt5Widgets.dll]
DIA_getLogo(logo*, ADM_coreVideoFilter*)  [libADM_vf_logoQT5.dll]
ADM_vf_addFilterFromTag(IEditor*, unsigned int, CONFcouple*, bool)  [libADM_coreVideoFilter6.dll]
filtermainWindow::allDoubleClick(QListWidgetItem*)  [avidemux.exe]
QMetaObject::activate(QObject*, int, int, void**)  [Qt5Core.dll]
QListWidgetItem::setFlags(QFlags<Qt::ItemFlag>)  [Qt5Widgets.dll]
QListWidget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)  [Qt5Widgets.dll]
QMetaObject::activate(QObject*, int, int, void**)  [Qt5Core.dll]
QAbstractItemView::mouseDoubleClickEvent(QMouseEvent*)  [Qt5Widgets.dll]
QWidget::event(QEvent*)  [Qt5Widgets.dll]
QFrame::event(QEvent*)  [Qt5Widgets.dll]
QAbstractItemView::viewportEvent(QEvent*)  [Qt5Widgets.dll]
QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)  [Qt5Core.dll]
QApplicationPrivate::notify_helper(QObject*, QEvent*)  [Qt5Widgets.dll]
QApplication::notify(QObject*, QEvent*)  [Qt5Widgets.dll]
QCoreApplication::notifyInternal(QObject*, QEvent*)  [Qt5Core.dll]
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)  [Qt5Widgets.dll]
non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const  [Qt5Widgets.dll]
non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const  [Qt5Widgets.dll]
QApplicationPrivate::notify_helper(QObject*, QEvent*)  [Qt5Widgets.dll]
QApplication::notify(QObject*, QEvent*)  [Qt5Widgets.dll]
QCoreApplication::notifyInternal(QObject*, QEvent*)  [Qt5Core.dll]
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)  [Qt5Gui.dll]
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)  [Qt5Gui.dll]
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Gui.dll]
QEventDispatcherWin32Private::sendTimerEvent(int)  [Qt5Core.dll]
DispatchMessageW  [USER32.dll]
DispatchMessageW  [USER32.dll]
QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Core.dll]
unknown function  [qwindows.dll]
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)  [Qt5Core.dll]
QDialog::exec()  [Qt5Widgets.dll]
GUI_handleVFilter()  [avidemux.exe]
HandleAction(Action)  [avidemux.exe]
MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)  [avidemux.exe]
QMetaObject::activate(QObject*, int, int, void**)  [Qt5Core.dll]
MainWindow::actionSignal(Action)  [avidemux.exe]
MainWindow::buttonPressed()  [avidemux.exe]
MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)  [avidemux.exe]
QMetaObject::activate(QObject*, int, int, void**)  [Qt5Core.dll]





Didn't expect that is that much effort to simply "hide a news banner"  ;D

hfrmobile

#8
Tried .jpg and it looked better but then Avidemux crashes when selecting "Make partial".

Avidemux also crashes for "Sharpness: Mplayer delogo2" when selecting "Make partial".

No detailed crash information, just getting the "has stopped working" message box ...

Jan Gruuthuse

eeks. What windows are you running? and is it 32 or 64-bit operating?
If 64-bit try Aug 21 2016. http://www.avidemux.org/nightly/
Don't use .avi container.
If still issues or 32-bit windows: remux 1st original (.avi) to (.mkv) using mkvtoolnix gui

hfrmobile

Thank you all for your support!

Windows 10 Version 1511 (OS Build 10586.545), 64 bit
64-bit Edition of Avidemux.

I ended up doing it "manually":
1. Splitting video
2. grop the part with the banner
3. resized the cropped part
4. concatenated the three parts

  20.08.2016  08:45       515.477.892 29 (1967) Der Mönch mit der Peitsche.avi
  21.08.2016  20:55        51.362.382 29 (1967) Der Mönch mit der Peitsche_1.avi
  21.08.2016  21:00        40.184.982 29 (1967) Der Mönch mit der Peitsche_2.avi
  21.08.2016  21:06        28.206.284 29 (1967) Der Mönch mit der Peitsche_2cropped+resized.avi
  21.08.2016  21:03        24.007.190 29 (1967) Der Mönch mit der Peitsche_2cropped.avi
  21.08.2016  21:02       477.003.278 29 (1967) Der Mönch mit der Peitsche_3.avi
  21.08.2016  21:08       555.983.448 29 (1967) Der Mönch mit der Peitsche_RESULT.avi


Took me 13 minutes to get the desired result  ;)

But for further movies it would be nice to know how to it easier (partial filters) (e.g. when a movie contains more than one banners).

eumagga0x2a

Quote from: hfrmobile on August 22, 2016, 05:50:08 AM
  20.08.2016  08:45       515.477.892 29 (1967) Der Mönch mit der Peitsche.avi
  21.08.2016  20:55        51.362.382 29 (1967) Der Mönch mit der Peitsche_1.avi
  21.08.2016  21:00        40.184.982 29 (1967) Der Mönch mit der Peitsche_2.avi
  21.08.2016  21:06        28.206.284 29 (1967) Der Mönch mit der Peitsche_2cropped+resized.avi
  21.08.2016  21:03        24.007.190 29 (1967) Der Mönch mit der Peitsche_2cropped.avi
  21.08.2016  21:02       477.003.278 29 (1967) Der Mönch mit der Peitsche_3.avi
  21.08.2016  21:08       555.983.448 29 (1967) Der Mönch mit der Peitsche_RESULT.avi


Please never ever use the AVI container for pretty much anything today.

The crash must be Windows specific, WFM on Linux.

Cormy1

Are the restrictions to partial filter applications listed here still current?

I would like to Change FPS different amounts to different sections of a video.
If this is impossible, could I cut the video into multiple projects, Change FPS on the various projects, and then remux them together? Or is variable framerate not supported at all?
If it is not supported, I suppose I would have to go a step further and resample to match framerates.
The purpose is for a music edit sync

eumagga0x2a

Quote from: Cormy1 on July 09, 2022, 04:41:31 AMAre the restrictions to partial filter applications listed here still current?

Yes, they are.

Quote from: Cormy1 on July 09, 2022, 04:41:31 AMI would like to Change FPS different amounts to different sections of a video.

You would need to export each section to a different video, you should also add "resample fps" to keep the frame rate. If storage is not a limiting factor, I'd recommend using a lossless codec (e.g. Ut Video) for intermediate steps. This all assumes that you don't need A/V to be in sync. If you do, this enormously complicates the task.

Quote from: Cormy1 on July 09, 2022, 04:41:31 AMOr is variable framerate not supported at all?

You should be able to append and process videos with matching dimensions but differing frame rates and export them to formats like MP4 or MKV (that's it). I would just avoid doing that for many reasons starting with the encoder always assuming a constant frame rate when calculating bitrate.

Quote from: Cormy1 on July 09, 2022, 04:41:31 AMThe purpose is for a music edit sync

I must admit that it doesn't tell me much about what you actually try to accomplish.

Cormy1

Is CRF 0 not lossless on x264?
The audio track is being replaced with music, I will edit the video to sync it with the music.
Is that a scenario that gets complicated?