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 03-07-2011, 01:05 AM   #1
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,076
eac3to, mp4box or mp4creator?

I have come across an mkv file that is 1080p30. I see that eac3to has an option:
Code:
-changeTo24.000    change source fps to "23.976", "24.000", "25.000", ...
mp4box has:
Code:
-fps FPS               forces frame rate for video and SUB subtitles import
and mp4creator has:
Code:
-rate=<fps>             Video frame rate, e.g. 30 or 29.97
and
-timescale=<ticks>      Time scale (ticks per second)
I'd like to modify mkv2tivomp4.bat to account for 1080p content greater than 24fps by utilizing one of the options listed above. The question is, which would be the best one? I've got a version now that correctly parses out and identifies the resolution, scan mode (progressive or interlaced), and framerate, but I'm stuck now trying to figure out if the framerate should be altered at demux time with eac3to, or at remux time with either mp4creator or mp4box.

Any suggestions or experience in doing so?
orangeboy is offline   Reply With Quote
Old 03-07-2011, 08:49 AM   #2
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 2,000
Those options are used for correcting frame rates and aligning audio/video/subtitles. They cannot be use to change the frame rate as that will require re-encoding the video stream. Do you want to get into command line x264 processing and the time it takes?
__________________
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 03-07-2011, 10:11 AM   #3
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,076
Quote:
Originally Posted by jcthorne View Post
Those options are used for correcting frame rates and aligning audio/video/subtitles. They cannot be use to change the frame rate as that will require re-encoding the video stream.
Given the time it took for eac3to to demux, I had hopes that wasn't the case:

Code:
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 1:55:22, 30p /1.001
1: h264/AVC, 1080p30 /1.001 (16:9)
2: DTS, 5.1 channels, 24 bits, 1509kbps, 48kHz
[a02] The ArcSoft and Sonic decoders don't seem to work, will use libav instead.
[a02] Extracting audio track number 2...
[v01] Extracting video track number 1...
[a02] Decoding with libav/ffmpeg...
[a02] Changing FPS from 29.970 to 23.976...
[a02] Encoding AC3 <448kbps> with libAften...
[v01] Creating file "Test.h264"...
[a02] Creating file "Test.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] Changing FPS from 29.970 to 23.976...
[a02] Encoding AC3 <448kbps> with libAften...
[a02] Applying -0.2dB gain...
[a02] Creating file "Test.ac3"...
Video track 1 contains 207451 frames.
eac3to processing took 5 hours, 23 minutes.
Done.
That was on my PIII @850MHz machine. Running MediaInfo against "Test.h264" did indeed still reflect 29.970 fps. I'm in the process of remuxing at the moment, because I am curious as to what actual changes (if any) to the output will be seen. Perhaps I've just now introduced out of sync audio and video?

Quote:
Originally Posted by jcthorne View Post
Do you want to get into command line x264 processing and the time it takes?
While not terribly excited about introducing another step into process of (quickly) creating a TiVo compatible file, running it through x264 appears to be necessary for 1080p > ~24 fps. So sure! If you have some x264 command line recipes that would change fps without introducing too much* or no quality degradation, I'd be interested.

*of course "too much" is subjective. If the process is merely discarding every ~5th frame, my eyes would probably not notice any change in quality. If the process involves an actual transcode, a quality change may become noticeable.

Last edited by orangeboy : 03-07-2011 at 10:26 AM.
orangeboy is offline   Reply With Quote
Old 03-08-2011, 07:50 AM   #4
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 2,000
I guess you are contemplating recoding files for the TivoHD as 1080p30 files play fine on a Premiere, they just get displayed as 1080i. Never tried 1080p30 on the TivoHD as I was only using 720p back then. For all operations of re-encoding I use MeGUI as a front end for x264 so have no command line help to offer you. But if your file took 5 hrs to demux, that machine could easily take DAYS to re-encode.
__________________
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 03-08-2011, 10:16 AM   #5
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,076
Quote:
Originally Posted by jcthorne View Post
I guess you are contemplating recoding files for the TivoHD as 1080p30 files play fine on a Premiere, they just get displayed as 1080i. Never tried 1080p30 on the TivoHD as I was only using 720p back then. For all operations of re-encoding I use MeGUI as a front end for x264 so have no command line help to offer you. But if your file took 5 hrs to demux, that machine could easily take DAYS to re-encode.
Actually, this is for the Premiere. I guess it's not a fps issue then. When I try to playback this file after pushing with pyTivo, it just outright fails with no sound or picture. Streaming it with Streambaby does the same. I had only assumed it was an fps issue because it was the first thing that I noticed was different with files that did playback successfully.

But yeah, I don't usually expect too much "heavy lifting" processor-wise on that box. It's set up with a few harddrives for file serving. My other box that I normally do transcoding on is busy doing just that: transcoding a collection of old files to mp4.
orangeboy is offline   Reply With Quote
Old 03-08-2011, 12:23 PM   #6
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,076
Quote:
Originally Posted by jcthorne View Post
...But if your file took 5 hrs to demux, that machine could easily take DAYS to re-encode.
Time taken when NOT specifying either -slowdown or -changeTo##### eac3to options:

Code:
MKV, 1 video track, 1 audio track, 1:55:22, 30p /1.001
1: h264/AVC, 1080p30 /1.001 (16:9)
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 "test.h264"...
a02 Creating file "test.ac3"...
a02 Clipping detected, a 2nd pass will be necessary.
a02 Starting 2nd pass...
a02 Extracting audio track number 2...
a02 Decoding with libav/ffmpeg...
a02 Encoding AC3 <448kbps> with libAften...
a02 Applying -0.11dB gain...
a02 Creating file "test.ac3"...
Video track 1 contains 207451 frames.
eac3to processing took 1 hour, 45 minutes.
Done.
The difference in the resulting files was the ac3 files with either -slowdown or -changeTo were substantially larger, and had a longer duration, while the h264 files remained the same. I see now that it is a moot point, and absolutely did not have the desired effect that I was looking for.

For now, I'll just concede that those files that would seem to be compliant, but don't successfully playback, will have to be re-encoded with a known set of "good" parameters. So depending on how you look at it, re-encoding will be either more or less expensive* cpu-wise (not monetarily.)

*Coming from a mainframe background, it was desired to have the big iron running as close to 100% cpu utilization as possible, that way the full potential of it's capabilities was realized. With the "squatty boxes", it seemed the higher the cpu utilization, (perceived) performance would take a hit, so keeping cpu utilization lower would be attempted. If the desired goal is 20% utilization, that's 80% of the potential being wasted, which to me would be more expensive since I'm not realizing the full potential. But I ramble on...
orangeboy is offline   Reply With Quote
Old 03-08-2011, 01:17 PM   #7
txporter
One sec, almost done
 
Join Date: Sep 2006
Location: Austin, TX
Posts: 666
Can you post the mediainfo for the file that is causing trouble? I am wondering if it was maybe encoded with a level higher than 4.1.
__________________
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 03-08-2011, 04:59 PM   #8
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,076
Quote:
Originally Posted by txporter View Post
Can you post the mediainfo for the file that is causing trouble? I am wondering if it was maybe encoded with a level higher than 4.1.
Aye. MediaInfo text attached.
Here's my tale at VideoHelp.com. Post #11 from PuzZLer has me a bit confused though:

Quote:
Originally Posted by PuzZLer
Hi again.

Took another look at those settings. I'm actually surprised, and impressed if so, in the TiVo profile including normal b-pyramids - many devices/decoders, including blu-ray, could choke on those without at least a strict version of them.

Interesting.
I'm confused because I don't know what "normal b-pyramids" are, or what profile PuzZLer is referring to!
I'm wondering if it's the sample that I uploaded that contains the normal b-pyramids, and that's why I can't get the file to play on the Premiere.
Attached Files
File Type: txt Test.MediaInfo.txt (9.2 KB, 7 views)
orangeboy is offline   Reply With Quote
Old 03-09-2011, 08:46 AM   #9
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 2,000
Other than the audio needs to be converted to ac3 from dts, I really see nothing wrong with the video section. Donno. Perhaps someone else has ideas. I'd be where you are and just re-encode the file and move on. Perhaps the video stream is not exactly what mediainfo thinks it is and tivo chokes on it. Just a guess as I have had it happen before. If you did not encode the file, you really dont know what internal parameters it was encoded with, despite what mediainfo reports.
__________________
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 03-10-2011, 04:01 PM   #10
txporter
One sec, almost done
 
Join Date: Sep 2006
Location: Austin, TX
Posts: 666
Yeah, I saw your post over on Videohelp.com after posting on here. I don't really see anything wrong with it either. It looks to be the default x264 (medium preset) encoding settings using CRF=18 except reference frames were changed from 3 to 5 and deblock was changed from 0:0 to -2:-1. Perhaps the number of reference frames is a problem?? I think that has been shown to be a problem for blu-ray compliancy. Not sure, I don't mess with it.

Puzzler is referring to this setting (highlighted in red):
Code:
cabac=1 / ref=5 / deblock=1:-2:-1 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
You can see some comments about it here on the MeGUI wiki for x264. He is really just saying that he is surprised that Tivo's decoder don't require the same compliance that blu-ray players do. Not sure why he is surprised though. It seems that blu-ray players are always more strict than other media players. At any rate, I have seen no real problems decoding h.264 that weren't related to framerate, frame size or audio.
__________________
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 03-10-2011, 05:09 PM   #11
orangeboy
yes, I AM orangeboy!
 
Join Date: Apr 2004
Location: Moline, IL
Posts: 4,076
Quote:
Originally Posted by txporter View Post
Yeah, I saw your post over on Videohelp.com after posting on here. I don't really see anything wrong with it either. It looks to be the default x264 (medium preset) encoding settings using CRF=18 except reference frames were changed from 3 to 5 and deblock was changed from 0:0 to -2:-1. Perhaps the number of reference frames is a problem?? I think that has been shown to be a problem for blu-ray compliancy. Not sure, I don't mess with it.

Puzzler is referring to this setting (highlighted in red):
Code:
cabac=1 / ref=5 / deblock=1:-2:-1 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
You can see some comments about it here on the MeGUI wiki for x264. He is really just saying that he is surprised that Tivo's decoder don't require the same compliance that blu-ray players do. Not sure why he is surprised though. It seems that blu-ray players are always more strict than other media players. At any rate, I have seen no real problems decoding h.264 that weren't related to framerate, frame size or audio.
It makes my head hurt trying to think of all the things it could be. Probably because I'm ignorant to most if not all the x264 options represent, even with the x264 wiki to reference! The code snippet above is overwhelming to me.
orangeboy is offline   Reply With Quote
Old 08-19-2012, 03:11 PM   #12
muerte33
Registered User
 
Join Date: Jul 2008
Posts: 83
Are there any tweaks that we can use to help in the synching of audio to video?
My MKV file works great, but the MP4 file that is created is way out of synch.
Thanks!

Never mind, I found another app that seems to take longer to run, but it synchronizes audio/video properly on the MKV file I had.
http://www.videohelp.com/tools/MkvToMp4

Last edited by muerte33 : 08-19-2012 at 09:10 PM.
muerte33 is offline   Reply With Quote
Old 08-20-2012, 08:26 AM   #13
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 2,000
Quote:
Originally Posted by orangeboy View Post
It makes my head hurt trying to think of all the things it could be. Probably because I'm ignorant to most if not all the x264 options represent, even with the x264 wiki to reference! The code snippet above is overwhelming to me.
I looked again at your mediainfo and now see something I missed previously. 5 reference frames is beyond level 4.1 for 1080 resolution content. 4 ref frames is the max. Tivo will choke if this is exceeded. If the level is reported to tivo as 4.1 it will download but not play. If it is indicated as level 5 (which it is) tivo will not download the content.

I also have had poor luck with ANY 1080p30 content. Some plays as 1080i some chokes. I now re-encode any 1080p content >24fps to avoid problems. Its rare anyway and usually encoded wrong when I do see it.

Have you done any further development of the mkv2tivomp4.bat program? I still use it all the time.
__________________
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
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 08:16 PM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |