AVS Forum banner

Status
Not open for further replies.
21 - 40 of 389 Posts

·
Registered
Joined
·
979 Posts
Discussion Starter · #21 ·
1. The former. Just changes the detect parameters.


2. It should work on any I-frame.



There were docs on events but Molehill appears to be offline.
 

·
Registered
Joined
·
65 Posts
Quote:
Originally posted by wen-king
I can't get my mplex (linux/unix) to recognize the

output of rtvconvert. In my simple script for making

DVD, mplex is used to add VOB header to mpeg2

file before dvdauthor (linux/unix). Is adding VOB

header perhaps something that can be incorporated

into a future release of rtvconvert?
mplex recognizes the elementary streams just fine. Use -d in rtvconvert to write demuxed streams and use -f 8 or -f 9 in mplex for dvd.


mplex -f 8 -o dvd.mpg rtvprog1.m2v rtvprog1.mp2
 

·
Registered
Joined
·
8,143 Posts
agent-x care to clue me in on what you've done with the audio stream? I'm very curious to see how your findings compare with what I know. I'm sure you know more, I'm very curious. =) The clock values and PTS times always seem wrong, but I haven't figured it out exactly. It's almost like the MPEG system clock isn't running at exactly 90Mhz?? I've been confused by this for a while and never figured out exactly what is going on.




On another note...

Is it possible to evtdump, rtvedit and import that file back into DVA for serving? I've tried to do both of the following and neither worked when imported back into DVA...


evtdump

rtvedit using output from evtdump

import that new file, no luck


evtdump

rtvedit using output form evtdump

rtvconv with output from rtvedit

import

still no luck


both result in the replay hanging and rebooting.

NOTE: I did this at 1:30AM so I might have screwed something up. I tried to follow the read me as best I could.
 

·
Registered
Joined
·
65 Posts
Jeff D,


I've added a PS demux filter in rtvconvert that acts like a P-STD demuxer which is needed to synchronize elementary streams from MPEG-2 program streams. Just demultiplexing PS alone isn't sufficient, yet this is what most DVD authoring programs will do and they will break end-to-end timing unless the elementary streams are already aligned. DVD players are P-STDs, which is why the raw RTV streams play in sync, but may be out of sync after authoring. You need to have one of these filters somewhere in your path and depending on your system setup and tools, it might be coming from DirectShow or embedded in your encoder or editor. This version of rtvconvert has a simple one built-in.


MPEG-2 system clock is 27MHz. PTS clock is 90KHz. The SCR extensions don't seem to be used in RTV mpegs, so the timing model only relies on a 90KHz clock (which is perfectly fine). I haven't seen this clock drift out of tolerance and am curious what makes you say the "PTS times always seem wrong".


I'm not sure what problem you're having with importing and streaming. I haven't seen any issues other than the known ones. TCP stack settings and back-to-back DVA streaming are known to cause problems, but they're not anything specific to edited/converted streams. You might find some useful information in the DVArchive event log. Also, if you're editing a downloaded show, you don't technically need to re-import the stream - you can just replace the fileset that's already there (rename the originals if you want to keep them) and update the guide entry.
 

·
Registered
Joined
·
712 Posts
OK, stupid newbie question on these tools. I have a show called "Tiny Planets". I've downloaded it to DVA and extracted the files:

Tiny Planets.mpg

Tiny Planets.ndx

Tiny Planets.evt


I am just not getting the documentation on how to simply process the file so that the audio doesn't get out of sync.


I created a text file called TP.txt which contains the text:
Tiny Planets.mpg

E



I then go to DOS and run:
rtvedit.exe tp.txt.


This process gives me the output:
Target: iny Planets.mpg

New Program Time: 000:00.000

Edit Time: 000:00.172



I look in my directory and low and behold, a 2k file called "iny Planets.mpg" now exists. I'm figuring this is what is supposed to happen, the first character being trimmed off. I'm not sure why the file is so small. I then try to run:
rtvconvert "iny planets.mpg" DVDTinyPlanets.mpg


The resulting DVDTinyPlanets.mpg file is about 2k and unusable.


What am I doing wrong and are there other directions somewhere that are clearer for a newbie like me?


(On a side note, I also tried the process against the "Baby Looney Tunes.mpg" file but when I try to run rtvedit against that file it says that it doesn't recognize the command "B".)
 

·
Registered
Joined
·
979 Posts
Discussion Starter · #28 ·
Quote:
I created a text file called TP.txt which contains the text:

Tiny Planets.mpg

E
That should be:
Code:
Code:
FTiny Planets.mpg
E
The resulting file will be Tiny Planets1.mpg, process that file with rtvconvert for authoring.
 

·
Registered
Joined
·
8,143 Posts
Quote:
Originally posted by agent-x
I've added a PS demux filter in rtvconvert that acts like a P-STD demuxer which is needed to synchronize elementary streams from MPEG-2 program streams. Just demultiplexing PS alone isn't sufficient, yet this is what most DVD authoring programs will do and they will break end-to-end timing unless the elementary streams are already aligned. DVD players are P-STDs, which is why the raw RTV streams play in sync, but may be out of sync after authoring. You need to have one of these filters somewhere in your path and depending on your system setup and tools, it might be coming from DirectShow or embedded in your encoder or editor. This version of rtvconvert has a simple one built-in.
I think I follow, but I know very little about the differences between T-STD and P-STD. What you're saying is the timing relationship between the two streams is lost on a plain ol' split the stream demux. So, it would be best to split the streams with rtvconvert -d to go to dvd source files. Is the only time the rtvconvert demuxer used when using the -d option?

Quote:


MPEG-2 system clock is 27MHz. PTS clock is 90KHz. The SCR extensions don't seem to be used in RTV mpegs, so the timing model only relies on a 90KHz clock (which is perfectly fine). I haven't seen this clock drift out of tolerance and am curious what makes you say the "PTS times always seem wrong".
Right, sorry, as I understand it the PTS clock is derived from the STC.


My comment on the PTS always being wrong is based off several things some of which can be explained by your previous description of the demux process and how the PC can screw with the streams.

Quote:


I'm not sure what problem you're having with importing and streaming. I haven't seen any issues other than the known ones. TCP stack settings and back-to-back DVA streaming are known to cause problems, but they're not anything specific to edited/converted streams. You might find some useful information in the DVArchive event log. Also, if you're editing a downloaded show, you don't technically need to re-import the stream - you can just replace the fileset that's already there (rename the originals if you want to keep them) and update the guide entry.
One of the crazy things I'm trying to use rtvconvert for....

I don't know if you saw that some of us are having problem on the 5k recordings where video freezes for 2-4 seconds on playback. After the video starts back up the audio may go out of sync. I've noticed the part of the stream where the replay freezes has a "good" video and audio stream. Demuxing and remuxing the mpeg the remuxed stream plays fine on the replay but all sync is lost. I'm curious rtvconvert can fix what I suspect is garbage in the source recording. The error output I mentioned earlier gives a file offset, but not a time offset, so I'm having a tough time figuring out if the two are one in the same.


Thanks!
 

·
Registered
Joined
·
3 Posts
I've been wanting to use my replay as a DVD server for a while, and now these tools have allowed me to (mostly) do so.


On Linux, I am using transcode and mpeg2enc to transcode the vob into a 480x480 mpeg2 stream using the settings for an SVCD. Mplex then muxes the elementary streams for me, and rtvconvert allows me to import them successfully into DVarchive and stream back to my 5040.


Now for my questions. First, I have not been able to figure out how to create one large mpg from the vobs that will work with rtvconvert. The only settings that seem to work are the ones for SVCD, and this forces mplex to split the output at approx 730 Mb boundaries. Does anyone have any suggestions on how to create one large mpeg that can be converted with rtvconvert?


Here is the transcode command I am using:

transcode -H 10 -a 0 -x vob

-i path/to/vobs -w 2088 -F 5,'-B 180 -S 736 -I 0 -g 9 -G 18 ' --export_asr 3 -b 128 -s 1.419 -V -f 24,1 -

B 0,30,8 -y mpeg2enc,mp2enc -E 48000 --psu_mode --nav_seek /path/to/navlog/created/by/dvdrip --no_split -o

/outputfile/foo


Here is the mux:

mplex -f 4 -V foo.m2v foo.mpa -o foo-%d.mpg


Does anyone have any suggestions on how to create one large mpeg that can be converted with rtvconvert? When I have tried to prevent the splitting, I have ended up with files that rtvconvert would not handle, failing with an invalid stream id message. The svcd settings above are the only ones I've found thus far that appear to set the corrrect stream ID.


Also, if anyone tries to use the above method there is a quirk to getting the files to work correctly. The first file of the series can be rtvconverted and imported directly. The subsequent files must be rtvconverted then rtvedited to make them work. The edit step appears to trim around 250ms from the beginning of the clip, and if it is left out the clip will cause my 5040 to hang and reboot.


Thanks for all the great tools, and as things stand I am already VERY happy with my new ability to stream my DVD's to my replays. If anyone has suggestions on how to improve the above process, or can shed some light on what causes some of the behavior I'm describing, I would be quite grateful.
 

·
Registered
Joined
·
870 Posts
QUESTION:


NOTE - JBARR JUMP IN HERE IN YOU HAVE ANY ADDITONAL THOUGHTS


Could it be possible to do on the fly conversion of MP3 and stream the resulting file with DVArchive? Would be cool if a program like DVArchive could search your computer for MP3's and offer them for streaming where the ReplayTV would see them. Then if a particular song is called it would be converted and streamed on the fly.
 

·
Registered
Joined
·
59 Posts
Here is the batch file icecow was refering to I had foundit a while back in another thread (cant seem to find it anymore) Thanks to the original author.......


evtdump %1 > evt.txt

rtvedit -t1 evt.txt

pause


Put these lines in a text file called edit.bat, then drag the evt file for the mpeg you wish to edit and drop it on the icon for this batch file, it will edit the file and drop it into the same directory as the original.


(I forgot, this might be obvious, but for this to work you must drop the utilities somewhere in your path ie. c:\\windows\\system32)
 

·
Registered
Joined
·
979 Posts
Discussion Starter · #33 ·
Quote:
I think I follow, but I know very little about the differences between T-STD and P-STD. What you're saying is the timing relationship between the two streams is lost on a plain ol' split the stream demux. So, it would be best to split the streams with rtvconvert -d to go to dvd source files. Is the only time the rtvconvert demuxer used when using the -d option?
Actually it will work either way with release 4, the -d option actually just tells rtvconvert to leave the streams separate instead of re-muxing them (since most DVD authoring programs want them separated anyway).
 

·
Registered
Joined
·
65 Posts
Quote:
Originally posted by jingcha

Are there similar tools for the 4K series, I have 4504 RTV. Please help
I do think it's possible, but I don't have access to a 4K series box to make it work. We tried to include 4K support the second release, but debugging via proxy doesn't work for this. If I can find one for cheap, I might look at it again.

Quote:
Originally posted by Jeff D

I think I follow, but I know very little about the differences between T-STD and P-STD. What you're saying is the timing relationship between the two streams is lost on a plain ol' split the stream demux. So, it would be best to split the streams with rtvconvert -d to go to dvd source files. Is the only time the rtvconvert demuxer used when using the -d option?
T-STD isn't relevant here. It's another end-to-end model designed to solve a completely different set of problems for digital broadcast. In P-STD, the original timing has to be propogated to maintain sync. That doesn't mean the original timestamps have to be used, but the timing relationship across streams has to be maintained. This is already done by rtvedit since the first release and is needed to stream back to your RTV in sync.


If your DVD authoring program can take elementary streams (not all of them do), you are better off using -d to write them. The new demuxer is still used internally whether you use -d or not, so the .mpg written out can be imported in your DVD authoring program as well (it will just have to demux it again).

Quote:
Originally posted by Jeff D

Demuxing and remuxing the mpeg the remuxed stream plays fine on the replay but all sync is lost. I'm curious rtvconvert can fix what I suspect is garbage in the source recording.
rtvconvert won't fix this. If there are any errors in the stream, they will get propogated through. You can try to cut out the offending part with rtvedit, but if the sync error is in the source stream this will have no effect. If the error is caused by a decoder reset, this has a good chance of fixing it.
 

·
Registered
Joined
·
65 Posts
Quote:
Originally posted by versed

When I have tried to prevent the splitting, I have ended up with files that rtvconvert would not handle, failing with an invalid stream id message. The svcd settings above are the only ones I've found thus far that appear to set the corrrect stream ID.
When you are coming from vobs, make sure your audio is converted from ac3 to mp2 and you only have a single audio track. The invalid stream id is almost always an ac3 stream or a second audio track. When you run mplex, make sure you get this and I think you should be okay:


INFO: [mplex] MPEG AUDIO STREAM: c0

INFO: [mplex] Audio version : 1.0

INFO: [mplex] Layer : 2


Quote:
Originally posted by Loren Kruse.

Could it be possible to do on the fly conversion of MP3 and stream the resulting file with DVArchive?
Possible. Even mpeg-2 streaming conversion could be possible. But the .ndx would have to be faked and you can't use standard filesystem calls to access or move through the stream. You'd likely need to have a server plug-in interface in DVArchive, which to my knowledge does not exist.


Quote:
Originally posted by mastafunk

evtdump %1 > evt.txt

rtvedit -t1 evt.txt

pause
If you're using edit times from evtdump, you really shouldn't be using -t1 in rtvedit. That is, unless you like having cut times being wrong. ;) That's pretty cool though, add a notepad evt.txt between evtdump and rtvedit and it'll automatically pop up a window to tweak the script in and automatically run when you close it.
 

·
Registered
Joined
·
712 Posts
Quote:
Originally posted by Lee Thompson
That should be:

Code:
Code:
[B]FTiny Planets.mpg
E[/B]
The resulting file will be Tiny Planets1.mpg, process that file with rtvconvert for authoring.
Worked perfect. I needed to do 6 files. Can they be batched? I tried

Code:
Code:
FTiny Planets.mpg
FTiny Planets1.mpg
FTiny Planets2.mpg
FTiny Planets3.mpg
FTiny Planets4.mpg
E
This only seemed to do the last file. No big deal, but curious if the command can be batched like this?

Thanks again! DVD authored like a champ!!
 

·
Registered
Joined
·
8,143 Posts
agent-x, do you have any way to convert the byte offset reported back in the error to a time code so it can be edited out?


The errror reported was an unsupported stream, type B5. I don't know what a b5 stream is, not "normal" audio or video...
 

·
Registered
Joined
·
65 Posts
Quote:
Originally posted by Jeff D

agent-x, do you have any way to convert the byte offset reported back in the error to a time code so it can be edited out?


The errror reported was an unsupported stream, type B5. I don't know what a b5 stream is, not "normal" audio or video...
No easy way, but you can convert the byte offset manually using the .ndx file to within a half second. Use a hex editor on the .ndx and look for the entry just before the given offset. Then find the associated time for that entry (it'll be 8 bytes long in nanoseconds). I can have the tools report the last known time in the next release.


B5 indicates an mpeg-2 extension in the video stream. You're somewhere in the middle of a video frame, which means your RTV dropped some video buffers out of the encoder. :(
 

·
Registered
Joined
·
62 Posts
Quote:
Originally posted by Loren Kruse.
QUESTION:


Could it be possible to do on the fly conversion of MP3 and stream the resulting file with DVArchive? Would be cool if a program like DVArchive could search your computer for MP3's and offer them for streaming where the ReplayTV would see them. Then if a particular song is called it would be converted and streamed on the fly.
I think so, I have started 2 threads on this already ( http://www.avsforum.com/avs-vb/showt...t=mp3+replaytv ) and posted the suggestion to sourceforge under the dvarchive forum. So much for talk, the work I have done (just a little scripting) is spelled out here ( http://www.xnet.com/~stuart/mp3replaytv ). But for all of it to work (stream it to a replaytv) we needed 2 things. First rtvconvert needed to be rewritten to be able to use named pipes... Hey hey, this latest version allows that! Tell your "friend" thanks Lee! Second, we need a tool to spool the mpeg 2 back to the replaytv unit. And DVArchive is my pick. There is no source code on line as (I think) it had a "CVS moment" over at sourceforge.net. So I am waiting for version 3.0 (current version 2.1) to see how the streaming is done in Java.


But, even after these two mile stones, there are other problems to work on. Right now, I have seen a buffering problem into / out-of a program called mp2enc. I am using it to change a .wav file to a .mpg (level 2) audio file. I noticed that the buffering is such that playback will stop while mp2enc processes a bunch of data (I think 4K bytes) then continue again once mp2enc is done. I hope I will discover or someone will point out a way to avoid this stuttering.


Also, it appears that rtvconvert does not create the .ndx and .evt files until the streaming process is finished. Well, to be exact the .ndx is written to once for about each minute of material and once at the end. The .evt file is written to at the end. These files are necessary for DVArchive, well if you play back the mpeg locally on your computer they don't appear to be necessary. But, if you try to play back an mpeg an a RepalyTV after deleting them from the DVArchive directory the ReplayTV will crash (freeze up). So, in order to stream MP3s for playback on a ReplayTV - some code some where will have to analyze the MP3 and generate these files before the streaming process starts. Can anyone fill me in on the format of a .ndx or .evt file?
 

·
Registered
Joined
·
8,103 Posts
I'm a bit confused about video file formats. There are some Maya (3d program) tutorials I have which are in quicktime format. I have some others in .avi format.


I'd like to watch the tutorials on the TV w/Replay awhile I follow along on the laptop


Over the last few years I've had alot of "who's on first..." (classic comedy routine reference) conversations with people about video formats.


I'm told things like ".avi is an MPEG..." when I try to figure out the minutia (details) differences between the two.


I've read all the readme's of RTVtools. I can't determine (or perhaps remember reading) how to get .avi files and quicktime files to an acceptible form where it can then be converted with RTVtools for playback via DVA to my TV screen.


hobbling questions I'd just like to get completely straight:

1)can RTVtools handle .avi files? (I can hear the ax falling already)is there any other extentions that are acceptable MPGS in disguise?

2)Is there a command line program that will convert 1>quicktime 2>.avi(if applicable), 3>.divx, 4>any other common interent to an MPG2 which can then be used by RTVtools.


I have unpromised intentions to figure out some stuff and report back anything good. Need to be babystepped though misconceptions first.


cow
 
21 - 40 of 389 Posts
Status
Not open for further replies.
Top