 |
Using vlc to downconvert a pchdtv .ts file |
 |
Posted: Sun Mar 06, 2005 4:18 pm |
|
|
| johnclubvec |
|
|
| |
| Joined: 17 Nov 2004 |
| Posts: 20 |
| Location: Cambridge, Massachusetts |
|
|
 |
 |
 |
|
I like the vlc media player (http://www.videolan.org) a lot. I have found a one-line command using vlc which converts a recorded pchdtv .ts file into a very good quality lower-density format, with good audio sync throughout, and without using any hard-drive hogging intermediate or temporary files. And I've run it successfully on a long (one-hour) file. I won't claim that the converted file meets the specs for a standard mpeg or dvd-type file, because I don't know anything about formats or how to tell them apart. I only know the result looks and sounds pretty good. I'd be curious if others would try this thing out and see what it could do for them.
The bad news is that on my 2.6 GHz Pentium 4 using 99% of CPU, the conversion takes longer than real-time (that is, longer than it takes to play the original file). The good news, as mentioned, is that the video and audio quality are awfully good, it uses no temporary files, and the converted file is only about 15% the size of the original.
vlc gives me this information about the converted file, in case my betters can interpret it:
main debug: using demux2 module "ps"
libmpeg2 debug: 720x416, aspect 768000, 29.971 fps
main debug: picture in 720x416, chroma 0x30323449 (I420), aspect ratio 16:9
mpeg_audio: MPGA channels:2 samplerate:48000 bitrate:192
In the example here I will call the original .ts file "input.ts." It is a 1080i file recorded from my local PBS-HD channel. We'll also say that we are interested in processing subchannel 3 of that file (which will appear in vlc as "--program"). I will call the output file "output.mpg." Here is the command-line, followed by a glossary of terms. Please note that on my machine, I must run vlc as root to do this conversion. The following is all one long command line:
vlc "input.ts" --program 3 --sout '#transcode{vcodec=mpgv,vb=2048,scale=0.375,acodec=mpga,ab=192,channels=2}:standard{access=file,mux=ps,url="output.mpg"}'
Glossary of terms:
"vcodec=mpgv" I believe this means the video codec will be MPEG2.
"vb=2048" The video bitrate in kb/second.
"scale=0.375" Only one number is used to scale both horizontal and vertical. I picked the width to be the controlling factor. The original width is 1920, so 720/1920 = 0.375.
"acodec=mpga" The audio codec will be mpg.
"ab=192" The audio bitrate in kb/second.
"channels=2" Two audio channels.
The rest of the line has to do with outputting to the file.
Again, I welcome comments. |
|
|
|
|
 |
 |
Re: Using vlc to downconvert a pchdtv .ts file |
 |
Posted: Wed Apr 20, 2005 9:42 pm |
|
|
|
Thanks for the post - this worked well for me using VLC 7.2.
However, during transcode I am preserving the AC3 stream and the right-rear and center channels are being swaped.
I tried upgrading to the latest VLC version (I think I read somewhere that the AC3 problem was fixed), but the transcode command no longer works:
vlc "army-navy.ts" --program 2 --sout '#transcode{vcodec=mpgv,vb=4096,scale=0.375,acodec=a52,ab=384,channels=6}:standard{access=file,mux=ps,url="army-navy-6c.mpg"}'
VLC media player 0.8.1 Janus
[00000190] main private error: no sout stream module matched "transcode"
[00000189] main stream output error: stream chained failed for `transcode{vcodec=mpgv,vb=4096,scale=0.375,acodec=a52,ab=384,channels=6}:standard{access=file,mux=ps,url="army-navy-6c.mpg"}'
[00000188] main input error: cannot start stream output instance, aborting
Has anyone been able to get transcode working with VLC 8.2?
Thanks
Dave |
|
|
|
|
 |
 |
|
 |
Posted: Thu Apr 21, 2005 9:20 am |
|
|
| Scott Larson |
|
|
| |
| Joined: 15 Oct 2003 |
| Posts: 713 |
| Location: Portland, OR |
|
|
 |
 |
 |
|
| This is scaling HD down to SD resolution, right? |
|
|
|
|
Posted: Thu Apr 21, 2005 5:52 pm |
|
|
|
Yes it is. Transcoding HD to SD while keeping the 5.1 audio intact
Dave |
|
|
|
|
Posted: Fri Apr 22, 2005 10:36 am |
|
|
| Scott Larson |
|
|
| |
| Joined: 15 Oct 2003 |
| Posts: 713 |
| Location: Portland, OR |
|
|
 |
 |
 |
|
Why do people want to scale down HD to SD?
I can convert filmed HD material to 15%-25% of its original size by using an inverse telecine filter (or decimate to throw away duplicate frames) to turn it back into 24 fps progressive and compressing it with Xvid. It's still in its original resolution and there's almost no difference in quality in the compressed version and I keep the AC-3 sound too. This lets me burn three or four episodes of a TV series on a DVD+R.
OK, it does take a very very long time to compress, about ten hours for 45 minutes. I'm sure non-filmed material won't compress nearly as well. |
|
|
|
|
Posted: Wed Apr 27, 2005 9:00 pm |
|
|
| dacid |
|
|
| |
| Joined: 13 Nov 2004 |
| Posts: 13 |
|
|
|
 |
 |
 |
|
Because I don't have a HDTV
The downgraded picture still blows away the NTSC broadcast equivelant, not to mention that the 5.1 audio is great.
Dave |
|
|
|
|
Posted: Thu Apr 28, 2005 8:55 am |
|
|
| Scott Larson |
|
|
| |
| Joined: 15 Oct 2003 |
| Posts: 713 |
| Location: Portland, OR |
|
|
 |
 |
 |
|
But when you get an HDTV you'll wish you had compressed the files in their original resolution, especially since it would have made the files only 10%-15% larger.
Just like when I got a real 5.1 receiver a few weeks ago, I was glad I had kept the original AC-3 streams in every show I had archived for the past year instead of compressing them with MP3 or lame. |
|
|
|
|
Posted: Mon May 02, 2005 9:42 am |
|
|
| dacid |
|
|
| |
| Joined: 13 Nov 2004 |
| Posts: 13 |
|
|
|
 |
 |
 |
|
I agree completely, which is why I am keeping the original ts files for the happy day when I get a HDTV
In the meantime however, I'd like to enjoy the "DVD like" quality of a downconverted HD stream and 5.1 sound on my POS NTSC TV. |
|
|
|
|
Posted: Mon May 02, 2005 10:05 am |
|
|
| Scott Larson |
|
|
| |
| Joined: 15 Oct 2003 |
| Posts: 713 |
| Location: Portland, OR |
|
|
 |
 |
 |
|
| But you can enjoy the DVD quality by just downscaling the original ts files in real time. You don't have to convert the files to play them at a lower resolution. Your 2.6 Ghz Pentium 4 can downscale HD without breaking a sweat. |
|
|
|
|
Posted: Wed May 04, 2005 5:15 pm |
|
|
|
Yeah, I would do that, but - my PVR box is a P3 500mhz that uses a PVR-350 to decode MPEG2.
The PVR-350 can't handle the high def MPEG2 TS file, so my only option is to downconvert first. |
|
|
|
|
 |
 |
|
 |
Posted: Fri May 20, 2005 4:14 pm |
|
|
| mwahal |
|
|
| |
| Joined: 05 Apr 2005 |
| Posts: 34 |
|
|
|
 |
 |
 |
|
| Scott Larson wrote: | | But you can enjoy the DVD quality by just downscaling the original ts files in real time. You don't have to convert the files to play them at a lower resolution. Your 2.6 Ghz Pentium 4 can downscale HD without breaking a sweat. |
Scott,
Can you please explain how can I do that ? I've several episodes of kids shows which they want to watch in their 27" analog TV. Does this run time conversion happen at the backend ? I bought Hauppage media MVP and trying to run the mvpmyth (not successful yet, but thats another issue). Once it starts working, the mythfront end will run on the MVP. I want to hook this up to kids TV so that they can watch their shows. But I dont think MVP has ac3 decoder builtin, so I'd have to downres the channel to 2.
Thanks
Mudit |
|
|
|
|
 |
 |
|
 |
Posted: Fri May 20, 2005 5:31 pm |
|
|
| mwahal |
|
|
| |
| Joined: 05 Apr 2005 |
| Posts: 34 |
|
|
|
 |
 |
 |
|
I'm using VLC media player 0.8.2-test1 Janus. Getting tons of messages.
The output file is growing, so it must be writing something. Any idea why these messages are coming?
Thanks
Mudit
libdvbpsi error (PSI decoder): TS discontinuity (received 0, expected 1)
[00000265] ts demuxer debug: PATCallBack called
libdvbpsi error (PSI decoder): TS discontinuity (received 0, expected 1)
[00000265] ts demuxer debug: PMTCallBack called
libdvbpsi error (PSI decoder): TS discontinuity (received 0, expected 1)
[00000265] ts demuxer debug: PATCallBack called
libdvbpsi error (PSI decoder): TS discontinuity (received 0, expected 1)
[00000265] ts demuxer debug: PMTCallBack called
libdvbpsi error (PSI decoder): TS discontinuity (received 0, expected 1)
[00000265] ts demuxer debug: PATCallBack called
libdvbpsi error (PSI decoder): TS discontinuity (received 0, expected 1)
[00000265] ts demuxer debug: PMTCallBack called
libdvbpsi error (PSI decoder): TS discontinuity (received 0, expected 1)
[00000265] ts demuxer debug: PATCallBack called |
|
|
|
|
 |
 |
|
 |
Posted: Sat May 21, 2005 6:13 pm |
|
|
| mwahal |
|
|
| |
| Joined: 05 Apr 2005 |
| Posts: 34 |
|
|
|
 |
 |
 |
|
anyone following the first post should note couple of points.
1. remove --program 3 option .. its very specific to his TS stream.
2. use :sout and then append vlc:quit at the end of command line. Then you can use it from a script
3. Always find your own scale= values and vb rate.
Thanks
Mudit |
|
|
|
|
 |
 |
|
 |
Posted: Sat May 21, 2005 7:53 pm |
|
|
| mwahal |
|
|
| |
| Joined: 05 Apr 2005 |
| Posts: 34 |
|
|
|
 |
 |
 |
|
Scott,
Can you please give command lines how you do it ? Or point to a howto/faq ?
Thanks
Mudit
| Scott Larson wrote: | Why do people want to scale down HD to SD?
I can convert filmed HD material to 15%-25% of its original size by using an inverse telecine filter (or decimate to throw away duplicate frames) to turn it back into 24 fps progressive and compressing it with Xvid. It's still in its original resolution and there's almost no difference in quality in the compressed version and I keep the AC-3 sound too. This lets me burn three or four episodes of a TV series on a DVD+R.
OK, it does take a very very long time to compress, about ten hours for 45 minutes. I'm sure non-filmed material won't compress nearly as well. |
|
|
|
|
|
 |
 |
|
 |
Posted: Mon May 23, 2005 11:22 am |
|
|
| Scott Larson |
|
|
| |
| Joined: 15 Oct 2003 |
| Posts: 713 |
| Location: Portland, OR |
|
|
 |
 |
 |
|
| mwahal wrote: | | Can you please explain how can I do that ? I've several episodes of kids shows which they want to watch in their 27" analog TV. Does this run time conversion happen at the backend ? |
I don't know anything about Myth.
If you run xine or mplayer in fullscreen mode on a display that has less resolution than the content, they automatically downscale the content to fit the display. I assumed every MPEG player in the world did this since very few people who watch HDTV have 1920x1080 displays. |
|
|
|
|
pcHDTV Forum Index -> General pcHDTV topics
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 vote in polls in this forum
|
All times are GMT - 7 Hours
Page 1 of 2
Goto page 1, 2 Next
|
|
|
|
|