Author Topic: Append sequential files is working buggy  (Read 283 times)

gromich

  • Newbie
  • *
  • Posts: 3
Append sequential files is working buggy
« on: September 20, 2017, 06:11:04 PM »
There is file list:
00001.MTS
00002.MTS
00003.MTS
00004.MTS
00005.MTS
I open 00001.MTS, the app is asking "There are several files with sequential file names. Should they be all loaded?".
If I press "Ok", it creates only one file 00001.MTS.idx2 and shows incorrect "B:" time - too long for the first file but too short for all parts. When I press "Save video" it is saving only first file.

If I try to use "drag and drop" - all the same. Except, if I try to add all files, the app is asking that question after every file.

And one more... When I'm selecting files in explorer for "d&d", and then I'm pointing at any file except first before pulling, this pointed file will be used as first in the video.

P.S. I think, it will be a good idea to add "Batch append" in the "File" menu. D&D less comfortable and not intuitive.

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1386
Re: Append sequential files is working buggy
« Reply #1 on: September 20, 2017, 08:07:17 PM »
There is file list:
00001.MTS
00002.MTS
00003.MTS
00004.MTS
00005.MTS
I open 00001.MTS, the app is asking "There are several files with sequential file names. Should they be all loaded?".
If I press "Ok", it creates only one file 00001.MTS.idx2

Works as intended so far.

Quote
and shows incorrect "B:" time - too long for the first file but too short for all parts.

Are you able to successfully load each of the five files individually?

Quote
When I press "Save video" it is saving only first file.

Incompatible files? Please compress and attach the admlog.txt file (accessible from the "Help" menu) resulting from sequential loading and saving the videos.

Quote
If I try to use "drag and drop" - all the same. Except, if I try to add all files, the app is asking that question after every file.

This looks like a minor bug.

Quote
And one more... When I'm selecting files in explorer for "d&d", and then I'm pointing at any file except first before pulling, this pointed file will be used as first in the video.

Avidemux loads files in the order provided by the file manager, so this works as it should.

gromich

  • Newbie
  • *
  • Posts: 3
Re: Append sequential files is working buggy
« Reply #2 on: September 21, 2017, 11:09:38 PM »
Quote
Are you able to successfully load each of the five files individually?
Yes. If I add files individually, all is Ok.

Quote
Incompatible files? Please compress and attach the admlog.txt file (accessible from the "Help" menu) resulting from sequential loading and saving the videos.
All files were made the same camera and one day. Preferences were not changed.

The experiment.

All files:
Video: MPEG4 Video (H264) 1440x1080 (16:9) 25fps [V: h264 high L4.0, yuv420p, 1440x1080]
Audio: Dolby AC3 48000Hz stereo 256kbps [A: ac3, 48000 Hz, stereo, 256 kb/s]

Video Output: Copy
Audio Output: Copy
Output format: Mp4v2 Muxer


The lengh of files:
00001.MTS 09:39
00002.MTS 00:52
00003.MTS 00:12
00004.MTS 02:34
00005.MTS 02:18

I opened first file. 
"There are several files with sequential file names. Should they be all loaded?" - Yes.
After "Save video" I got one file 02:18 length. It containe beginning of 00001.MTS. But first second was lost.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5575
Re: Append sequential files is working buggy
« Reply #3 on: September 22, 2017, 04:54:48 AM »
delete 00001 - 00005  .idx2 files for the videos.
Load videos manually in wanted order
00001
"There are several files with sequential file names. Should they be all loaded?" - No.
load following videos and every time:
"There are several files with sequential file names. Should they be all loaded?" - No.

Save video now with new name, compare against previous saved video.
Let us know, thanks.

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1386
Re: Append sequential files is working buggy
« Reply #4 on: September 22, 2017, 06:47:54 AM »
This probably won't help in this case, but please use at least the latest release, better the latest nightly. 2.6.21 is outdated. The source videos seem to have issues (a lot of missing PTS), Avidemux sees the video as

Code: [Select]
[A_ResetMarkers] 22:24:14-820 Video Total duration : 00:02:18,300 ms
Probably providing a couple of samples might allow to investigate deeper (if Mean finds time to look at them).

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5575
Re: Append sequential files is working buggy
« Reply #5 on: September 22, 2017, 07:25:14 AM »
If something did go wrong while indexing auto appended videos, you would find out this way?
Quote
00005.MTS 02:18

gromich

  • Newbie
  • *
  • Posts: 3
Re: Append sequential files is working buggy
« Reply #6 on: September 23, 2017, 12:05:17 PM »
delete 00001 - 00005  .idx2 files for the videos.
Load videos manually in wanted order
00001
"There are several files with sequential file names. Should they be all loaded?" - No.
load following videos and every time:
"There are several files with sequential file names. Should they be all loaded?" - No.

Save video now with new name, compare against previous saved video.
Let us know, thanks.
In this case out file made correctly. "B:" time showed correctly too.


Quote
This probably won't help in this case, but please use at least the latest release, better the latest nightly. 2.6.21 is outdated.
I checked in avidemux_r170919_win64Qt5_465.zip too. All the same except reasking after every file.

If something did go wrong while indexing auto appended videos, you would find out this way?
Quote
00005.MTS 02:18
Yes. And I checked another group of files. In both case "B:" time = length last file.

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1386
Re: Append sequential files is working buggy
« Reply #7 on: September 23, 2017, 04:36:49 PM »
Meanwhile I found a couple of matching MPEG transport streams (.MTS) so I could play with them and can confirm that automatic appending of sequentially named files is broken. In addition to it, it is integrated into the video indexer within the demuxer, so that if index files already exist, you are not prompted.

I must admit, I never looked into this part of the code, but IMVHO it should be either fixed with priority or disabled (at least for now). Currently it is required to reject the offer to be able to append transport or MPEG program streams (the function is not available for other formats).

Thank you for your report.

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1386
Re: Append sequential files is working buggy
« Reply #8 on: September 25, 2017, 06:39:47 AM »
Just to be more specific, there are two ways of handling append:

1. By the app, creating a new segment for each source video;

2. By MpegTS and MpegPS demuxer plugin for MPEG transport and program streams.

The second one represents sequential files as a single video to the application and should/might be able to avoid otherwise necessary small gaps between the end of one and the beginning of the next source video. The demuxer managed append works only if sequentially named videos fulfill some conditions, apparently like no missing PTS and videos being really parts of the same stream, just like VOBs on a DVD.