Jump to content

Audio DVD and DTS CD toolbox


TheSaint
 Share

Recommended Posts

JPG-to-M2V v1.8  (see first post for download of another re-upped version) :wacko:

While working on JPG-to-MKV today and playing around with the command-line, I suddenly realized I had introduced a bug in the mpeg2enc parameters, when I created the Command-Line Editor. It was a silly thing, based on faulty recall of what a variable was. I took it to be a file path and not a value. Just one of those dumb moments, where I should have double-checked. No doubt this was caused by me struggling over what to name that particular variable, in the first place. In the end, I gave up and just called it $vid ... for want of a simple description. Essentially the content of the variable is a 'p' or 'n' to designate type of video - PAL or NTSC (could also be 's' for Secam, but I don't support that). It's described in the help file as 'video norm', so I guess I could and probably should have called it $norm, though I thought $vid more meaningful.

Anyway, I doubt anyone has been impacted ... especially as there has only been two downloads of that version.
It didn't impact anything anyway, unless you modified the parameters for mpeg2enc.exe and put something at the end of the first section ... which would have cause mpeg2enc to crash on first use, so quite obvious it would have needed restoring to default.

Damn I hate silly little introduced bugs.

P.S. Now the good news. I've got v1.0 of JPG-to-MKV working now, and seemingly well, though not much tested yet. Your final M2V file is muxed together with your designated choice of Audio tracks (WAV, AC3, DTS), which are converted by Ffmpeg (and Ffdcaenc for DTS), and along with the specified Chapter file (Audio or Image), all into an MKV file, using the MKVMerge command-line.

I've only tested with a WAV file source so far, but it has been converted to the correct Sample Rate and either a final WAV, AC3 and or DTS file as output for the MKV file. I tried WAV + AC3 and then AC3 + DTS, so ended up with those two audio track types in the final MKV file.

Current choices for audio

Input = WAV, AC3, DTS, FLAC, APE, WMA, OGG, MP3, M4A

Output = WAV, AC3 and DTS (but not on its own)

Final Output Combinations

AC3 or WAV or AC3 + DTS or WAV + AC3

NOTE - DTS is so similar to WAV, but slightly compressed so no point to having both together. DTS is not accepted on it's own by some players. AC3 is the usual default audio track for most players.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

And I re-upped again, but no-one had downloaded meanwhile.

Basically, I changed some minor parameters around, after researching and experimenting some more today.

The changes weren't enough to do a version update, and as I have pretty much stopped work on JPG-to-M2V in favor of its replacement JPG-to-MKV, I am only going to make very minor improvements to this earlier version from now on ... if any are truly necessary. At the moment where relevant, I am only mirroring changes I make to the same code in JPG-to-MKV.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

For those willing to play around with the Ffmpeg command-line, and wondering why I don't use -vcodec copy instead of reducing the quality by using -vcodec mpeg2video, it is because of MuxMan not accepting the resulting file.

In fact, if I just replace mpeg2video with copy, nothing really changes anyway, so MediaInfo will still report a vastly wrong duration, as will Media Player Classic, and the resulting file will have variable kbps instead of the constant it should be.

As it stands, just using copy instead of mpeg2video doesn't stop the file being accepted by MuxMan, it is the parameter you need to use with copy that causes the issue, that being -target pal-dvd. If you don't use that parameter, then nothing is fixed duration wise, and even using it, the kbps still remain as variable.

Ffmpeg is such a complex program, and as I have been learning, the order of parameters makes a difference and some cancel others, etc. So without a definitive guide, I'm just playing Russian Roulette to some degree.

The real painful thing in all this, is how tantalizingly close I am to resolving things. The flickering or shimmering issue essentially goes away if I use copy and -target pal-dvd (haven't tried the ntsc variant yet).

From what I understand of MuxMan, it is by the book, and if anything deviates it is rejected.

I'm beginning to feel that Ffmpeg is a doer of all things, but a master of nothing.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Ok, I've finally got somewhere with my research and experiments.

I've been able to solve the flickering or shimmering that occurs for some images. It is somewhat of a work-around, but not necessary now with my new method.

Basically, the New Method, is to use Ffmpeg for just about everything.

I finally worked out how to Join the M2V files using Ffmpeg, then I worked out how to create an M2V file from a JPG using Ffmpeg. This means, I can now remove a couple of the 3rd party programs I was using (MJPeg Tools, Mpgtx).

I have found another 3rd party program that fixes timecodes, DGPulldown, which will probably be optional, as it reduces sharpness of the images for some reason. I was hoping to avoid any other dependencies, other thank Requant, which is used for the shrinking. However, for some reason, while Media Player Classic reports the correct duration of the final file, MediaInfo doesn't, unless DGPulldown is used. This is sort of the opposite situation, to what I had before, where MediaInfo reported correctly, but MPC didn't. Anyway, with or without DGPulldown, the M2V files are accepted by MuxMan, but I've yet to test MKVMerge etc. I'm also yet to check the sharpness issue on a TV.

So now I need to code all the changes, and do full scale testing (beyond BAT files).

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Coded & Tested, and though it works, I'm not entirely pleased, as the result is less than perfect. By that, I mean I still have a kind of minor pulsing issue, more evident on some images than others, but not so noticeable at a distance, though much better than the flickering or shimmering. The sharpness and clarity is not great either, with Ffmpeg, so shimmering/flickering aside, MJPEG Tools appears to create nicer images. It just seems that no matter what I do with this, there is a compromise involved.

On the positive side, creation is much faster now, halving a 10 minute job, and I'm guessing potentially reducing more than half for bigger jobs.

I'll probably take a break from trying for improvements, as I have had enough of looking at flickering, shimmering and now pulsing screens. It's got to the point where I'm beginning to wonder if I'm just seeing things ... a pattern burned into my brain or retina.

EDIT

Actually, I've just found my work-around does the best job of all, with no pulsing, and sharper clearer images. So that appears to be the best solution. It is another compromise though, as it takes longer, because I recode twice. The first time, uses the -target pal-dvd parameter, which makes the file unacceptable for MuxMan, but fixes duration issues and retains images quality. The second time, the -target pal-dvd parameter is left out, and the file is acceptable to MuxMan, while retaining most of the quality, etc. I'm not sure why it works, or why it only works in that manner.

So, I'm back to using both MJPEG Tools and FFmpeg, with FFmpeg doing the recoding differently and far better. This then is my acceptable solution .... for now.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

JPG-to-M2V updated to v1.9  (see previous posts for more detail, and first post for the downloads)


(v1.9) Recoding method has been changed, to improve final quality with no more flickering (shimmering), which occurred on some images. Previous method can be restored by editing an INI entry (Create M2V section). Bugfixes.

And in case I haven't said it enough - A BIG THANKS to all the 3rd Party Program creators & providers. (see Source.txt for details)

This does not include the Ffmpeg method I mentioned earlier, which I have only instigated in my JPG-to-MKV spinoff program. That program also has easier access to all three methods via the Options window, whereas for JPG-to-M2V you must edit the Settings.ini file, if you want to use the original method used by v1.8 and earlier.

The three methods are -

[1] MJPEG (1) - Original (MJPEG Tools for M2V creation, Mpgtx for M2V joining and Ffmpeg for recoding).

[2] MJPEG (2) - Same as Original, but with the better alternate method of recoding with Ffmpeg.

[3] Ffmpeg - All creation, joining and recoding done by Ffmpeg, with MJPEG Tools and Mpgtx not being used.

As discussed earlier, MJPEG (2) is the better method, though is the longer process. It is worth it for the clearer sharper images without visible pulsing, flickering, shimmering, brightness fluctuations or whatever you want to call it.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

  • 1 year later...

@Qwerty212 - No worries.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...