News:

--

Main Menu

Bugs report + suggestions

Started by acritum, February 17, 2017, 03:12:43 PM

Previous topic - Next topic

acritum

Using version 2.6.18 for Win64.

There are a few bugs that keep traveling over years from one version to another:

1) When trying to save a video as AVI YV12, only first 4 GB are saved and then the encoding stops, although the file system is NTFS and can handle larger files.

2) Audio output selection resets "invisibly" when the current video is closed and a new one is opened, although the selection visibly remains the same. Example to reproduce the bug:

a) drag (open) a MOV video (actually, any video format, but the problem will be more clearly seen with a video file containing a WAV audio stream).
b) select video: "Copy", audio: "AAC (faac)".
c) select MP4 Muxer.
d) save the video (everything goes fine now).
e) close the file (ctrl-w).
f) drag another MOV video of the kind.
g) now you see that video output is still "copy" and audio is "AAC (Faac)" and output is "MP4" (the same as they were set for the previous video).
h) save the file.
i) you see a bulk of error messages like "unsupported. Only AAC, AC3, E-AC3 and mpegaudio supported for audio" and other errors.
j) select AAC(Faac) from the dropdown list again, although it is already selected!
k) try to save the file again, and it is being saved!

3) I'm missing a normal adjustable window-wide zoom because 1:2 is too small and 1:1 is too large for my screen when working with full hd videos. And the fact that Avidemux window changes its size when closing and opening videos annoys a lot because I need to resize it after opening every new window to fit my workplace (I have also other windows opened for work).

4) When saving a file, the default file name line shows a name of a file that was saved a long time ago and has nothing to to with the current project. I think it will be more reasonable to show the file name that is being currently edited in this field so that the user could easily make simple changes of it. For example, if the opened video is "2016-01-01_12-00-00.mp4", make it also a default name for the SAVE AS dialog so that the user could make a fast modification such as "2016-01-01_12-00-00_cut.mp4" without the need to find the original filename somewhere and type it manually in this field. 

Jan Gruuthuse

are you reporting on 2.6.18 release or on nightly builds (where developing happens).
windows: http://www.avidemux.org/nightly/win64

1) .avi is not advised as container these days, you should go for .mp4 or .mkv. If you insist on avi, there is a setting in Avidemux Menu: Edit: Preferences: Output: [v] Create OpenDML files

3) tried: num keypad 4 3 2 or 1

4) this is probably changed

save current settings could solve some of your issues is you work a lot of videos from the same source.

eumagga0x2a


acritum

Quote from: Jan Gruuthuse on February 17, 2017, 03:49:30 PM

1) .avi is not advised as container these days, you should go for .mp4 or .mkv. If you insist on avi, there is a setting in Avidemux Menu: Edit: Preferences: Output: [v] Create OpenDML files

I tried mp4 and mkv but they do not seem to support YV12 codec and I use it to quickly export lossless intermediate videos to encode them with handbrake later in a batch (handbrake also has a good denoise filter that doesn't blur too much but noticeably remove the noise).  I'll try OpenDML, thanks for the hint.

Quote
3) tried: num keypad 4 3 2 or 1

It just switches 1:1, 1:2 and other standard zooms but not full-window zoom.

About 2 and 4, thanks, the latest 170212 version is surely better than the "stable" release and fixes these problems (I thought it should be visa versa but I was wrong). Jan Gruuthuse and eumagga0x2a, thank you for your help.

acritum

Just remembered another issue. It is probably not Avidemux bug, but I'll describe it and maybe a fix can be found.

When cutting videos in Free Video Editor, it seems to damage the frame sequence by removing an initial I-frames sometimes but it saves further dependent frames (this is my guess). So, these files can be played by all video players that I have but they cannot be opened in Adobe Premiere (it sees only a sound track). Avidemux can open them but it cannot save them (it shows "Too short" message without saving the file). I tried various things and found a solution: move the cursor to the first I-frame and delete all the previous frames. After this simple trick Avidemux can save these files. Although it seems to be Free Video Editor's bug, but I thought Avidemux should validate files for such video file "damages" and ask if the user wants to remove the initial frames that cause the failure during the saving process to ensure max compatibility with broken videos and other videos that fail to follow strict specifications.

eumagga0x2a

acritum, this is completely unrelated to the topic. If the first keyframe is missing, the whole GOP is skipped. For issues beyond that: please provide a sample.

acritum

Quote from: eumagga0x2a on February 18, 2017, 03:18:23 PM
acritum, this is completely unrelated to the topic. If the first keyframe is missing, the whole GOP is skipped. For issues beyond that: please provide a sample.

Just not to make new topics in the forum, here is a sample. I do not know what's wrong with it. I have cut some parts of it in Free Video Editor. Sometimes it saves normal files and maybe 1 out of 5-10 files are saved like that. You can play it in any player, but you cannot save it in Avidemux without removing the initial frames. I cannot attach it due to filesize limitations. Download here:
http://acritum.com/temp/fail.mp4
Maybe you can disassemble it with your dev tools and find out what's wrong with it.


eumagga0x2a

#7
Saving the "fail.mp4" video in Copy mode works for me using the MKV or the MP4v2 muxer. Only the MP4 muxer, which actually invokes the libavformat library within the bundled ffmpeg, stumbles over upon two frames with equal decoding timestamps:

[lavc] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8000 >= 8000

This comes from libavformat/mux.c:560 and indeed, starting the selection on the second keyframe makes the compute_muxer_pkt_fields function happy.

Unfortunately, I can't judge if this can be worked around in Avidemux or if the bundled ffmpeg needs patching and what this patching should look like.

edit: the first keyframe is not missing.

acritum

Thank you for the explanation. Luckily, Avidemux became more convenient than it was 2-3 years ago, so I think it's time to say good-bye to Free Video Editor. I liked it for fast cutting and one-click saving files (it adds "_cut" to the end of the original file name and saves it to the same folder with one click). Previous Avidemux versions required to type the name of the file in the "Save as" window and it was really annoying when dealing with many videos. The latest version offers the original file name in the "Save as" window but still there's something unpredictable happening with the folder where the output file is saved. As far as I understand it is the last used folder or the parent folder if the last one doesn't exist anymore or even the "Avidemux" program folder in some cases. This is quite confusing because when I save project-A in folder-A, close it, open project-B in folder-B, I expect the output file to be saved in folder-B, but instead of it, it is saved in folder-A. Of course, I can check the folder before saving the file and change it to folder-B, but when the folder names are typical such as 20161030_165422, the eyes get tired and sometimes I don't notice that the folder needs to be changed and the output file is saved to the folder of the previous source/output video (folder-A) and when the encoding is done and I can't see it in the folder-B with the source file, I need to look through many folders with previous projects to find it. Although I understand that saving many files from different locations to a single output folder is sometimes useful, but in the cases like the one I described above, it leads to much confusion. So I thought it would be useful if the user could specify what folder should be used as default output folder in the Avidemux settings. There can be several options such as:
* the last folder that was used for saving,
* the folder of the source video,
* the folder specified below
   [ c:\blablavla  ]

This simple patch can noticeably increase the speed and ease of work when dealing with many projects/files.


And do you know anything about wrong colors when opening an AVI file? For example, when I export an uncompressed AVI from Adobe Premiere, they play well in players, but when I open it in Avidemux, it shows the blueish colors instead of the normal colors. I found a solution in forums, by adding "Swap UV" filter, but this is not very convenient because it requires video recompression (and I like Avidemux for being able to copy the streams quickly). Is this problem known and are there any plans to fix it?

Jan Gruuthuse

The source/creation process uses another colour plane. Switching this at start would help.
http://avidemux.org/smif/index.php/topic,16572.0.html
Technical info (developers, ....)
https://msdn.microsoft.com/en-us/library/windows/desktop/dd206750(v=vs.85).aspx

Beyond my basic user capabilities.

eumagga0x2a

Quote from: acritum on February 20, 2017, 05:18:21 AM
Previous Avidemux versions required to type the name of the file in the "Save as" window and it was really annoying when dealing with many videos. The latest version offers the original file name in the "Save as" window but still there's something unpredictable happening with the folder where the output file is saved. As far as I understand it is the last used folder or the parent folder if the last one doesn't exist anymore or even the "Avidemux" program folder in some cases.

It would be interesting to investigate in which situations exactly the program directory gets automatically chosen. This is definitely not right, but regardless that the other behaviour matches my workflow (source and target are located always on different HDDs), I think that it should be this way. Avidemux will suggest the source folder as target if the lastdir_write preference is empty, which is currently questionable, because this facilitates overwriting the source video (you do get a prompt, but still).

QuoteThis is quite confusing because when I save project-A in folder-A, close it, open project-B in folder-B, I expect the output file to be saved in folder-B

Source dir = target dir is actually a really bad practice when editing video files located on rotating storage devices, less so for SSD, of course.

QuoteI thought it would be useful if the user could specify what folder should be used as default output folder in the Avidemux settings. There can be several options such as:
* the last folder that was used for saving,
* the folder of the source video,

The latter would at least require implementing automatic renaming.

Quote* the folder specified below
   [ c:\blablavla  ]

This should be covered by the current default behaviour once a video has been saved and is not needed IMHO. In general you are free to delete lines 51 and 52

    admCoreUtils::getLastWriteFolder(lastFolder);
        if(!lastFolder.size())


from avidemux/qt4/ADM_userInterfaces/ADM_gui/file_qt4.cpp and build Avidemux from source to make Avidemux always suggest the source directory as target (you do need Linux to accomplish this).

QuoteAnd do you know anything about wrong colors when opening an AVI file? For example, when I export an uncompressed AVI from Adobe Premiere, they play well in players, but when I open it in Avidemux, it shows the blueish colors instead of the normal colors.

Please provide a sample or at least the MediaInfo output for the file in question.

acritum

Quote from: Jan Gruuthuse on February 20, 2017, 05:51:41 AM
The source/creation process uses another colour plane. Switching this at start would help.
http://avidemux.org/smif/index.php/topic,16572.0.html
I don't see any possibility to switch it neither in Premiere nor in Avidemux. And the Swap UV filter solution requires re-encoding which is time consuming and results in quality loss. Do I understand it right that the color plane can't be switched without re-encoding?

Quote from: eumagga0x2a on February 20, 2017, 07:47:40 AM

Source dir = target dir is actually a really bad practice when editing video files located on rotating storage devices, less so for SSD, of course.

But if a user has one HDD drive (like most of notebook/laptop owners), we don't have any choice.

QuoteI thought it would be useful if the user could specify what folder should be used as default output folder in the Avidemux settings. There can be several options such as:
* the last folder that was used for saving,
* the folder of the source video,

The latter would at least require implementing automatic renaming.

I don't think automatic renaming is required IF/WHEN the "save-as" dialog is shown. You just cannot overwrite the source because the file is open by Avidemux and thus becomes read only for a while, so you have to choose any other file name anyway. Of course, it would be great if Avidemux could automate the saving process the way Free Video Editor does. Every time you save the video "file.mp4", it creates files like file_cut.mp4, file_cut(1).mp4, file_cut(2).mp4, etc, so you can quickly create as many edited version as you need without any prompts/confirmations and without any files being overwritten. The works goes really fast even if you have to deal with hundreds of videos. And when the source and dest. folders are the same, you can quickly compare the source and the result videos because file.mp4 and file_cut.mp4 go one after another in the same folder and they are easy to find and test one-by-one and redo the work if the result looks unsatisfying. But this is another level of ease-of use, I hope Avidemux can reach it some day. I don't have Linux at the moment and even if I install it, I have no experience in compiling software in Linux. Besides, any new official upgrade will clean out all my changes, so I'd rather get used to what we have now and wait until the developers will find time and desire to add this little patch to the official build.

If this is still needed, here is Mediainfo for "Uncompressed UYVY 422 8bit" AVI files, generated by Adobe Premiere:

General
Complete name                            : 160812_183906_cut.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
Format profile                           : OpenDML
File size                                : 6.38 GiB
Duration                                 : 4 min 38 s
Overall bit rate                         : 197 Mb/s
Recorded date                            : 2017-02-02T14:04:24+03:00
Writing application                      : Lavf56.1.100

Video
ID                                       : 0
Format                                   : YUV
Codec ID                                 : UYVY
Codec ID/Info                            : Uncompressed 16bpp. YUV 4:2:2 (Y sample at every pixel, U and V sampled at every second pixel horizontally on each line). A macropixel contains 2 pixels in 1 u_int32.
Duration                                 : 4 min 38 s
Bit rate                                 : 195 Mb/s
Width                                    : 848 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 30.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Compression mode                         : Lossless
Bits/(Pixel*Frame)                       : 16.000
Stream size                              : 6.33 GiB (99%)

Audio
ID                                       : 1
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 4 min 38 s
Bit rate mode                            : Constant
Bit rate                                 : 1 536 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 50.9 MiB (1%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 21  ms (0.64 video frame)



eumagga0x2a

#12
Quote from: acritum on February 20, 2017, 09:55:06 AM
I don't think automatic renaming is required IF/WHEN the "save-as" dialog is shown. You just cannot overwrite the source because the file is open by Avidemux and thus becomes read only for a while, so you have to choose any other file name anyway.

This is true only for Windows.

I hope, Mean will be able to find a free minute to look at the MediaInfo output for a video which you say is played in Avidemux with U/V swapped. A sample, just a few seconds long, would be nice anyway.

edit: by the way,

QuoteWriting application                      : Lavf56.1.100

Adobe Premiere can't use libavformat, can it? You've likely posted wrong MediaInfo output.

acritum

Quote from: eumagga0x2a on February 20, 2017, 08:09:24 PM
Quote from: acritum on February 20, 2017, 09:55:06 AM
I don't think automatic renaming is required IF/WHEN the "save-as" dialog is shown. You just cannot overwrite the source because the file is open by Avidemux and thus becomes read only for a while, so you have to choose any other file name anyway.

This is true only for Windows.
If it's true, Avidemux has to (or even must) implement internal protection from the source being overwritten. You can load a text file into RAM, make some modifications, and dump the text from the RAM to the source text file, but when you deal with videos, you can't load the source into memory completely, so it should remain in the original form until the encoding is complete. So, as I understand, writing to the source file directly will not lead to anything but data loss and should be prohibited by the software when the user tries to do it by mistake or on purpose.

Quote
Adobe Premiere can't use libavformat, can it? You've likely posted wrong MediaInfo output.

It looks like this avi was made by some other software, but I use only Premiere, Avidemux and very rarely Free Video Editor to work with avi. If it's not from Premiere or Avidemux, than it's from Free Video Editor. Anyway, I tested it and it also shows blue skin color in Avidemux. Here is a short real sample from Premiere (the cat shouldn't be blue):

http://acritum.com/temp/test-premiere-320x240-5fps.avi

General
Complete name                            : C:\sample\test-premiere-320x240-5fps.avi
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 4.78 MiB
Duration                                 : 5 s 200 ms
Overall bit rate                         : 7 710 kb/s
Recorded date                            : 2017-02-21T09:03:08+03:00
Writing application                      : Adobe Premiere Pro CC 2015.4 (Windows)

Video
ID                                       : 0
Format                                   : YUV
Codec ID                                 : UYVY
Codec ID/Info                            : Uncompressed 16bpp. YUV 4:2:2 (Y sample at every pixel, U and V sampled at every second pixel horizontally on each line). A macropixel contains 2 pixels in 1 u_int32.
Duration                                 : 5 s 200 ms
Bit rate                                 : 6 144 kb/s
Width                                    : 320 pixels
Height                                   : 240 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 5.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Compression mode                         : Lossless
Bits/(Pixel*Frame)                       : 16.000
Time code of first frame                 : 0 / 0
Time code source                         : Adobe tc_A / Adobe tc_O
Stream size                              : 3.81 MiB (80%)

Audio
ID                                       : 1
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 5 s 200 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 536 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 975 KiB (20%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 867  ms (4.33 video frames)
Interleave, preload duration             : 1000  ms






eumagga0x2a

Quote from: acritum on February 21, 2017, 06:28:42 AM
Quote from: eumagga0x2a on February 20, 2017, 08:09:24 PM
Quote from: acritum on February 20, 2017, 09:55:06 AM
I don't think automatic renaming is required IF/WHEN the "save-as" dialog is shown. You just cannot overwrite the source because the file is open by Avidemux and thus becomes read only for a while, so you have to choose any other file name anyway.

This is true only for Windows.
If it's true, Avidemux has to (or even must) implement internal protection from the source being overwritten.

AFAIK this is not possible. Missing file locking brings also great benefits, e.g. you can load and save excerpts from a growing file like an ongoing video recording on Linux. Try this on Windows :P

QuoteHere is a short real sample from Premiere (the cat shouldn't be blue):

http://acritum.com/temp/test-premiere-320x240-5fps.avi

Thank you very much, I've opened a pull request for the fix.