jessielw / MP4-Mux-Tool

Mp4Box GUI
GNU General Public License v3.0
67 stars 5 forks source link

Muxing doesn't work, getting "Please input or clear the video input box" message #30

Closed maxiuca closed 9 months ago

maxiuca commented 9 months ago

When I try to run a mux, I'm getting a pop-up window titled "Error!" saying "Please input or clear the video input box". When I press the "View Command" button it won't open any window to show the command.

Any idea what may be causing such behavior? A missing Windows library/component perhaps?

jessielw commented 9 months ago

I believe it's a bug. If you can re produce if with steps would you mind posting those steps for me I wouldn't mind patching up the tkinter version of the app until I get the new one complete.

You can follow process on the branch below if you'd like. The app is getting fully rebuilt, it's about 60% done. I had a couple other projects fall in my lap that I need to complete first. https://github.com/jlw4049/MP4-Mux-Tool/tree/qt-re-work

But if you can repro it on the old version I'll fix it and release.

maxiuca commented 9 months ago

Thank you for the quick response. I've tested some other h264 files and they got muxed without issues, so seems it only happens with just this one h264 file. I've tested versions 1.12 and 1.18 (both exhibit the same behavior). You can download the problematic file from here: https://drive.google.com/file/d/1DQfFtEycexqMhJ0FcXO-G_hPuUTVQqep/view I hope this helps.

jessielw commented 9 months ago

Thanks for the sample file, I was able to reproduce it easily with that file. You can test it out on the latest release.

maxiuca commented 9 months ago

Thanks! I've tested the latest release (1.19) and while the muxing worked fine, the program still won't show the window with the command when that problematic file is set as the video input. When I choose a different h264 file as the video input, then it works fine.

BTW. Have you discovered what is wrong with that problematic h264 stream?

jessielw commented 9 months ago

There is a couple issues as to why the program didn't like the h264 file. This was one of my first projects and while it was stable I missed error handling for specific scenarios. This is part of the reason I am re-coding the program from scratch. So the program was looking for fps information to be utilized in the ui/for the muxer. This was silently causing errors in the back ground that wasn't being displayed.

As far as the h264 file having something wrong with it, there's nothing wrong with it. It was just lacking the fps information in the mediainfo. This could have been how it was demuxed or something else. The file is valid.

I'll do another release in a few minutes that has the fix for viewing the command. If you notice any other issues with the older build of the tool, feel free to respond here and I'll repair the old code base as time allows until I replace it with the new program. This will be many months out, so I don't mind repairing the old program.

jessielw commented 9 months ago

You can test the new release out here

maxiuca commented 8 months ago

Thanks for fixing the issues. There is one more I forgot to mention. Setting the FPS doesn't seem to work with my test file.

jessielw commented 8 months ago

Thanks for fixing the issues. There is one more I forgot to mention. Setting the FPS doesn't seem to work with my test file.

Could you give me more information on what you mean?

You don't actually have to set the fps anywhere its all done automatically.

maxiuca commented 8 months ago

I know I don't have to set the fps manually when it's specified in the h264 stream's headers. But when I load a h264 stream with no fps info, the "Framerate FPS" box becomes editable, so I assume I need to specify the fps myself otherwise it will be set to the default 25 fps . Entering the desired frame-rate in the "Framerate FPS" box isn't reflected in the command line created by MP4-Mux-Tool and the resulting files gets the default mp4box frame-rate of 25.

mp4muxtool_fps

jessielw commented 8 months ago

I know I don't have to set the fps manually when it's specified in the h264 stream's headers. But when I load a h264 stream with no fps info, the "Framerate FPS" box becomes editable, so I assume I need to specify the fps myself otherwise it will be set . Entering the desired frame-rate in the "Framerate FPS" box isn't reflected in the command line created by MP4-Mux-Tool and the resulting files gets the default mp4box frame-rate of 25.

mp4muxtool_fps

The FPS box actually doesn't need to be utilized at all. I'll remove it in a patch. In that being said, your sample file above is 25 FPS. You can't change this simply by muxing it and passing arguments.

General
Unique ID                                : 177756378826452241305795587457050270075 (0x85BAA21E8EB8CDBA917179740C00D97B)
Complete name                            : E:\programming\MP4-Mux-Tool\1930alzheimer.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 121 MiB
Duration                                 : 3 min 28 s
Overall bit rate                         : 4 871 kb/s
Frame rate                               : 25.000 FPS
Encoded date                             : 2024-02-11 23:56:07 UTC
Writing application                      : mkvmerge v74.0.0 ('You Oughta Know') 64-bit
Writing library                          : libebml v1.4.4 + libmatroska v1.7.1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 3 min 28 s
Bit rate                                 : 4 869 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.094
Stream size                              : 121 MiB (100%)
Default                                  : Yes
Forced                                   : No

This is that same file muxed with mkvtoolnix. The h264 file might not show the FPS, but the muxers themselves mp4box/mkvmerge (w/e else) gets the fps from the file regardless if it's being displayed via the header. If you set mediainfo to full parse mode you'll see that the FPS is still present regardless.

In any case I'll work the older GUI (other branch is not ready for production yet) to remove FPS input as it's not necessary and adds confusion.

Edit: Latest version removes the FPS widget and any input related to it. It has some other improvements as well. https://github.com/jlw4049/MP4-Mux-Tool/releases/tag/1.21