TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Main TiVo Forums > TiVo Home Media Features & TiVoToGo
TiVo Community
Reply
Forum Jump
 
Thread Tools
Old 05-08-2010, 03:38 PM   #1
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
mkv2tivomp4.bat

Ok, I got a request to post some instructions on how to setup and use the mkv2tivomp4.bat file I posted in another thread. The following instructions are based on Windows XP, what I am running at home. Here it goes:
  1. Create a folder on your computer named mkv2mp4.
  2. Download and install/extract to the mkv2mp4 folder you created the programs that do the actual work:
    • eac3to.exe - Is required to demux (separate) the audio and video streams from the .mkv file.
      and either:
    • mp4creator.exe - Can be used to mux (join) the audio and video streams into a .mp4 file.
      or
    • mp4box.exe - An alternative to mp4creator that may reduce audio/video synchronization errors.
  3. Download and save to the mkv2mp4 folder you created the mkv2tivomp4.v6.txt file attached in this post, and rename that file to mkv2tivomp4.bat.
  4. Create a Shortcut to mkv2tivomp4.bat:
    • Open Windows Explorer and go to the SendTo folder:
      • In Windows NT, 200x, XP: %UserProfile%\Sendto
      • In Vista and Windows 7: %AppData%\Microsoft\Windows\SendTo
    • Right-click on the whitespace in the folder, and select New > Shortcut
    • The dialog will ask for a location. Use Browse... to navigate to the \mkv2mp4 folder you created, and select mkv2tivomp4.bat
    • Give the shortcut a new name if you wish (I usually just leave off the ".bat" part of the name).
    • Click Finish.
  5. Find an .mkv file.
  6. Right-click on it, and SendTo > mkv2tivomp4 (or whatever name you gave it)
  7. A Windows command window will open, with a short narrative concerning "First Run Setup". Read this, and then press any key.
  8. Follow the dialog, answering the questions as you go.
    • Some affirmative answers will lead to more questions, but all in all, it doesn't take too long to finish.
    • You may be prompted for program locations. Typically you will specify the \mkv2mp4 folder you created.
    • If you choose so, and you already have the following installed, there are options for:
    • You can specify an additional user defined post process to occur. Perhaps deleting or moving the original .mkv file? It's up to you...
    • You will be prompted to press any key when the dialog completes, indicating the batch file has been configured.
  9. The .mkv file you initially selected will now be "converted" to a .mp4 file.
  10. Any additional .mkv files you "SendTo" mkv2tivomp4.bat will not require you to perform the setup again.
  11. Multiple files can be sent to the batch file using the SendTo method, and it will process them one at a time. An example would be using Search to find all .mkv files in a folder or on a drive, and then Sending them To the mkv2tivomp4.bat shortcut

Advanced setup: If you add the mkv2mp4 folder to your %path% environment variable, the batch will not prompt you at setup time for the programs that reside in that folder (or any program or command that can be found in %path%).

Any questions you may have, or any bugs you encounter, let me know!
I'm working (not too quickly) on version 7 that will support UNC paths for those files on remote drives, and will better detect filenames that don't play well with batch files...
Attached Files
File Type: txt mkv2tivomp4.v6.txt (44.5 KB, 355 views)
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by orangeboy : 06-20-2010 at 02:31 PM.
orangeboy is offline   Reply With Quote
Old 05-15-2010, 08:30 PM   #2
superflysocal
Registered User
 
Join Date: Nov 2009
Posts: 62
Awesome thanks.

Any chance to create a mp4 with multichannel aac to mp4 with 2 channel aac script?
superflysocal is offline   Reply With Quote
Old 05-15-2010, 08:45 PM   #3
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by superflysocal View Post
Awesome thanks.

Any chance to create a mp4 with multichannel aac to mp4 with 2 channel aac script?
Hmm... It appears that eac3to does support aac:

Code:
Supported source formats:
(1) RAW, (L)PCM
(2) WAV (PCM, DTS and AC3), W64, RF64
(3) AC3, E-AC3
(4) DTS, DTS-ES, DTS-96/24, DTS-HD Hi-Res, DTS-HD Master Audio
(5) MP1, MP2, MP3 audio
(6) AAC audio
(7) MLP, TrueHD, TrueHD/AC3
(8) FLAC
(9) EVO/VOB/(M2)TS and MKV

Decoded audio data can be stored as / encoded to:
(1) RAW, (L)PCM
(2) WAV (PCM only), W64, RF64, AGM
(3) WAVs (multiple mono WAV files, PCM only)
(4) AC3
(5) DTS
(6) AAC
(7) FLAC
I'll see what I can do to work in an aac section. There's certainly the option to go stereo with "-down2", but would 5.1 aac > 5.1 ac3 be better?
Whoops! Spoke too soon. eac3to doesn't support aac natively. I got this error just now:
Code:
MKV, 1 video track, 3 audio tracks, 0:01:40, 24p /1.001
1: h264/AVC, Japanese, 720p23.975
   "AVC (720p)"
2: AAC, Japanese, 2.0 channels, 48khz
   "AAC (Original/Instrumental)"
3: AAC, Japanese, 2.0 channels, 48khz
   "AAC (Miku Hatsune voice)"
4: AAC, Japanese, 2.0 channels, 48khz
   "AAC (Instrumental)"
v01 The video bitstream is encoded in a non-standard framerate.
v01 The video bitstream framerate field doesn't match the container framerate.
a02 Extracting audio track number 2...
a02 Decoding with DirectShow (Nero Audio Decoder 2)...
a02 Getting "Nero Audio Decoder 2" instance failed.
Aborted at file position 1310720.
If there's a CLI program that does aac processing, I'll gladly add it in!
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by orangeboy : 05-15-2010 at 09:10 PM.
orangeboy is offline   Reply With Quote
Old 05-15-2010, 09:25 PM   #4
superflysocal
Registered User
 
Join Date: Nov 2009
Posts: 62
there is a utility in the Popcorn Hour forum called MKV AudioConverter that converts MKV with AAC to MKV with AC3. I think it uses Aften.exe or Faad.exe for that but not sure. Have a look:

http://www.networkedmediatank.com/sh...audioconverter
superflysocal is offline   Reply With Quote
Old 05-17-2010, 09:27 AM   #5
txporter
One sec, almost done
 
Join Date: Sep 2006
Location: Austin, TX
Posts: 666
Quote:
Originally Posted by orangeboy View Post
Hmm... It appears that eac3to does support aac:

Code:
Supported source formats:
(1) RAW, (L)PCM
(2) WAV (PCM, DTS and AC3), W64, RF64
(3) AC3, E-AC3
(4) DTS, DTS-ES, DTS-96/24, DTS-HD Hi-Res, DTS-HD Master Audio
(5) MP1, MP2, MP3 audio
(6) AAC audio
(7) MLP, TrueHD, TrueHD/AC3
(8) FLAC
(9) EVO/VOB/(M2)TS and MKV

Decoded audio data can be stored as / encoded to:
(1) RAW, (L)PCM
(2) WAV (PCM only), W64, RF64, AGM
(3) WAVs (multiple mono WAV files, PCM only)
(4) AC3
(5) DTS
(6) AAC
(7) FLAC
I'll see what I can do to work in an aac section. There's certainly the option to go stereo with "-down2", but would 5.1 aac > 5.1 ac3 be better?
Whoops! Spoke too soon. eac3to doesn't support aac natively. I got this error just now:
Code:
MKV, 1 video track, 3 audio tracks, 0:01:40, 24p /1.001
1: h264/AVC, Japanese, 720p23.975
   "AVC (720p)"
2: AAC, Japanese, 2.0 channels, 48khz
   "AAC (Original/Instrumental)"
3: AAC, Japanese, 2.0 channels, 48khz
   "AAC (Miku Hatsune voice)"
4: AAC, Japanese, 2.0 channels, 48khz
   "AAC (Instrumental)"
v01 The video bitstream is encoded in a non-standard framerate.
v01 The video bitstream framerate field doesn't match the container framerate.
a02 Extracting audio track number 2...
a02 Decoding with DirectShow (Nero Audio Decoder 2)...
a02 Getting "Nero Audio Decoder 2" instance failed.
Aborted at file position 1310720.
If there's a CLI program that does aac processing, I'll gladly add it in!
If you read down at the end of the instruction screen for eac3to, it says you need Nero AAC Encoder for eac3to to encode to AAC. I think you can get it here. I really haven't messed around with it much, but have done 1 or 2 encodes with it just to experiment.
__________________
Tivo Premiere 2TB WD20EARS (lifetime)
TivoHD 1TB WD10EACS + 1TB WD10EVCS Antec MX-1 (lifetime)
TivoHD 1TB WD10EACS (lifetime)
Series2 540 400GB Seagate DB35 (lifetime)
txporter is offline   Reply With Quote
Old 06-20-2010, 07:05 AM   #6
KevinSartori
Registered User
 
Join Date: Jul 2004
Location: Connecticut, USA
Posts: 11
If you're running Windows Vista or 7 the SendTo folder is in a different place. So, for Step 4, Open Windows Explorer and go to this folder instead:

%UserProfile%\AppData\Roaming\Microsoft\Windows\SendTo

BTW, nice work on this orangeboy! Thanks!
KevinSartori is offline   Reply With Quote
Old 06-20-2010, 02:32 PM   #7
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by KevinSartori View Post
If you're running Windows Vista or 7 the SendTo folder is in a different place. So, for Step 4, Open Windows Explorer and go to this folder instead:

%UserProfile%\AppData\Roaming\Microsoft\Windows\SendTo

BTW, nice work on this orangeboy! Thanks!
Thanks Kevin - Instructions updated!
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 06-22-2010, 12:44 PM   #8
nickels
opinionated dope
 
nickels's Avatar
 
Join Date: Jan 2010
Location: Warrington, PA
Posts: 4,401
I tried this yesterday and something went wrong. My video framerate is too fast and the audio doesn't sync due to this video issue. I am using Windows 7 and I tried both options (mp4creator and mp4box). HELP PLEASE!
__________________
D'oh!
nickels is offline   Reply With Quote
Old 06-23-2010, 02:45 AM   #9
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by nickels View Post
I tried this yesterday and something went wrong. My video framerate is too fast and the audio doesn't sync due to this video issue. I am using Windows 7 and I tried both options (mp4creator and mp4box). HELP PLEASE!
Does it happen consistently, or just one file? Does the .mkv playback ok before being "converted" to .mp4?

If it's consistent, about halfway down the script (line 395), you'll see a section that looks like this:
Code:
:Done
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: This section ends the processing of this batch file.                      ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
EXIT /B
If you would, make a small modification:
Code:
:Done
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: This section ends the processing of this batch file.                      ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
SET
PAUSE
EXIT /B
That will show all the variables (unfortunately, even System variables, but I can weed through those), and PAUSE. Copy what's on the screen (right click on the script's Title bar > Edit > Select All > Press <ENTER>) and PM me that information. A copy of the script's .ini file may be handy for me, too...
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 06-23-2010, 07:12 PM   #10
ajayabb
Registered User
 
ajayabb's Avatar
 
Join Date: Jan 2007
Location: Moorestown NJ
Posts: 427
The Nero aac encoder link is here. http://www.nero.com/eng/downloads-ne...-aac-codec.php

I am not sure how to incorporate it into mkv2mp4. I extracted it to the mkv2mp4 folder but not sure if that will work
__________________
A.J.


2 Roamio Plus Tivos
1 Tivo Mini
Running Pytivo and Streambaby
ajayabb is offline   Reply With Quote
Old 06-23-2010, 07:55 PM   #11
Spenner
Registered User
 
Join Date: Mar 2006
Posts: 82
Your batch is awesome. Can I put in a little request for it to include a Preferred Language setting? That way if your preferred language is Eng, and a video has two audio tracks Eng and something else, it will use the highest-scoring English track even if another track has a higher score.
Spenner is offline   Reply With Quote
Old 06-24-2010, 10:45 AM   #12
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by ajayabb View Post
The Nero aac encoder link is here. http://www.nero.com/eng/downloads-ne...-aac-codec.php

I am not sure how to incorporate it into mkv2mp4. I extracted it to the mkv2mp4 folder but not sure if that will work
Cool!
I downloaded the zip (after entering nothankyou@domain.com ), and will take a look at the exes inside. I imagine this will add additional processing time if invoked, but the benefits could outweigh that...
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 06-24-2010, 10:58 AM   #13
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by Spenner View Post
Your batch is awesome. Can I put in a little request for it to include a Preferred Language setting? That way if your preferred language is Eng, and a video has two audio tracks Eng and something else, it will use the highest-scoring English track even if another track has a higher score.
Uh-oh. Is the following falling through?
Code:
FOR /F "tokens=1,2 delims=,/ " %%A IN ('FINDSTR "%aLang% %sLang%" %SourceInfoName%') DO (
	SET track_ID=%%A
	SET track_type=%%B
	IF DEFINED track_type CALL :!track_type! !track_ID! !track_type! %aLang% %sLang%
)
The above should select the audio/subtitle language set during the "First Run Setup" dialog:
Code:
:Audio_Language
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: This section prompts the user for the preferred audio language.           ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
CLS
ECHO.
ECHO * Audio language 
SET /P aLang=Enter your preferred audio track language: 
SET aLang= %aLang%
CALL :TitleCase aLang
SET aLang=%aLang: =%
IF NOT DEFINED aLang GOTO Audio_Language
Unless the the language reported is literally "Eng", and not "English"? I may be able to substring the language variable to the first the characters, but I'm not sure that would work for all language abbreviations...
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 06-24-2010, 03:51 PM   #14
nickels
opinionated dope
 
nickels's Avatar
 
Join Date: Jan 2010
Location: Warrington, PA
Posts: 4,401
I just installed a newer version of pyTivo and the MKV files are now transferring normally without the need for conversion. So, I am done troubleshooting and thanks!
__________________
D'oh!
nickels is offline   Reply With Quote
Old 06-25-2010, 07:36 AM   #15
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 1,916
pyTivo cannot push an mkv to tivo without conversion to mpeg2. Only an mp4 can be pushed to tivo containing an h.264 video stream.....So far.
__________________
Current : Roamio Base with 2TB drive and 2 Premieres and a mini. OTA. kmttg, pyTivo, running with a 78TB Synology 1511 NAS....serving up the world.

Setup help for pytivo under windows:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jcthorne is offline   Reply With Quote
Old 07-20-2010, 02:06 PM   #16
KevinG
Registered User
 
Join Date: Sep 2003
Location: Mt. Laurel, NJ.
Posts: 278
I've just started using this wonderful tool...thank you for providing it!

Now, a question.

I've currently got sabnzbd listening to RSS feeds, grabbing files, and calling a batch file which pushes said files automatically to one of my tivos.

What I'd like to do is insert this process before the push.

Has anyone successfully automated that entire process? Interesting tidbits that I'm thinking about...how to only run the process on MKVs. How to delete the MKVs only upon successful conversion to MP4?

Thanks again.
-Kevin
KevinG is offline   Reply With Quote
Old 07-20-2010, 03:54 PM   #17
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by KevinG View Post
I've just started using this wonderful tool...thank you for providing it!

Now, a question.

I've currently got sabnzbd listening to RSS feeds, grabbing files, and calling a batch file which pushes said files automatically to one of my tivos.

What I'd like to do is insert this process before the push.

Has anyone successfully automated that entire process? Interesting tidbits that I'm thinking about...how to only run the process on MKVs.
I had a reply drafted, but ended up dropping it all and starting over. I think the toughest thing to overcome with the RSS feeds is determining the filename of the extracted result of the feed. According to the SABnzbd User-Script Wiki, the only filename that is passed is the original .nzb. However, in your "push" bat, you may still be able to use the passed SABnzbd arguments, similar to this:

Code:
FOR /F "delims=" %%a IN ('DIR /B /S /A-D "%~1\*.mkv"') DO mkv2tivomp4.bat "%%a"
That should search all the directories and sub-directories for mkv files, rooted in the "The final directory of the job (full path)", or %1.

Quote:
Originally Posted by KevinG View Post
How to delete the MKVs only upon successful conversion to MP4?

Thanks again.
-Kevin
Yep, that's a logic fail on my part.
I "post-process" regardless of whether a valid .mp4 file is created or not, instead of just jumping to the next mkv file (if there is one). That should be an easy thing to fix though, and I'm VERY glad you brought it up! I don't like code that executes when it shouldn't.

In the meantime, around line 294 begins a "cleanup" section. You could add a line in the group of "IF EXIST"s that would delete the original .mkv file:

Code:
IF EXIST "%SourceFullPath%" DEL "%SourceFullPath%"
Although I thought about adding that as the default action, I've found some mkv source files that didn't play on my TiVos after being remuxed into the mp4 container. Having the original mkv file around to run mediainfo on made it helpful to figure out "why".
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 07-20-2010, 04:40 PM   #18
KevinG
Registered User
 
Join Date: Sep 2003
Location: Mt. Laurel, NJ.
Posts: 278
Quote:
Originally Posted by orangeboy View Post
I think the toughest thing to overcome with the RSS feeds is determining the filename of the extracted result of the feed. According to the SABnzbd User-Script Wiki, the only filename that is passed is the original .nzb.
Yes, this is tough, but I've already solve that part. I run a batch program which calls a perl program which does a "glob" on the directory and finds the "newest" mkv file. Then I use curl to push it to the tivo. This only fails when I grab an "older" nzb and the resulting mkv isn't the "newest" one in the folder. I've tried getting perl to recognize the "write" datestamp, instead of the "creation" datestamp, but it doesn't seem to work on Windows (but works fine on linux).

Anyway, I'll have to look into your other suggestions...maybe I'll just call mkv2tivo inside my perl script...

Thanks again!
KevinG is offline   Reply With Quote
Old 11-24-2010, 06:18 PM   #19
zabolots
Registered User
 
Join Date: May 2007
Location: NW Chicago Suburbs
Posts: 71
Great batch file. I've used it on a few MKV's and it worked great, but I've got a couple of others that are giving me issues. Here's the output:
Code:
The format of the source file could not be detected.FINDSTR: Cannot open Boardwa
lk.Empire.S01E01.mkv.info.txt
FINDSTR: Cannot open Boardwalk.Empire.S01E01.mkv.info.txt
FINDSTR: Cannot open Boardwalk.Empire.S01E01.mkv.info.txt
FINDSTR: Cannot open Boardwalk.Empire.S01E01.mkv.info.txt
Valid video stream not found. Please review the information in "Boardwalk.Empire
.S01E01.mkv.info.txt".
Unfortunately there is no .txt file to get add'l info. There is briefly a .tmp file but it is deleted when the batch file ends so I have no idea what it contains.

Here's the mediainfo output for the file:

Code:
General #0
Complete name        : \temp\DVD\Boardwalk.Empire.S01E01.mkv
Format               : Matroska
File size            : 2.19 GiB
PlayTime             : 1h 12mn
Bit rate             : 4330 Kbps
Writing application  : x264.exe
Writing library      : mkv2rls x264-tv version built on 2010 jul 11

Video #0
Codec                : MPEG-4 AVC
Codec/Info           : MPEG4 ISO advanced profile
PlayTime             : 1h 12mn
Width                : 1280 pixels
Height               : 720 pixels
Aspect ratio         : 16/9
Frame rate           : 23.976 fps

Audio #0
Codec                : AC3
Codec/Info           : Dolby AC3
Channel(s)           : 6 channels
Sampling rate        : 48 KHz
Title                : English
Language             : English

Text #0
Codec                : UTF-8
Codec/Info           : UTF-8 Plain Text
Title                : English
Language             : English

zabolots is offline   Reply With Quote
Old 11-24-2010, 06:22 PM   #20
Spenner
Registered User
 
Join Date: Mar 2006
Posts: 82
Quote:
Originally Posted by zabolots View Post
Great batch file. I've used it on a few MKV's and it worked great, but I've got a couple of others that are giving me issues. Here's the output:
Code:
The format of the source file could not be detected.FINDSTR: Cannot open Boardwa
lk.Empire.S01E01.mkv.info.txt
FINDSTR: Cannot open Boardwalk.Empire.S01E01.mkv.info.txt
FINDSTR: Cannot open Boardwalk.Empire.S01E01.mkv.info.txt
FINDSTR: Cannot open Boardwalk.Empire.S01E01.mkv.info.txt
Valid video stream not found. Please review the information in "Boardwalk.Empire
.S01E01.mkv.info.txt".
I've gotten that sometimes too. It's some kind of file or folder permission issue on the source. Just copy the mkv file to another folder and try it again, and that usually works for me.
Spenner is offline   Reply With Quote
Old 11-25-2010, 07:05 AM   #21
zabolots
Registered User
 
Join Date: May 2007
Location: NW Chicago Suburbs
Posts: 71
Quote:
Originally Posted by Spenner View Post
I've gotten that sometimes too. It's some kind of file or folder permission issue on the source. Just copy the mkv file to another folder and try it again, and that usually works for me.
I don't think it's a permissions issue for me since every MKV I've tried to convert with this batch file (both successfully and unsuccessfully) were all in the same folder. Plus, it does briefly create the .tmp file I mentioned so I know that it is not being preventing from creating files in the folder where the MKV file is located.
zabolots is offline   Reply With Quote
Old 11-25-2010, 07:19 AM   #22
zabolots
Registered User
 
Join Date: May 2007
Location: NW Chicago Suburbs
Posts: 71
I tried to rewrite the MKV into an MP4 container with ffmpeg. It doesn't help me one bit, but perhaps somebody will see something here to figure out a way to fix these files so they'll work with the mkv2tivomp4 process:

Code:
c:\Temp\DVD>ffmpeg -i Boardwalk.Empire.S01E01.mkv -vcodec copy -acodec copy -ac
2 Boardwalk.Empire.S01E01.mp4
FFmpeg version SVN-r21085, Copyright (c) 2000-2010 Fabrice Bellard, et al.
  built on Jan  8 2010 06:05:02 with gcc 4.2.4
  configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-ming
w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --e
nable-avisynth --enable-gpl --enable-version3 --enable-zlib --enable-bzlib --ena
ble-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libthe
ora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid
--enable-libschroedinger --enable-libx264 --enable-libopencore_amrwb --enable-li
bopencore_amrnb
  libavutil     50. 7. 0 / 50. 7. 0
  libavcodec    52.45. 0 / 52.45. 0
  libavformat   52.46. 0 / 52.46. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 8. 0 /  0. 8. 0
[matroska @ 0x13abc40]MAX_READ_SIZE:5000000 reached
[matroska @ 0x13abc40]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (48000/
1001) -> 23.98 (24000/1001)
Input #0, matroska, from 'Boardwalk.Empire.S01E01.mkv':
  Duration: 01:12:19.00, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: h264, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 47.62 fp
s, 23.98 tbr, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 6 channels, s16
    Metadata:
      description     : English
    Stream #0.2(eng): Subtitle: 0x0000
    Metadata:
      description     : English
[mp4 @ 0x2d80050]track 1: codec frame size is not set
Output #0, mp4, to 'Boardwalk.Empire.S01E01.mp4':
    Stream #0.0(eng): Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=2-
31, 48k tbn, 23.98 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 6 channels
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Could not write header for output file #0 (incorrect codec parameters ?)

zabolots is offline   Reply With Quote
Old 11-25-2010, 11:51 AM   #23
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
I think the problem is this:

Code:
Video #0
Codec                : MPEG-4 AVC
Codec/Info           : MPEG4 ISO advanced profile
PlayTime             : 1h 12mn
Width                : 1280 pixels
Height               : 720 pixels
Aspect ratio         : 16/9
Frame rate           : 23.976 fps
This looks like an mpeg4 video codec, and the mkv2mp4 bat only looks for compatible h264 video codecs.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 11-25-2010, 01:37 PM   #24
sirfergy
Registered User
 
Join Date: May 2002
Posts: 280
If you have an mkv with h264 and AC3 you can use the copy flags on ffmpeg.
sirfergy is offline   Reply With Quote
Old 11-26-2010, 01:03 PM   #25
zabolots
Registered User
 
Join Date: May 2007
Location: NW Chicago Suburbs
Posts: 71
Quote:
Originally Posted by sirfergy View Post
If you have an mkv with h264 and AC3 you can use the copy flags on ffmpeg.
I tried that as noted in post #22 above, but as mentioned by orangeboy, the file is not h264 but rather some MPEG4 codec.

It's strange that even the ffmpeg encoding profile used by kmttg won't work with these files. I don't understand why the MPEG4 codec in this file is so unfriendly.

Last edited by zabolots : 11-26-2010 at 02:34 PM.
zabolots is offline   Reply With Quote
Old 11-30-2010, 09:14 AM   #26
tjtv
Registered User
 
Join Date: Jul 2007
Posts: 24
Hi,

I've been using this script successfully for a few weeks, but I've run into this problem on several files lately. It seems to crash, regardless of whether I use mp4box or mp4creator. Thanks for your help!

Script Output
:
eac3to v3.24
command line: "C:\Users\Tom\Downloads\mkv2mp4tivo\eac3to.exe" "Inception.2010.1080p.BluRay.DTS.x264.mkv" 1: "Inception.2010.1080p.BluRay.DTS.x264.h264" 2: "Inception.2010.1080p.BluRay.DTS.x264.ac3" -448
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 2:28:08, 24p /1.001
1: h264/AVC, 1920x800 24p /1.001
2: DTS, 5.1 channels, 24 bits, 1509kbps, 48kHz
[a02] The ArcSoft and Sonic decoders don't seem to work, will use libav instead.
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[a02] Decoding with libav/ffmpeg...
[a02] Encoding AC3 <448kbps> with libAften...
[v01] Creating file "Inception.2010.1080p.BluRay.DTS.x264.h264"...
[a02] Creating file "Inception.2010.1080p.BluRay.DTS.x264.ac3"...
[a02] Clipping detected, a 2nd pass will be necessary. <WARNING>
[a02] Starting 2nd pass...
[a02] Extracting audio track number 2...
[a02] Decoding with libav/ffmpeg...
[a02] Encoding AC3 <448kbps> with libAften...
[a02] Applying -2.59dB gain...
[a02] Creating file "Inception.2010.1080p.BluRay.DTS.x264.ac3"...
Video track 1 contains 213097 frames.
eac3to processing took exactly 16 minutes.
Done.

Extracted audio and video tracks found.
Combining to create MP4 file...

AC3 import - sample rate 48000 - 5.1 channels
Assertion failed: nal_start, file media_tools/media_import.c, line 4244

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Here is the mediainfo for this file:
General
UniqueID : 204683534229430445538714122649473598499 (0x99FC9D61897AE224A2A3F1F55A374423)
Complete name : K:\Movies\Inception (2010)\Inception.2010.1080p.BluRay.DTS.x264.mkv
Format : Matroska
File size : 14.2 GiB
Duration : 2h 28mn
Overall bit rate : 13.7 Mbps
Encoded date : UTC 2010-11-22 20:33:05
Writing application : mkvmerge v4.4.0 ('Die Wiederkehr') built on Oct 31 2010 21:52:48
Writing library : libebml v1.0.0 + libmatroska v1.0.0

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Muxing mode : Header stripping
Codec ID : V_MPEG4/ISO/AVC
Duration : 2h 28mn
Bit rate : 13.4 Mbps
Width : 1 920 pixels
Height : 800 pixels
Display aspect ratio : 2.40:1
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.364
Stream size : 13.9 GiB (98%)
Language : English

Audio
ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Muxing mode : Header stripping
Codec ID : A_DTS
Bit rate mode : Constant
Bit rate : 32.0 Kbps
Channel(s) : 1 channel
Channel positions : Mono
Sampling rate : 0
Bit depth : 16 bits
Compression mode : Lossy
Language : English
tjtv is offline   Reply With Quote
Old 11-30-2010, 09:30 AM   #27
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by tjtv View Post
Hi,

I've been using this script successfully for a few weeks, but I've run into this problem on several files lately. It seems to crash, regardless of whether I use mp4box or mp4creator. Thanks for your help!
Code:

Script Output:
eac3to v3.24
command line: "C:\Users\Tom\Downloads\mkv2mp4tivo\eac3to.exe"  "Inception.2010.1080p.BluRay.DTS.x264.mkv" 1: "Inception.2010.1080p.BluRay.DTS.x264.h264"   2: "Inception.2010.1080p.BluRay.DTS.x264.ac3"  -448 
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 2:28:08, 24p /1.001
1: h264/AVC, 1920x800 24p /1.001
2: DTS, 5.1 channels, 24 bits, 1509kbps, 48kHz
[a02] The ArcSoft and Sonic decoders don't seem to work, will use libav instead.
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[a02] Decoding with libav/ffmpeg...
[a02] Encoding AC3 <448kbps> with libAften...
[v01] Creating file "Inception.2010.1080p.BluRay.DTS.x264.h264"...
[a02] Creating file "Inception.2010.1080p.BluRay.DTS.x264.ac3"...
[a02] Clipping detected, a 2nd pass will be necessary.  <WARNING>
[a02] Starting 2nd pass...
[a02] Extracting audio track number 2...
[a02] Decoding with libav/ffmpeg...
[a02] Encoding AC3 <448kbps> with libAften...
[a02] Applying -2.59dB gain...
[a02] Creating file "Inception.2010.1080p.BluRay.DTS.x264.ac3"...
Video track 1 contains 213097 frames.
eac3to processing took exactly 16 minutes.
Done.

Extracted audio and video tracks found.
Combining to create MP4 file...

AC3 import - sample rate 48000 - 5.1 channels
Assertion failed: nal_start, file media_tools/media_import.c, line 4244

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Here is the mediainfo for this file:
General
UniqueID                         : 204683534229430445538714122649473598499 (0x99FC9D61897AE224A2A3F1F55A374423)
Complete name                    : K:\Movies\Inception (2010)\Inception.2010.1080p.BluRay.DTS.x264.mkv
Format                           : Matroska
File size                        : 14.2 GiB
Duration                         : 2h 28mn
Overall bit rate                 : 13.7 Mbps
Encoded date                     : UTC 2010-11-22 20:33:05
Writing application              : mkvmerge v4.4.0 ('Die Wiederkehr') built on Oct 31 2010 21:52:48
Writing library                  : libebml v1.0.0 + libmatroska v1.0.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L4.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 5 frames
Muxing mode                      : Header stripping
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 2h 28mn
Bit rate                         : 13.4 Mbps
Width                            : 1 920 pixels
Height                           : 800 pixels
Display aspect ratio             : 2.40:1
Frame rate                       : 23.976 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.364
Stream size                      : 13.9 GiB (98%)
Language                         : English

Audio
ID                               : 2
Format                           : DTS
Format/Info                      : Digital Theater Systems
Muxing mode                      : Header stripping
Codec ID                         : A_DTS
Bit rate mode                    : Constant
Bit rate                         : 32.0 Kbps
Channel(s)                       : 1 channel
Channel positions                : Mono
Sampling rate                    : 0
Bit depth                        : 16 bits
Compression mode                 : Lossy
Language                         : English
You may want to try upgrading mp4box. I found this post where other users encountered the same (or similar) error, and this post with an apparent change to resolve the problem:

Quote:
MP4Box build has been changed today. with this build I cannot reproduce anymore the problems mentioned above. But with all the GPAC problems in the last weeks I assume we will find new (or old) problems soon.
Just curious: What happens when mp4creator is used?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 11-30-2010, 10:32 AM   #28
tjtv
Registered User
 
Join Date: Jul 2007
Posts: 24
Quote:
Originally Posted by orangeboy View Post
Just curious: What happens when mp4creator is used?
This is the error log when mp4creator is used:
eac3to v3.24
command line: "C:\Users\Tom\Downloads\mkv2mp4tivo\eac3to.exe" "Inception.2010.1080p.BluRay.DTS.x264.mkv" 1:

"Inception.2010.1080p.BluRay.DTS.x264.h264" 2: "Inception.2010.1080p.BluRay.DTS.x264.ac3" -448
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 2:28:08, 24p /1.001
1: h264/AVC, 1920x800 24p /1.001
2: DTS, 5.1 channels, 24 bits, 1509kbps, 48kHz
[a02] The ArcSoft and Sonic decoders don't seem to work, will use libav instead.
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[a02] Decoding with libav/ffmpeg...
[a02] Encoding AC3 <448kbps> with libAften...
[v01] Creating file "Inception.2010.1080p.BluRay.DTS.x264.h264"...
[a02] Creating file "Inception.2010.1080p.BluRay.DTS.x264.ac3"...
[a02] Clipping detected, a 2nd pass will be necessary. <WARNING>
[a02] Starting 2nd pass...
[a02] Extracting audio track number 2...
[a02] Decoding with libav/ffmpeg...
[a02] Encoding AC3 <448kbps> with libAften...
[a02] Applying -2.59dB gain...
[a02] Creating file "Inception.2010.1080p.BluRay.DTS.x264.ac3"...
Video track 1 contains 213097 frames.
eac3to processing took exactly 16 minutes.
Done.

Extracted audio and video tracks found.
Combining to create MP4 file...

AC3 import - sample rate 48000 - 5.1 channels
AVC-H264 import - frame size 1920 x 800 at 23.976 FPS
Import results: 213097 samples - Slices: 1836 I 45216 P 166045 B - 1 SEI - 1734 IDR
Stream uses B-slice references - max frame delay 2
Converting to ISMA Audio-Video MP4 file...
Saving to Inception.2010.1080p.BluRay.DTS.x264.mp4: 0.500 secs Interleaving
Error: I/O Error

Comparing source filesize: 15215333482 with output filesize: 8997294080

Generated mp4 file is within acceptable file size.
Deleting any workfil
tjtv is offline   Reply With Quote
Old 11-30-2010, 11:40 AM   #29
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,075
Quote:
Originally Posted by tjtv View Post
This is the error log when mp4creator is used:
Code:
eac3to v3.24
command line: "C:\Users\Tom\Downloads\mkv2mp4tivo\eac3to.exe"  "Inception.2010.1080p.BluRay.DTS.x264.mkv" 1: 

"Inception.2010.1080p.BluRay.DTS.x264.h264"   2: "Inception.2010.1080p.BluRay.DTS.x264.ac3"  -448 
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 2:28:08, 24p /1.001
1: h264/AVC, 1920x800 24p /1.001
2: DTS, 5.1 channels, 24 bits, 1509kbps, 48kHz
[a02] The ArcSoft and Sonic decoders don't seem to work, will use libav instead.
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[a02] Decoding with libav/ffmpeg...
[a02] Encoding AC3 <448kbps> with libAften...
[v01] Creating file "Inception.2010.1080p.BluRay.DTS.x264.h264"...
[a02] Creating file "Inception.2010.1080p.BluRay.DTS.x264.ac3"...
[a02] Clipping detected, a 2nd pass will be necessary.  <WARNING>
[a02] Starting 2nd pass...
[a02] Extracting audio track number 2...
[a02] Decoding with libav/ffmpeg...
[a02] Encoding AC3 <448kbps> with libAften...
[a02] Applying -2.59dB gain...
[a02] Creating file "Inception.2010.1080p.BluRay.DTS.x264.ac3"...
Video track 1 contains 213097 frames.
eac3to processing took exactly 16 minutes.
Done.

Extracted audio and video tracks found.
Combining to create MP4 file...

AC3 import - sample rate 48000 - 5.1 channels
AVC-H264 import - frame size 1920 x 800 at 23.976 FPS
Import results: 213097 samples - Slices: 1836 I 45216 P 166045 B - 1 SEI - 1734 IDR
Stream uses B-slice references - max frame delay 2
Converting to ISMA Audio-Video MP4 file...
Saving to Inception.2010.1080p.BluRay.DTS.x264.mp4: 0.500 secs Interleaving
Error: I/O Error

Comparing source filesize: 15215333482 with output filesize: 8997294080

Generated mp4 file is within acceptable file size.
Deleting any workfil
Do you have ~42.6 GiB available on your harddrive?

14.2 GiB for original .mkv file,
14.2 GiB for extracted .h264 and .ac3 files, and
14.2 GiB for new .mp4 file
42.6 GiB free space needed.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
orangeboy is offline   Reply With Quote
Old 11-30-2010, 01:41 PM   #30
tjtv
Registered User
 
Join Date: Jul 2007
Posts: 24
Thanks for your help. I cleared up some disk space, and updated to a newer version of mp4box and the script now works again!
tjtv is offline   Reply With Quote
Reply
Forum Jump




Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Advertisements

TiVo Community
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skins by: Relivo Media

(C) 2013 Magenium Solutions - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVoŽ is a registered trademark of TiVo Inc. This site is not owned or operated by TiVo Inc.
All times are GMT -5. The time now is 04:47 PM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |