How to specify option to place the moov atom at the start in 2.7.3?

Started by StR, April 23, 2019, 10:26:55 PM

Previous topic - Next topic

StR

Hello!

How can one specify the option to place the moov atom at the start in 2.7.3 (as recommended for streaming by Youtube)?
My question is about both the GUI option and the command-line option (avidemux_cli.exe).

I was able to find this GUI option in v. 2.7.1 (but not the command-line option), but I do not see that in 2.7.3.

Just in case, - I am using cli for batch-conversion, with these cli options:

set videocodec=x264
set audiocodec=LavAAC
set avidemux_cli="C:\Program Files\Avidemux 2.7 VC++ 64bits\avidemux_cli.exe"

%avidemux_cli% --nogui --load "%%f" --video-codec  %videocodec% --audio-codec %audiocodec%  --output-format MP4  --save "..\UPLOAD\%%~nf-upload.mp4" --quit


All other suggestions for the options (both GUI and cli)  that implement Youtube-suggested optimizations are also welcome (e.g. "closed GOP"). It is rather difficult to match the language of Youtube recommended options to Avidemux options, especially in 2.7.3.

eumagga0x2a

TLDR: use the latest nightly from https://avidemux.org/nightly/vsWin64/ (VC++) or from https://avidemux.org/nightly/win64/ (MinGW like 2.7.1).

The long version:

The official 2.7.1 64 bits release build for Windows was cross-compiled using MinGW in MXE on Linux. The ability to move the moov atom to the head of the generated mp4 file was not available in the MP4 muxer on Windows until 2019-04-16 (it needed a FFmpeg patch to work), you must have used the libmp4v2-based MP4v2 muxer for that, not the libavformat-based MP4.

The MP4v2 muxer is not available in Microsoft Visual Studio C++-compiled Avidemux builds as the 2.7.2 and later releases are, so the functionality was missing until the issue in libavformat / MP4 muxer was solved recently. It is the default option, so you don't need to pass any extra options (possible only using a project script anyway) to the MP4 muxer.

StR

Thank you!

Yes, it was MP4v2 muxer in 2.7.1. (And I was surprised it was not among the codecs on 2.7.3-VC++).

So, do I understand correctly that the executable from this repository: https://avidemux.org/nightly/win64/ will
have MP4v2 available, but "to place the moov atom at the start" would not be the default option, and therefore, it won't be enabled when running from a .bat script as in the original post?
So, it is better to use the recent VC++ built for batch processing. Right?

Also, if using MinGW-built nightly version (2nd repository), do I need to download and unpack QT library (avidemux_r190422_win64Qt5_36.zip)? Where to? It's been a while since I installed 2.7.1, so, I don't remember if I had to do that. (I have a vague recollection that I did download QT library for some software at some point.)

PS.
To install these nightly builds, do you need to uninstall the 2.7.3-VC++ release first? (especially if installing MinGW version?)

And one more question: is it possible for the 2.7.3 VC++ and MinGW versions to coexist installed on one computer?
I know that 2.6 and 2.7.1 coexisted seemingly fine, and so did 2.5 and 2.6.
I have some project files saved in 2.7.1 that are not openable now in 2.7.3 VC++ as it complains about the missing demuxer. MinGW version seems to be the solution to that. But I would like to be able to run the .bat files to produce stream-optimized files (for uploading to Youtube), for which, it looks like, I would need the most recent VC++ version.

eumagga0x2a

Quote from: StR on April 24, 2019, 04:56:37 PM
Yes, it was MP4v2 muxer in 2.7.1.

Your batch specified the MP4 muxer, not the MP4v2 one.

Quote(And I was surprised it was not among the codecs on 2.7.3-VC++).

No muxer was ever among the codecs. They are entirely different things. The MP4v2 muxer is not included in VC++ (maybe the library it is based upon doesn't build with VC++, I don't know) and it to be dropped completely in the future.

QuoteSo, do I understand correctly that the executable from this repository: https://avidemux.org/nightly/win64/ will
have MP4v2 available

I tried to explain you that you don't need MP4v2 anymore.

Quotebut "to place the moov atom at the start" would not be the default option

Nothing was changed in this respect.

Quoteand therefore, it won't be enabled when running from a .bat script as in the original post?

Your batch script doesn't call the MP4v2 muxer. The MP4 muxer it calls will do the job just fine in both of the latest nightlies without any additional options to be set.

QuoteSo, it is better to use the recent VC++ built for batch processing. Right?

No, it is just the question of taste and technical requirements. E.g. the VapourSynth demuxer (the ability to load VapourSynth python scripts) is not available in MinGW builds. On the other hand, some video filters are not available in VC++ builds.

QuoteAlso, if using MinGW-built nightly version (2nd repository), do I need to download and unpack QT library (avidemux_r190422_win64Qt5_36.zip)?

It is not a QT library. It is just the same build packaged as ZIP, without an installer. Unzip it to any location and run one of the Avidemux executables.

QuoteTo install these nightly builds, do you need to uninstall the 2.7.3-VC++ release first? (especially if installing MinGW version?)

If you install another VC++ build, you should uninstall 2.7.3 VC++ first (or the installer will lauch the uninstaller of an earlier build for you).

Quoteis it possible for the 2.7.3 VC++ and MinGW versions to coexist installed on one computer?

Yes, absolutely.

QuoteI have some project files saved in 2.7.1 that are not openable now in 2.7.3 VC++ as it complains about the missing demuxer.

No demuxer was dropped. If you have a video which you are able to load in 2.7.1 but unable to do so in 2.7.3, please provide a sample.

StR

Once again, thank you for your detailed response.

Quote from: eumagga0x2a on April 24, 2019, 05:29:22 PM
Quote from: StR on April 24, 2019, 04:56:37 PM
Yes, it was MP4v2 muxer in 2.7.1.

Your batch specified the MP4 muxer, not the MP4v2 one.
Sorry for the confusing description.
With 2.7.1, the batch script was running MP4 muxer (I couldn't find the way to call MP4v2 from the command line), but I was using MP4v2 (and that "MOOV at start" option for the files processed manually, from within the GUI.

Quote from: eumagga0x2a on April 24, 2019, 05:29:22 PM
Quote(And I was surprised it was not among the codecs muxer on 2.7.3-VC++).

No muxer was ever among the codecs. They are entirely different things. The MP4v2 muxer is not included in VC++ (maybe the library it is based upon doesn't build with VC++, I don't know) and it to be dropped completely in the future.
Sorry for the mix-up above (codec/muxer).
From what I could tell, libmp4v2 is a Linux-specific library. So, I assumed that was the reason why VC++ - based build doesn't include MP4v2 muxer.

Quote from: eumagga0x2a on April 24, 2019, 05:29:22 PM
QuoteSo, do I understand correctly that the executable from this repository: https://avidemux.org/nightly/win64/ will
have MP4v2 available

I tried to explain you that you don't need MP4v2 anymore.

Well, this is the reason why I thought I need that (but probably no longer the case):
Quote from: eumagga0x2a on April 24, 2019, 05:29:22 PM
QuoteI have some project files saved in 2.7.1 that are not openable now in 2.7.3 VC++ as it complains about the missing demuxer.

No demuxer was dropped. If you have a video which you are able to load in 2.7.1 but unable to do so in 2.7.3, please provide a sample.

When in 2.7.3 VC++, I am loading a project file .py saved in 2.7.1 with the MP4v2 muxer configured, I get this error:
"Cannot find a demuxer for ..[path]/project.py".
I assumed that it is because of the MP4v2 muxer, but maybe it is something else.

I just looked inside that .py file (attached, as the anti-spam forum defense didn't allow me to post it as a code).
It doesn't reference MP4v2. So, I am lost what the reason is.
Also, attached is the screenshot of the error popup. It is followed by "Couldn't open file" error.

I checked, and if I manually add the same source video files, there is no problem. So, I am guessing it is not due to the video files, but it is somehow related to the saved .py file.
Any ideas about this problem?


eumagga0x2a

QuoteWhen in 2.7.3 VC++, I am loading a project file .py saved in 2.7.1 with the MP4v2 muxer configured, I get this error:
"Cannot find a demuxer for ..[path]/project.py".

It looks like you try to load script as if it were a video. To execute a project script, you should use File --> Project Script --> Run Project Script.

StR

Aah...
Mea culpa!

That was it! I don't know why I kept doing it wrong this morning...
Thank you!

eumagga0x2a

Good that we have sorted this out :-)

Quote from: eumagga0x2a on April 24, 2019, 05:29:22 PM
I couldn't find the way to call MP4v2 from the command line

--output-format MP4V2

But admittedly this won't move the moov atom to the beginning of the file. This would have to be done with a project script in case of the MP4v2 muxer.