#PY <- Needed to identify #
#--automatically built--
adm = Avidemux()
ui = Gui()
if not adm.loadVideo("C:/Tmp/image.jpg"):
raise("Cannot load C:/Tmp/image.jpg")
adm.clearSegments()
adm.addSegment(0, 0, 40000)
adm.markerA = 0
adm.markerB = 40000
adm.setHDRConfig(1, 1, 1, 1, 0)
adm.videoCodec("x264", "useAdvancedConfiguration=False", "general.params=CQ=30", "general.threads=0", "general.preset=fast", "general.tuning=stillimage", "general.profile=baseline", "general.fast_decode=False", "general.zero_latency=False"
, "general.fast_first_pass=True", "general.blueray_compatibility=False", "general.fake_interlaced=False", "level=-1", "vui.sar_height=1", "vui.sar_width=1", "vui.overscan=0", "vui.vidformat=5", "vui.fullrange=False"
, "vui.colorprim=2", "vui.transfer=2", "vui.colmatrix=2", "vui.chroma_loc=0", "MaxRefFrames=3", "MinIdr=25", "MaxIdr=250", "i_scenecut_threshold=40", "intra_refresh=False", "MaxBFrame=3", "i_bframe_adaptive=1"
, "i_bframe_bias=0", "i_bframe_pyramid=2", "b_deblocking_filter=True", "i_deblocking_filter_alphac0=0", "i_deblocking_filter_beta=0", "cabac=True", "interlaced=False", "constrained_intra=False", "tff=True"
, "fake_interlaced=False", "analyze.b_8x8=True", "analyze.b_i4x4=True", "analyze.b_i8x8=True", "analyze.b_p8x8=True", "analyze.b_p16x16=False", "analyze.b_b16x16=False", "analyze.weighted_pred=2", "analyze.weighted_bipred=True"
, "analyze.direct_mv_pred=1", "analyze.chroma_offset=0", "analyze.me_method=1", "analyze.me_range=16", "analyze.mv_range=-1", "analyze.mv_range_thread=-1", "analyze.subpel_refine=7", "analyze.chroma_me=True"
, "analyze.mixed_references=True", "analyze.trellis=1", "analyze.psy_rd=1.000000", "analyze.psy_trellis=0.000000", "analyze.fast_pskip=True", "analyze.dct_decimate=True", "analyze.noise_reduction=0", "analyze.psy=True"
, "analyze.intra_luma=11", "analyze.inter_luma=21", "ratecontrol.rc_method=0", "ratecontrol.qp_constant=0", "ratecontrol.qp_min=10", "ratecontrol.qp_max=51", "ratecontrol.qp_step=4", "ratecontrol.bitrate=0"
, "ratecontrol.rate_tolerance=1.000000", "ratecontrol.vbv_max_bitrate=0", "ratecontrol.vbv_buffer_size=0", "ratecontrol.vbv_buffer_init=1", "ratecontrol.ip_factor=1.400000", "ratecontrol.pb_factor=1.300000"
, "ratecontrol.aq_mode=1", "ratecontrol.aq_strength=1.000000", "ratecontrol.mb_tree=True", "ratecontrol.lookahead=40")
adm.addVideoFilter("stillimage", "start=0", "duration=99912")
adm.addVideoFilter("resampleFps", "mode=0", "newFpsDen=1000", "newFpsNum=15000", "interpolation=0")
adm.audioClearTracks()
if not adm.audioAddExternal("C:/Tmp/audio.mp3"):
raise("Cannot add external audio track from C:/Tmp/audio.mp3")
adm.setSourceTrackLanguage(0,"und")
if adm.audioTotalTracksCount() <= 0:
raise("Cannot add audio track 0, total tracks: " + str(adm.audioTotalTracksCount()))
adm.audioAddTrack(0)
adm.audioCodec(0, "copy")
adm.audioSetDrc2(0, 0, 1, 0.001, 0.2, 1, 2, -12)
adm.audioSetEq(0, 0, 0, 0, 0, 880, 5000)
adm.audioSetChannelGains(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
adm.audioSetChannelDelays(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
adm.audioSetChannelRemap(0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8)
adm.audioSetShift(0, 0, 0)
adm.setContainer("MP4", "muxerType=0", "optimize=1", "forceAspectRatio=False", "aspectRatio=1", "displayWidth=1280", "rotation=0", "clockfreq=0")
ui.displayInfo("Next...", "Please, set the audio duration value in the 1st video filter")
QuoteAssert failed :rst >= min at line 106, file/home/fx/hudson/workspace/mxe2024/avidemux/qt4/ADM_UIs/src/T_fIoatResettabIe.cpp
The application has encountered a fatal problem
The current editing has been saved and will be reloaded at next start
ADM_setCrashHook [libADM_core6.dll]
ADM_setCrashHook [libADM_core6.dll]
ADM_backTrack [libADM_core6.dll]
InitFactory() [libADM_UIQT56.dll]
InitFactory() [libADM_UIQT56.dll]
diaElemFloatResettable::setMe(void*, void*, unsigned int) [libADM_coreUI6.dll]
unknown function [libADM_UIQT56.dll]
diaElemFrame::setMe(void*, void*, unsigned int) [libADM_coreUI6.dll]
InitFactory() [libADM_UIQT56.dll]
InitFactory() [libADM_UIQT56.dll]
DIA_getAudioFilter(ADM_AUDIOFILTER_CONFIG*, double) [avidemux_portable.exe]
ADM_AUDIOFILTER_CONFIG::audioFilterConfigure(double) [avidemux_portable.exe]
HandleAction(Action) [avidemux_portable.exe]
MainWindow::actionSlot(Action) [avidemux_portable.exe]
QEventDispatcherWin32::qt_metacall(QMetaObject::Call, int, void**) [Qt5Core.dll]
MainWindow::actionSignal(Action) [avidemux_portable.exe]
MainWindow::buttonPressed() [avidemux_portable.exe]
QEventDispatcherWin32::qt_metacall(QMetaObject::Call, int, void**) [Qt5Core.dll]
QAbstractButton::toggled(bool) [Qt5Widgets.dll]
QAbstractButton::nextCheckState() [Qt5Widgets.dll]
QAbstractButton::mouseReleaseEvent(QMouseEvent*) [Qt5Widgets.dll]
QWidget::event(QEvent*) [Qt5Widgets.dll]
QApplicationPrivate::notify_helper(QObject*, QEvent*) [Qt5Widgets.dll]
QApplication::notify(QObject*, QEvent*) [Qt5Widgets.dll]
QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) [Qt5Core.dll]
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) [Qt5Widgets.dll]
QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) [Qt5Widgets.dll]
QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) [Qt5Widgets.dll]
QApplicationPrivate::notify_helper(QObject*, QEvent*) [Qt5Widgets.dll]
QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) [Qt5Core.dll]
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) [Qt5Gui.dll]
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) [Qt5Gui.dll]
QEventDispatcherWin32::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) [Qt5Core.dll]
qt_plugin_instance [qwindows.dll]
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) [Qt5Core.dll]
QCoreApplication::exec() [Qt5Core.dll]
UI_RunApp() [avidemux_portable.exe]
startAvidemux(int, char**) [avidemux_portable.exe]
SDL_main [avidemux_portable.exe]
ms2timedisplay(unsigned int) [avidemux_portable.exe]
unknown function [avidemux_portable.exe]
unknown function [avidemux_portable.exe]
BaseThreadInitThunk [kernel32.dll]
RtlUserThreadStart [ntdll.dll]
Quote from: eumagga0x2a on March 25, 2025, 08:32:08 PMQuote from: rhino on March 25, 2025, 03:29:41 AMI'm using version 2.8.1
I would recommend using the latest known good 2.8.2 developer build which is at the moment r241212 from https://avidemux.org/nightly/win64/ rather than the last release which has got long in the tooth. This won't remove the fundamental limitations of the structure of a compressed video stream, but I deem it a lot less buggy than the ancient 2.8.1.
Okay, I've installed 2.8.2 (the December 2024 build).Quote from: rhino on March 25, 2025, 03:29:41 AMIs this the right place to ask about issues with 2.8.1
Yes, it is exactly the right place, unless you suspect that your topic is specific to a particular operating system (which is not the case here). "2.6" should have been "anything newer than 2.5.x" as Avidemux was essentially rewritten after the 2.5.x generation.
I had a feeling the title was a bit dated when I didn't see categories for anything newer.Quote from: rhino on March 25, 2025, 03:29:41 AMI know how to set the A and B markers and then click on delete to get rid of scenes that I don't want
As far as I understand your goal, this is an inefficient approach. Instead of deleting what you don't need, export what you do.
THAT is useful information. I've looked at several YouTube videos, starting with ones that were for basic editing for beginners and including a more detailed one but none of them really addressed efficient use of Avidemux.
To be more specific, I have a 45 minute long video and I want to clip selected scenes from it. The scenes run from a minute or two up to 4 minutes. Presumably, I begin by opening the video in Avidemux and then locating the start and end points of the first scene I want. I mark those start and end points with the A and B markers respectively, then export (via the Save command), which will re-encode that scene to mp4 if that's what I've chosen for Video Output format. The exported file should be named so that it reflects the scene content and will be in mp4. Then I repeat for the other scenes I want. Is that all correct?Quote from: rhino on March 25, 2025, 03:29:41 AMI know that keyframes and i-frames are the same thing
No, they are not. It is just a limitation of Avidemux GUI (legacy from an epoch as DivX marked the state of the art regarding video compression) that doesn't differentiate between IDR (instantaneous decoder refresh, always a keyframe), I-frames (intra-coded frame, not necessarily a keyframe) and keyframes (either IDR or a so-called "recovery" frame, i.e. a non-IDR frame from where a decoder can begin decoding and avoid outputting incomplete pictures). I'm not delving into further details right now, but this is a fundamental (mathematical) limitation of video compression that a video must start with a keyframe.
I really don't want to open a can of worms but I'm a little confused. There was a clear claim that keyframes and i-frames are the same thing in the longest video I saw. Apparently, that is wrong (or perhaps outdated: the video was 4 years old.) What does this mean for what I'm trying to do? Can I cut my file on any frame type regardless of it is is i-frame, p-frame or b-frame without corrupting the original file or the exported one?Quote from: rhino on March 25, 2025, 03:08:38 PMif I change Video output to "Mpeg4 AVC (x264)" from "Copy" that this will re-encode the video for me when I click on Save?
Yes, this is how Avidemux works.
Excellent. That's clear :-)Quote from: rhino on March 25, 2025, 03:08:38 PMDoes it matter if the source file that I'm trying to edit is in MKV format?
The source container is entirely irrelevant.
Perfect: one less thing to worry about :-)Quote from: rhino on March 25, 2025, 03:08:38 PMIf I made a point a point of finding the existing keyframe immediately prior to the start of the scene that I want to keep and set it as the A marker and then find the existing keyframe immediately after the end of the scene and then set that as the B marker, my scenes would have several frames at the beginning and end that I don't want. Could I overlay the surplus frames at the beginning and end with something like a black frame or transparency so that they wouldn't be seen by the audience of my presentation?
Theoretically, this could be achieved with edit lists feature of QuickTime / MP4, but Avidemux doesn't support it for export. Unsure about support by various video players.
Therefore, the easiest and the only reliable solution it to re-encode the video stream during export.
Quote from: rhino on March 25, 2025, 03:29:41 AMI'm using version 2.8.1
Quote from: rhino on March 25, 2025, 03:29:41 AMIs this the right place to ask about issues with 2.8.1
Quote from: rhino on March 25, 2025, 03:29:41 AMI know how to set the A and B markers and then click on delete to get rid of scenes that I don't want
Quote from: rhino on March 25, 2025, 03:29:41 AMI know that keyframes and i-frames are the same thing
Quote from: rhino on March 25, 2025, 03:08:38 PMif I change Video output to "Mpeg4 AVC (x264)" from "Copy" that this will re-encode the video for me when I click on Save?
Quote from: rhino on March 25, 2025, 03:08:38 PMDoes it matter if the source file that I'm trying to edit is in MKV format?
Quote from: rhino on March 25, 2025, 03:08:38 PMIf I made a point a point of finding the existing keyframe immediately prior to the start of the scene that I want to keep and set it as the A marker and then find the existing keyframe immediately after the end of the scene and then set that as the B marker, my scenes would have several frames at the beginning and end that I don't want. Could I overlay the surplus frames at the beginning and end with something like a black frame or transparency so that they wouldn't be seen by the audience of my presentation?
Quote from: szlldm on March 25, 2025, 07:04:10 AMIf you need to do frame accurate cutting, then you have to re-encode the video. On the left, at Video output change "Copy" to one of your preferred codec. If unsure, select "Mpeg4 AVC (x264)".