View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Feb 23, 2008 5:48 pm 
Offline
Joined: Sun Sep 09, 2007 5:58 pm
Posts: 17
Everybody has probably been able to watch their MPEG-2 recordings on a PS3 via UPnP for a while now, without any real tweaking. I wanted to cut commercials first -- I got the standard VMWare machine set up to run under my Windows box, and do my commercial flagging there. Then I just have to transcode. However, if you transcode to MPEG-4, you wind up with a NUV container, which the PS3 doesn't understand. I *thought* I could work around this with the new(ish) lossless MPEG-2 --> MPEG-2 transcode, but running that seems to "break" the files, at least as far as the PS3 is concerned.

Per this discussion it looks like maybe before the transcode, it's a "Program Stream" format MPEG-2 recording, and after, it's a "Transport Stream". I don't really know what either of those means, but it seems to make sense :lol:.

So I tried a few things. I did an MPEG-4 transcode, then used DSMyth to export to an AVI. This played on my XBox 360, but not on my Playstation 3 (PS3 Divx support is pretty picky). I tried to do the lossless transcode manually, using the command line specified by "Daniel" in the thread I linked to above. That still wouldn't play back on the PS3, though.

I really thought I'd cracked it, though. I found this on the Wiki. It says it's out of date, but that ffmpeg line appears to "clean up" the recording and repackage it in a format the PS3 can understand. So, here's what I've got:

Code:
mythtranscode -c %CHANID% -s %STARTTIME% -p autodetect -m -e dvd -l; ffmpeg -i %DIR%/%FILE%.tmp -acodec copy -vcodec copy %DIR%/%FILE%.FIXED.mpg; rm %DIR%/%FILE%.tmp; mv %DIR%/%FILE%.FIXED.mpg %DIR%/%FILE%; mythcommflag -c %CHANID% -s %STARTTIME% --rebuild --clearcutlist


The first line does the commercial removal (-e dvd says to use MPEG-2 output). The ffmpeg line makes a copy in a new container. Then, we remove the mythtranscode output, and move the ffmpeg output to overwrite the original recording. The mythcommflag command rebuilds the information for the frontend.


I tested it, and it looks like I'm *almost* there. If I take the output of that command, copy it to my Windows PC, and stream it over TVersity, it works like a charm. Unfortunately, if I stream it directly from the Myth box, it takes a really long time to start playing back (I think it's filling a buffer or something), and I have to restart the backend because even after I stop playback, it hogs the whole CPU. I might just live with things as they are, and tweak it to save the cut .mpg file directly to my Windows box. That still feels hacky, though. If anybody has a better way, I'd be glad to hear it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 21, 2008 6:12 pm 
Offline
Joined: Sun Sep 09, 2007 5:58 pm
Posts: 17
OK, little update. At this point, I've been doing the lossless commercial removal, then using AutoMKV to create a DivX (Xvid, actually, I think) transcode. This works... OK, but takes a lot of time and energy to set up, and just generally isn't worth it most of the time. I have a bit more information (kind of) that I thought might help somebody if they wanted to help me. MediaInfo gives me:

Code:
Format                       : MPEG-2 Program
Format/Family                : MPEG-2
File size                    : 1.13 GiB
PlayTime                     : 30mn 57s
Bit rate                     : 5215 Kbps

Video #0
Codec                        : MPEG-2 Video
Codec/Family                 : MPEG-V
Codec profile                : Main@Main
Codec settings, Matrix       : Standard
PlayTime                     : 30mn 57s
Bit rate mode                : CBR
Bit rate                     : 4469 Kbps
Nominal bit rate             : 6000 Kbps
Width                        : 720 pixels
Height                       : 480 pixels
Display Aspect ratio         : 4/3
Frame rate                   : 29.970 fps
Standard                     : NTSC
Chroma                       : 4:2:0
Interlacement                : Top Field First

Audio #0
Codec                        : MPEG-1 Audio layer 2
PlayTime                     : 30mn 57s
Bit rate mode                : CBR
Bit rate                     : 384 Kbps
Channel(s)                   : 2 channels
Sampling rate                : 48 KHz
Resolution                   : 16 bits
Video0 delay                 : -178ms
Writing library              : Xing (new)


Code:
Format                       : MPEG-2 Program
Format/Family                : MPEG-2
File size                    : 1.56 GiB
PlayTime                     : 44mn 54s
Bit rate                     : 4960 Kbps

Video #0
PlayTime                     : 44mn 54s
Bit rate                     : 4232 Kbps

Audio #0
Codec                        : MPEG-1 Audio layer 2
PlayTime                     : 44mn 54s
Bit rate mode                : CBR
Bit rate                     : 384 Kbps
Channel(s)                   : 2 channels
Sampling rate                : 48 KHz
Resolution                   : 16 bits
Video0 delay                 : -9ms
Writing library              : Xing (new)



The first plays on PS3, the second (with lossless commercial removal) does not.


Anyway, I'm still tinkering, but so far it looks like my best solution may be to do what I said above (creating a user job to invoke mythtranscode, then ffmpeg), altering it to just export a copy somewhere that I can easily move it to my Windows box. If anybody cares.


Top
 Profile  
 
 Post subject: My Observations
PostPosted: Fri Apr 04, 2008 2:30 pm 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
My Son has a PS3 40 gig model on the network.
We have a couple of observations on that interfacing with the Mythtv server (as it is called by the PS3)

When you open that under media, it show you have Recordings, Audio and Video
Recording is the programs that are captured from the cards.
Audio is any mps 3 music I placed on the Mythtv box
Video is any movies or shows I have transcoded usually with the myt2xvid3 jobs.

Recordings will give me a good list of the recordings that are there, However, if I have edited commercials and used LossLess transcoding (AutoDetect) it tries to play then tells me the file is corrupted.

Recordings that have commercials in them playback fine, great picture and audio, but still have the commercials.

Audio - Lists all the mp3s and they play back fine.

Video - This lists every recording I have transcoded via the script and plays those back excellent.

So the only issue I have is that playback of Commercial cut and LossLess Transcoded files.

Thoughts?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 04, 2008 7:17 pm 
Offline
Joined: Sun Sep 09, 2007 5:58 pm
Posts: 17
Heh, that's creepy -- I used to go by "Big Brother" back in my BBS days. Anyway, I'm not sure if I made this clear above, but when you do the "lossless" transcode on the Myth box, it strips a lot of stuff out of the container as well. You can put a lot of it back in with the ffmpeg command I mention above ("copy" for acodec and vcodec), but I still can't seem to get it to play from my Myth box directly even after that. If, however, I copy those files to my Windows box, and stream through TVersity, I get better results. It's the best workaround I have so far. Here's the little script I wrote:

Code:
FOR %%F IN (%*) DO "C:\Program Files\automkv\exe\BeSweet\ffmpeg.exe" -i %%F -acodec copy -vcodec copy "D:\archives\TV\ps3-TV\%%~nF.mpg"
cd "C:\Program Files\TVersity\Media Server\"
mshare.exe D:/archives/tv
pause


I group-select a bunch of commercial-cut recordings out of my /myth/pretty directory, then drag them to that batch file. In a few minutes, TVersity is sharing them. It's not perfect, but it's pretty damn good.

(ETA: Of course, you need to set your own paths to your Windows box ffmpeg executable and recording store, if you want to use that batch file.)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 05, 2008 7:37 am 
Offline
Joined: Sun Feb 26, 2006 11:34 pm
Posts: 83
Location: Toronto, ON, Canada
Ghengis wrote:
I group-select a bunch of commercial-cut recordings out of my /myth/pretty directory, then drag them to that batch file. In a few minutes, TVersity is sharing them. It's not perfect, but it's pretty damn good.


This is a great tutorial. Thanks for the all the work documenting your work!

A bit OT, but I am using TVersity for upnp and was originally copying my recordings to my Windows box, but found that I could map my /myth/pretty directory as Z:/pretty and add it to the TVersity media directories. It saved a lot of time copying and HD space on the windows machine.

Victor


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 05, 2008 10:58 am 
Offline
Joined: Sun Sep 09, 2007 5:58 pm
Posts: 17
I'll have to try that -- I *think* if I copy over a /myth/pretty recording _with commercials removed_ (lossless transcode), then stream it over TVersity, the PS3 will barf on it. I think you have to run that ffmpeg command to re-package it before it will stream correctly. And in that case, I'm better off the way I am. My Windows box is much faster than the Myth box, so I want to run ffmpeg on the Windows box. If I have to copy the files over the network anyway to "crunch" them, I might as well store the output on my Windows box too...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 06, 2008 7:44 pm 
Offline
Joined: Sun Feb 26, 2006 11:34 pm
Posts: 83
Location: Toronto, ON, Canada
I think TVersity uses ffmpeg in it's transcoding on the Windows box. I haven't checked to see if you can control the command lines.

Victor

_________________
Backend: Core 2-Quad CPU, 4GB RAM, 3TB
2 PVR-500, 1 HDHomerun
FE1: Zotac IONITX-B-E, w/2GB HD
FE2: Zotac MAG


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 30, 2008 6:18 pm 
Offline
Joined: Tue Apr 11, 2006 6:31 pm
Posts: 31
Location: Austin, TX
For some reason I can't get

Code:
mythtranscode -c %CHANID% -s %STARTTIME% -p autodetect -m -e dvd -l; ffmpeg -i %DIR%/%FILE%.tmp -acodec copy -vcodec copy %DIR%/%FILE%.FIXED.mpg; rm %DIR%/%FILE%.tmp; mv %DIR%/%FILE%.FIXED.mpg %DIR%/%FILE%; mythcommflag -c %CHANID% -s %STARTTIME% --rebuild --clearcutlist
to run. I have tried everything including breaking up the commands and no matter what it just stays queued. I have also tried running the commands seperately just to see if I can get sound from the ps3, but no dice. Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 30, 2008 8:07 pm 
Offline
Joined: Sun Sep 09, 2007 5:58 pm
Posts: 17
What I've been doing since I posted this is editing in-place and doing a standard "lossless transcode" (commercial removal), then running my "PS3 fix" batch file on a Windows box. It's in my April 04 post in this thread. It isn't as elegant, but generally I'll just let a week or so of "backlog" accumulate, edit them all at once, then box-select them and drag them to my batch file. I kind of abandoned the custom job, because I had trouble getting it to work myself.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 30, 2008 8:42 pm 
Offline
Joined: Tue Apr 11, 2006 6:31 pm
Posts: 31
Location: Austin, TX
I am windows free so I guess I will have to come up with something else. No ideas on why the custom job wouldn't run? I've tried this one as well, but it also just stays queued as well.
Code:
mythtranscode -c %CHANID% -s %STARTTIME% -p autodetect -m -e dvd -l; mv %DIR%/%FILE% %DIR%/%FILE%.old; mv %DIR%/%FILE%.tmp %DIR%/%FILE%; mythcommflag -c %CHANID% -s %STARTTIME% --rebuild --clearcutlist


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 30, 2008 9:51 pm 
Offline
Joined: Tue Apr 11, 2006 6:31 pm
Posts: 31
Location: Austin, TX
Lol. I got the command working now. For some reason jobs in slot 4 will not run. Also I stumbled for a while because when I copied and pasted the command with vnc it would capitalize everything causing it to not work. So now I am at a point where I can hear audio on the recordings, but cannot fast forward. It seems like the seek table is corrupt or something like that.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu