Author |
Message |
atomclock
|
Posted: Thu Mar 18, 2004 6:44 pm |
|
Joined: Wed Mar 10, 2004 6:40 pm
Posts: 54
|
I was wondering if it was possible to transcode from RTjpeg to mpeg-2. I have a Bt878 tv card and a PVR 350 and I would like to be able to transcode the Bt878's RTjpeg output to mpeg-2 so that I can use the mpeg decoder on the PVR 350. Myth only seems to give the option to convert to mpeg-4. If it is possible could someone please tell me where I can find instructions.
Thanks you.
|
|
Top |
|
 |
atomclock
|
Posted: Sun Mar 21, 2004 10:02 pm |
|
Joined: Wed Mar 10, 2004 6:40 pm
Posts: 54
|
Bump...

|
|
Top |
|
 |
cesman
|
Posted: Sun Mar 21, 2004 11:16 pm |
|
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location:
Fontana, Ca
|
Have you searched or posted to the MythTV mailing list?
_________________ cesman
When the source is open, the possibilities are endless!
|
|
Top |
|
 |
atomclock
|
Posted: Tue Mar 23, 2004 12:56 pm |
|
Joined: Wed Mar 10, 2004 6:40 pm
Posts: 54
|
Well, I checked the MythTV mailing list and they seem to be more concerned with real-time recording of mpeg-2 instead of transcoding RTjpeg to mpeg2. Oh well, I can always buy a PVR 250 to replace my Bt878.
|
|
Top |
|
 |
Dinki
|
Posted: Tue Mar 23, 2004 12:58 pm |
|
Joined: Fri Dec 26, 2003 2:25 pm
Posts: 244
|
atomclock wrote: Oh well, I can always buy a PVR 250 to replace my Bt878.
Why not post your question to the mailing list first? The guys there can be really helpful. They don't bite!  Might save you a couple of bucks too.
|
|
Top |
|
 |
cdfr
|
Posted: Wed Oct 06, 2004 8:27 pm |
|
Joined: Tue Sep 14, 2004 8:52 am
Posts: 19
|
Same problem here. I can record from the bttv but it does not play fast enough on the pvr 350 tv out.
Did anyone was successfull with autotranscoding to mpeg2 ?
|
|
Top |
|
 |
spectro
|
Posted: Fri Oct 08, 2004 9:58 am |
|
Joined: Thu Sep 16, 2004 11:43 am
Posts: 21
|
atomclock wrote: I was wondering if it was possible to transcode from RTjpeg to mpeg-2. I have a Bt878 tv card and a PVR 350 and I would like to be able to transcode the Bt878's RTjpeg output to mpeg-2 so that I can use the mpeg decoder on the PVR 350. Myth only seems to give the option to convert to mpeg-4. If it is possible could someone please tell me where I can find instructions.
Thanks you.
Try the following in mysql:
update recordingprofiles set videocodec = "MPEG-2" where name = "RTjpeg/MPEG4";
Not sure what would happen but it worth the try 
|
|
Top |
|
 |
yamez
|
Posted: Sat Apr 08, 2006 7:24 pm |
|
Joined: Sat Aug 21, 2004 1:12 am
Posts: 32
Location:
Sydney, Australia
|
I want to transcode DVB-T to MPEG-2 simply to save space but also have recordings ready to burn with Mythburn DVD, if need be, without manually using nuvexport. SD DVB-T recordings in Australia take up 4GB per hour. Transcoding to MPEG-4 works well but does not work with Mythburn DVD. With the new lossless transcoding working well, can the parameters that are passed to MythTranscode be changed to allow a set bitrate to MPEG-2? I've searched through the MythTV lists with no answers. I have tried the previous posts suggestion but it does not work.
I have started to experiment with user jobs using nuvexport to transcode to MPEG-2. However when I replace the exported file in place of the original recording in /myth/tv, the recording plays well but is badly pixelated when fast forwarding/rewinding.
|
|
Top |
|
 |
Greg Frost
|
Posted: Sat Apr 08, 2006 7:36 pm |
|
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location:
Adelaide, Australia
|
I don't believe there is any mpeg2 encoding done by myth. The mpeg2 lossless transcode just cuts sections out (and does some fixing at the frayed edges cause by the cutting). This means the bitrate will stay the same.
The pixelation you see with your nuvexport transcoded files is probably because myth stores a table of frame number to byte offset for each file. Trancoding without updating this table will cause it to jump to some random point in the file, which will cause errors in playback (although it will quickly resync with the file).
|
|
Top |
|
 |
yamez
|
Posted: Sat Apr 08, 2006 7:54 pm |
|
Joined: Sat Aug 21, 2004 1:12 am
Posts: 32
Location:
Sydney, Australia
|
Greg Frost wrote: I don't believe there is any mpeg2 encoding done by myth. When I run mythtranscode -h from the console one of the options is -m for "Perform MPEG2 to MPEG2 transcode". Is this setting for lossless transcoding? Or can a bitrate be set by setting up a new profile? I would like to know where these options are passed so I can play around. Quote: The pixelation you see with your nuvexport transcoded files is probably because myth stores a table of frame number to byte offset for each file. Trancoding without updating this table will cause it to jump to some random point in the file, which will cause errors in playback (although it will quickly resync with the file).
Thanks for that. Short question, hopefully short answer, can the table be updated? Maybe I should get a larger HDD.... 
|
|
Top |
|
 |
Greg Frost
|
Posted: Sat Apr 08, 2006 8:08 pm |
|
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location:
Adelaide, Australia
|
yamez wrote: When I run mythtranscode -h from the console one of the options is -m for "Perform MPEG2 to MPEG2 transcode". Is this setting for lossless transcoding? Or can a bitrate be set by setting up a new profile? Yes that setting is for the lossless MPEG2 transcoding. That is the only way to keep it as mpeg-2. You can only select bitrates if you transcode to RTJPEG or MPEG4. yamez wrote: can the table be updated?
Yes. I think you can call mythcommflag --rebuild to rebuild the seek table. This was described by nigelpearson once. The table automatically gets updated if you do a transcode of any sort.
|
|
Top |
|
 |
yamez
|
Posted: Fri Apr 21, 2006 10:06 am |
|
Joined: Sat Aug 21, 2004 1:12 am
Posts: 32
Location:
Sydney, Australia
|
I've worked out how to setup nuvexport to run from a command line. Now I need help to create a script to run nuvexport to DVD as a user job. The reasons why I want to do this, I will explain...
1. To reduce space taken up on the HDD. DVB-T in Australia takes up to 4GB per hour. I know the transcode feature in MythTV to MPEG-4 does this well, but read on...
2 When converted by nuvexport, the files are in a "DVD ready format", they can be played back by the MythTV frontend ( tested ) AND be copied to a Windows/MAC/Linux box for easy DVD conversion AND faster conversion to DVD via MythBurn ( cannot do that from MPEG-4 ). No need for DSMyth filters. DVD MPEG-2 is "lingua franca"
3. Playback friendly from the shared /myth/tv folder ( i.e. NOT NUV ) on NON MythTV boxes ( e.g. XBOX, XBOX 360, Windows, MAC, DLink, etc ). You can set the bitrate for MPEG-2 to what you see as "acceptable quality". BTW, I know why NUV is used in MythTV, I'm not bashing it. Again, no need for DSMyth filters. Again, DVD MPEG-2 is "lingua franca".
4. Less size in MPEG-2 ( lower bitrate ) also makes for bandwidth friendly conditions for Wi-Fi. I use Wi-Fi alot.
5. Will still support Lossless Transcode for cutting adverts out and editing. I've tested it.
Steps needed... ( which I have tested manually )
Run nuvexport wth necessary command lines. ( already worked that out )
Run mythcommflag --rebuild ( using the new file created by nuvexport, thanks Greg Frost)
mv "new file" "old file" to delete and replace. ( may be an issue of sharing violation if someone is watching the file when being deleted )
I would apprieciate being pointed in the right direction for creating a script. From what I have seen most people use perl. I will write a wiki entry for this when sucessful. I see it as a valid feature for DVB/HDTV users.
|
|
Top |
|
 |
yamez
|
Posted: Wed Jul 12, 2006 6:57 am |
|
Joined: Sat Aug 21, 2004 1:12 am
Posts: 32
Location:
Sydney, Australia
|
To anyone who is interested I have been running a method that does what the previous posting wanted, shortly thereafter. Crude, but does the job and has several months of testing...
After recording, 3 MythTV user jobs transcode DVD-T MPEG-2 to DVD compatible MPEG-2 at a combined AV bitrate of 2.5Mb/s to allow 4 hours on one DVD-R 4.5 GB and replace the original recording. The quality is good for playback on an analog TV. You can set the bitrate to what you see as good. The whole idea is to save space for TV recordings, be Wi-Fi friendly, be DVD ready and have recordings in a UNIVERSAL format. See previous posting.
Only thing to sort out is updating the MySQL DB after transcoding , to reflect the new file size.
|
|
Top |
|
 |
yamez
|
Posted: Sat Jul 15, 2006 12:05 am |
|
Joined: Sat Aug 21, 2004 1:12 am
Posts: 32
Location:
Sydney, Australia
|
1. I use nuvexport which comes with KnoppMyth, to encode the tv recordings, so make sure that works first. I'm using R5B7 and I had to update ffmpeg using apt-get for DVD encoding to work in nuvexport. I had to change nuvexport to recognize 16:9 DVB recordings properly. The files to change...
/usr/local/share/nuvexport/mythtv/nuvinfo.pm
/usr/local/share/nuvexport/export/ffmpeg/DVD.pm
/usr/local/share/nuvexport/export/transcode/DVD.pm
Look for and change these...
$info{'audio_sample_rate'} = 48000
$info{'aspect'} = '16:9';
$self->{'out_aspect'} = 1.7777
See details for nuvexport at http://www.knoppmythwiki.org/index.php? ... xportToDVD
2. Change nuvexport default settings by editing /etc/nuvexportrc to your desired bitrate and other settings. I changed the following.
<generic>
path = /myth/tmp
use_cutlist = no
multipass = yes
noise_reduction = no
deinterlace = yes
crop = no
</generic>
<DVD>
v_bitrate = 2300
a_bitrate = 192
quantisation = 1
</DVD>
Digital recordings do not need noise reduction and interlaceing can be rid of. The default path is not important. This is only used when running nuvexport without any command line options. I changed the /etc/nuvexportrc as root. You can copy a .nuvexportrc file into your mythtv home directory and nuvexport will use that instead of the /etc/nuvexportrc global setting.
3. Create a tmp folder in /myth/tv. This is where temporary encodings are kept. Make sure user mythtv has read/write permission to this folder.
4. Run mythtv-setup. Goto General->Next->Next->Next->Next->enable Allow Transcoding jobs and Allow User Jobs #1, #2, #3->Next->
Enter the following for user job #1.
Description: Transcode DVB to DVD
Command: nuvexport --infile /myth/tv/%FILE% --mode DVD --nice 19 --path /myth/tv/tmp/
Enter the following for user job #2.
Description: Overwrite Original Recording
Command: mv -f /myth/tv/tmp/*.mpg /myth/tv/%FILE%
Enter the following for user job #3.
Description: Rebuild Keyframe Index
Command: mythcommflag --file /myth/tv/%FILE% --sleep --rebuild
->Finish
5. From the Myth Frontend goto Utilities/Setup->Setup->TV Settings->General->Next->Enable User Jobs #1, #2, #3->Next->Finish
This step is optional, you can always enable/disable user jobs manually per recording schedule or manually run these user jobs on a recording from the watch recordings listing. I also have auto-transcode after recording and lossless transcoding enabled. Lossless transcoding is great for ad removal and editing. I don't think it is necessary to lossless transcodre after recording although it does convert DVB transport stream to DVB program stream which reduces the size slighty and is very fast. Look under Utilities/Setup->Setup->TV Settings->Recording Profiles for those settings.
Last edited by yamez on Sun Jul 16, 2006 4:29 am, edited 1 time in total.
|
|
Top |
|
 |
joekanenas
|
Posted: Sun Jul 16, 2006 2:18 am |
|
Joined: Mon Nov 07, 2005 10:12 pm
Posts: 6
|
Thanks Yamez. this gives me another option besides mytharchive which does not seem to want to run on my plain vanilla knoppmyth.
Dimitris
|
|
Top |
|
 |