News:

--

Main Menu

2.8.1- Can't open still images (png, jpg)

Started by Ren, February 02, 2023, 08:01:21 AM

Previous topic - Next topic

Ren

Avidemux simply tells me that it "Could not open the file" if i try to open an image file.

Appending an image to an already opened video file works fine (as long as theyre the same dimensions)

eumagga0x2a

#1
I cannot test with the 2.8.1 release build ATM, but opening JPEG, PNG and BMP images works fine for me using both the latest available VC++ (vsWin64) and the latest available MinGW (win64) nightlies. Please retry with those builds and provide a sample JPEG image which one of them or both fail to load.

Please make sure also that for the purpose of testing the image files are not sequentially named (i.e. not in the style somepic-0001.jpg, somepic-0002.jpg and so on) as this triggers multi-loading. The latter should not pose an issue, but complicates the assessment of the situation.

Please also ensure you never install Avidemux into a directory which may contain remains of an older (or just another) Avidemux installation  and never run multiple instances of Avidemux – no matter different versions or the same one – simultaneously.

SilverbackNet

I am also running into this problem. 2.8.1 release build, Win10. Log shows:

*************************
  Avidemux v2.8.1
*************************
 http://www.avidemux.org
 Code      : Mean, JSC, Grant Pedersen,eumagga0x2a
 GFX       : Nestor Di, nestordi@augcyl.org
 Design    : Jakub Misak
 FreeBSD   : Anish Mistry, amistry@am-productions.biz
 Audio     : Mihail Zenkov
 Mac OS X  : Kuisathaverat, Harry van der Wolf
 Win32     : Grant Pedersen

Build Target: Microsoft Windows (x86-64)
User Interface: Qt (5.12.5)
Operating System: Microsoft Windows (6.2.9200; 64-bit)
Time: Wed Jul  5 15:11:08 2023

0: C:\av\Avidemux\avidemux.exe

(etc etc)

[HandleAction] 22:11:49-186 ************ OPEN_VIDEO **************
[TS Demuxer] Probing...
[checkMarker] 22:11:51-491 [Ts Demuxer] Sync ok :0 Sync ko :111
[checkMarker] 22:11:51-491 [Ts Demuxer] Sync ok :0 Sync ko :111
[detectTs] 22:11:51-491 [TS Demuxer] Not a TS file
 [TS Demuxer] Not a ts file
 [avsProxy] Cannot open that
 [flvHeader] Cannot open that
 [mkvHeader] Cannot open that
 [MP4] Cannot open that...
 [mxfHeader] Cannot open that (e1ffd8ff)
[probe] 22:11:51-491  [avsProxy] Cannot open that
 [openDML] Cannot open that
[probe] 22:11:51-491   JPG file detected...
[probe] 22:11:51-491 [asfHeader] Cannot open that
 match :0 / 11 (probeSize:25631)
 [PS Demuxer] Not a ps file
[readJpegInfo] 22:11:51-492 Found tag 0xe1, ???, size=22 position=6
[readJpegInfo] 22:11:51-492 Found tag 0xed, ???, size=108 position=30
[readJpegInfo] 22:11:51-492 Found tag 0xdb, Quant table, size=67 position=140
[readJpegInfo] 22:11:51-492 Found tag 0xdb, Quant table, size=67 position=209
[readJpegInfo] 22:11:51-492 Dimension 450 x 588
[ADM_identifyImageFile] 22:11:51-492 Identified as jpeg (450 x 588)
[picHeader::open] 22:11:51-492  0 : D:/temp/FB_IMG_0000170977623.jpg
[picHeader::open] 22:11:51-492 Found 0 images
[picHeader::open] 22:11:51-492 Image type=JPG
[ADM_PP::cleanup] 22:11:51-492 Deleting post proc
[ADM_PP::ADM_PP] 22:11:51-493 Initializing postproc
[ADM_PP::cleanup] 22:11:51-493 Deleting post proc
[ADM_PP::update] 22:11:51-493 updating post proc
[ADM_PP::update] 22:11:51-494 Enabled type:3 strength:3
[ADM_Composer::addFile] 22:11:51-494 Clearing video filters
[ADM_vf_clearFilters] 22:11:51-494 clear filters
[Editor] *** NO AUDIO ***
[ADM_EditorSegment::addReferenceVideo] Video FCC: MJPG (47504A4D)
[ADM_getDecoder] 22:11:51-494 Searching decoder in plugins
[tryCreatingVideoDecoder] 22:11:51-494 No decoder found in plugin
[ADM_getDecoder] 22:11:51-494 Searching decoder in coreVideoCodec(450 x 588, extradataSize:0)...
[ADM_coreCodecGetDecoder] 22:11:51-494 Searching decoder in coreVideoCodec(450 x 588, extradataSize:0)...
[lavc] Build: 3835492
[lavc] Decoder init: 47504a4d video decoder initialized with 1 thread(s)! (MJPEG (Motion JPEG))
using ffSimple
[EditorCache::EditorCache] 22:11:51-494 Video cache instance created at 000001D24DE17B10
[EditorCache::createBuffers] 22:11:51-494 Added 16 video cache buffers, 16 total.
[ADM_EditorSegment::addReferenceVideo] 22:11:51-494 Original frame increment 00:00:00,040 = 40000 us
[ADM_EditorSegment::addReferenceVideo] 22:11:51-494 DTS missing, cannot probe time increment.
[ADM_EditorSegment::addReferenceVideo] 22:11:51-494 About 40000 microseconds per frame, 0 frames
[ADM_EditorSegment::addReferenceVideo] 22:11:51-494 Reached the end of ref video while searching for the first keyframe.
[lavc] Destroyed
[ADM_Composer::addFile] 22:11:51-494 Cannot add video.
[ADM_EditorSegment::deleteAll] 22:11:51-494 [Editor] Deleting all videos
I will try with the nightly.

eumagga0x2a

A nightly probably won't help here. Please rename the single JPEG file you try to open in such a way that the last character before ".jpg" is not a digit.

The bug in the demuxer seems to strike when filename ends in a digit like *623.jpg and there is no sequence (no next file *624.jpg). Can't test at the moment, but upon a quick glance at the excerpt of Avidemux log you privided this is what might happen.

SilverbackNet

Ah, thanks for that, adding a letter at the end of each did the trick. Sorry!

eumagga0x2a

Nothing to apologize about, quite the contrary, thank you for the log!

However, I don't see any obvious bug in the demuxer code (where I suspected it to be) and also don't see why opening the very first (probably the single one) file while probing for sequentially named files fails, which is responsible for the subsequent failure to load the JPEG image in your case. Could you please confirm or deny that the original filename of the JPEG image was "FB_IMG_0000170977623.jpg"?

eumagga0x2a

Quote from: eumagga0x2a on July 06, 2023, 02:59:14 PMCould you please confirm or deny that the original filename of the JPEG image was "FB_IMG_0000170977623.jpg"?

I am confident that the original filename was different. We keep on adding digits from the filename trying to calculate the number from which we will start looking for sequenced files, going beyond the maximum value the data type can hold. This gives us invalid filenames at best, a crash at worst (probably compiler-dependent).

Fix inbound.

eumagga0x2a

Should be fixed now, please try out a future nightly.

Thank you for your report.