Jump to content

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 post
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 post
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 post
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 post
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 post
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 post
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 post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By UEZ
      Hi,
      here a little tool to create ISO files from default ISO 9660 (2048 bytes/sector) CD or DVD format (no audio cd and BD support yet!)

      Source is too huge for code box -> Look here to have a look to the source code
      Additional credits to:
      Ward for MD5 checksum / MemoryDLL routines
      Harald Vistnes for cd2iso used in v1 and v2
      Yashied for WinAPIEx.au3
      wolf9228 to play wave from memory
      AutoItObject Team
      Download (purely written with AutoIt): ISO Creator v1.16 build 2015-07-13 beta.7z (1110 downloads previously)
      Thanks to smashly for pointing me to right direction
      The development of v1 and v2 is discontinued!
      Download v1: ISO Creator v1.0.0 build 2011-08-03 beta v1.7z (195 downloads previously)
      Download v2 (everything is called directly from memory): ISO Creator v1.0.0 build 2011-08-03 beta v2.7z (117 downloads previously)
      Thanks to smartee for the DLL version (experimental) of cd2iso!
      v1 is using cd2iso.exe to create the ISO
      v2 is using cd2iso.dll which was created by smartee.
      For compiled v1, v2 and pure AutoIt versions only (x86) visit (ISO Creator Exe only): 4shared.com or MediaFire
      You can call ISO Creator.exe also with command line parameters: ISO Creator.exe -s [source cd/dvd drive] -d [filename] (-md5) (-aem) (-exit)
      -s and -d are mendatory if called from command line!
      Tested on Win7 x64.
      If you find any bug please report here!
      Many thanks to smartee and smashly for their efforts on this project!
      Br,
      UEZ
      Change Log:
       
       
    • By TheSaint
      This is my latest project, which I have been working on for a few days now, so this is kind of hot off the press. However, in reality, I have been working on some element of this for years. Some of you may remember a huge project of mine (Audio DVD Producer + Chat Blog Screenshots) that I worked on a good while back? Well, this one is very much related, and very much simpler in scope. That other project by the way, has been basically stalled for a good length of time now. Not because I never finished it, but because the end result was not as great as I hoped. I may share the files for it one day. I may even start working on it again one day, though this latest project kind of makes much of it redundant for my aims.
      Anyway, this project. I have a good bunch of DTS-CDs, from same or other sources (i.e. DVD). You can read more about what a DTS-CD is here, but the short of it, is that you cannot play them on a normal CD player, as you will just get noise. Many if not most DVD or Blu-ray players can play the embedded DTS data in the otherwise empty CD tracks. Further to that, a DTS-CD is essentially a compressed PCM or WAV file for all intents and purposes ... to keep things simple. So a 6 Channel (5.1) track takes up roughly the same amount of bytes as a normal stereo CD track ... so 6 channels for the price of 2.
      Up until recently, the best device for me to play the DTS-CDs on, as CDs, is my PS3. It plays them faithfully (reader issues aside) and has nice visuals. It is also my most convenient DVD/Blu-ray player, so a heap of hassle to play on one of my regular players, and not much success with the Xbox 360 ... at least with burnt backup copies.
      DTS-CDs are also kind of old school, and been superseded by the more superior lossless DVD Audio, Super CD and now Blu-ray Audio discs. That kind of makes them rare now and essentially irreplaceable, so being a wise man, I store them safely and only play backup discs.
      Playing discs though is kind of limited, and to be honest a pain, as my PS3 spits the dummy on some days, with the reader not being what its should be ... or perhaps poorly calibrated. So for a long time now, I have been wanting to use the backup files instead. Unfortunately, while I can play them fine on my PC (foobar2000 + DTS plugin), that is not where I want to listen to them. Until recently, neither my NeoTV 550 hardware player or my Laser one, have been very good at playing the files, and the PS3 even worse with its lack of file support. Back when I first investigated all this, and tried a bunch of things, and didn't yet have the Laser (4k Android) player, I did attempt to go the FLAC route. However, I was left unsatisfied, as my NeoTV did not support CUE files and M3U playlist files are a bit of a hassle ... and no help, when I have a single album file with cue index points for each track ... which many of my DTS-CD rips were ... especially for albums that have one track running into the next ... live albums too. The other issues for me with FLAC, were the artwork (album cover) and TAGS (details for each track - Title, Artist, Album, Year, etc), which I could not get to work.
      So, moving forward to recently. I played a DTS-CD on the PS3 the other day, and if there is one things I hate, it is a playing issue when I am in the midst of enjoying a nice piece of music. The PS3 is not very forgiving and just aborts play. I am not very forgiving of the PS3, so decided to investigate FLACs again. Now perhaps something has changed, since I last tried ... or I just wasn't on the ball. Anyway, to cut a long story a bit shorter, I loaded a DTS WAV file in foobar2000, and ripped it to a FLAC file. I then tried that file on my NeoTV 550 hardware player, and it played fine ... and some tags were visible, which surprised me. So I thought it was worth looking into further. I also tried the file on my Laser hardware player, with the Kodi (XBMC) Android app, but alas, while the Tags and Artwork worked well, all I got was noise ... and same for every other app I tried.
      Now don't ask me why I thought to try FLAC on its own, using the FLAC Frontend program initially, but I did ... and it recognized the tracks as 5.1. With foobar2000, I'd selected the decoder for DTS files when converting to FLAC, as I thought it was required. I hadn't at that stage used flac.exe by itself, but I decided to investigate the TAG command-line options and also noticed you could embed a picture, which I was keen as mustard to try. So I set up a BAT file and gave it a whirl.
      Now the results on my NeoTV 550 hardware player, were brilliant - Sound, Tags and Artwork were as I wanted. I decided to update Kodi at that point. Then, I tried my Laser hardware player again, but still no joy. I then did some online research and read about how to get it all working. Alas, I had mixed results. The foobar2000 ripped file worked, but the one I did with the BAT file did not. Not being keen to rip everything via foobar2000 menus, and wanting to code a quicker batch solution myself, I first attempted to see what command-line options I could use for foobar. That was a dismal failure, so I then revisited some of the programs I had used way back when with DTS WAV based files, and eventually discovered that 'valdec.exe' from the AC3Filter tools collection, gave the compatibility I needed. So I put my WAV or DTS files through that program first, then converted them to FLAC.
      Now the files played with DTS surround sound, on both my hardware players. They also play gapless, so I split album length files into separate track files, which avoids the CUE and M3U issues. That said, a joined M3U file for something like a (separate folders) double album, plays great with Kodi.
      So of course, I just had to whip up a program ... with drag and drop of course.
      And that program has steadily been growing & changing, and is where I want it now, at v1.5.
      Screenshots further below.
      REQUIRED COMPONENTS
      Most programs (if not all) can be obtained from VideoHelp, but here are some alternative sites to source them. The 'flac.exe' program is definitely required, and 'valdec.exe' if you want maximum compatibility support for a wider range of players.
      [flac.exe]
      https://xiph.org/flac/
      https://xiph.org/flac/download.html
      https://ftp.osuosl.org/pub/xiph/releases/flac/
      https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.3.1-win.zip
      [valdec.exe] [found in the AC3Filter tools collection]
      http://www.ac3filter.net/wiki/AC3Filter_tools (Info only, downloads no longer work)
      https://web.archive.org/web/*/http://www.ac3filter.net/wiki/AC3Filter_tools
      https://web.archive.org/web/20130623004920/http://www.ac3filter.net:80/wiki/Download_AC3Filter_tools
      If The Wayback Machine options fail, then go to VideoHelp (maybe go there anyway).
      https://www.videohelp.com/software/AC3-Filter/old-versions
      NOTE - The AC3Filter site has loads of information, which could help you enable other players aside from those below.
      RECOMMENDED PLAYERS
      PC = foobar2000 + DTS plugin component.
      Android Device = Kodi (XBMC) app with DTS etc enabled with passthrough.
      NOTE - foobar2000 with plugin, will play even those not processed with 'valdec.exe'. My 'NeoTV 550' hardware player does the same. My 'Laser' (Android device) with Kodi just emits noise with the FLAC files, if not processed with 'valdec.exe'.
      RECOMMENDED DTS-CD RIPPERS
      http://www.imgburn.com/
      http://www.exactaudiocopy.de/
      OTHER LINKS
      This one of mine tells you a lot more about DTS-CDs, including ripping or burning.
      https://forum.doom9.org/showthread.php?t=172484
      SCREENSHOTS
         

      P.S. I made a brilliant discovery today. Whereas in the past, with PS3 etc, I could not listen to my DTS-CDs via my Surround Sound Headphones, I now can with these files. So it is well worth playing those CDs as files, just for that benefit alone. Overall though, I have future proofed my collection.
×
×
  • Create New...