Page 1 of 1

Outputting a TS stream

Posted: 19 Jan 2007 05:38
by danielbb
I have a HDTV TS file which only plays in VLC (i love vlc :-D) I need to convert it to a dvd. But after trying countless peices of software none can see the video channel. Ive got the ac3 from it already.

It there a way to use vlc's ability to decode and play it to somehow output the video channel to a file?

Many thanks

Posted: 19 Jan 2007 06:12
by danielbb
Transcoded it works and opens with everything but 3000kb aint enough for 1080i

Posted: 19 Jan 2007 06:38
by Tappen
"C:\Program Files\VideoLan\vlc\vlc.exe" %1 :sout=#transcode{vcodec=mp2v,vb=8192,deinterlace,audio-sync,acodec=mpga,ab=128,channels=2}:duplicate{dst=std{access=file,mux=ps,dst="f:\%~n1.dvd.mpg"}} :sout-transcode-width=720 :sout-transcode-height=480 :aspect-ratio='16:9' :sout-deinterlace-mode=blend :sout-transcode-fps=29.97 :sout-ffmpeg-keyint=16 :sout-ffmpeg-strict-rc vlc:quit

This is what I put in a batch file to convert anything that Vlc can play into a DVD-friendly mpeg ps file. You'll need to make sure the :aspect-ratio is set correctly for your video, and you'll need to add the parameter --program=x where x is the program id in the TS you want to transcode (this should be visible in the Navigate submenu while you're playing the video).

Posted: 19 Jan 2007 07:45
by danielbb
thanks, i changed settings to this
C:\Program Files\VideoLan\vlc\vlc.exe" %1 :sout=#transcode{vcodec=mp2v,vb=8192,deinterlace,audio-sync,acodec=mpga,ab=128,channels=2}:duplicate{dst=std{access=file,mux=ps,dst="d:\%~n1.dvd.mpg"}} :sout-transcode-width=720 :sout-transcode-height=576 :aspect-ratio='16:9' :sout-deinterlace-mode=blend :sout-transcode-fps=25 :sout-ffmpeg-keyint=16 :sout-ffmpeg-strict-rc vlc:quit
Im not sure how to get the program id? navigation menu is empty when playing.

Posted: 19 Jan 2007 18:23
by Tappen
Well I think if there's only 1 program Id it doesn't show up on the menu and you can just leave off that parameter. Some of my HDTV ts files have that problem and I thought your issue with other video software was related to it. If there's only 1 program in the stream just drop the video file on the cmd file icon and it should produce a more compatible file for other players and DVD authoring tools.

Posted: 20 Jan 2007 19:18
by danielbb
nothing mate, command prompt opens and immediate closes.

Posted: 20 Jan 2007 19:20
by danielbb
missing the left speech mark. thank you friend :D

Posted: 20 Jan 2007 20:04
by danielbb
video done and looks perfect, i notice my .ts file has two audio channels and by default the italian one plays (which has actually no sound) when i play the original file i manually change it to the english audio channel. HOw can i select that one in the script?

Thanks

Posted: 22 Jan 2007 01:22
by danielbb
Anyone :cry:

Posted: 23 Jan 2007 02:48
by Tappen
Add --audio-track=1 to the conversion. Or 0 or 2, whatever's right for your file. The command-line arguments are numerous but worthwhile learning to search if you're going to use the tool.

Posted: 25 Jan 2007 11:30
by danielbb
Ive tryed 0 1 and 2 now nothing. When playing the original n vlc its track 2 [english] that works.

Code: Select all

C:\Program Files\VideoLan\vlc\vlc.exe" %1 :sout=#transcode{vcodec=mp2v,vb=8192,deinterlace,audio-sync,--audio-track=2,acodec=mpga,ab=128,channels=2}:duplicate{dst=std{access=file,mux=ps,dst="d:\%~n1.dvd.mpg"}} :sout-transcode-width=720 :sout-transcode-height=576 :aspect-ratio='16:9' :sout-deinterlace-mode=blend :sout-transcode-fps=25 :sout-ffmpeg-keyint=16 :sout-ffmpeg-strict-rc vlc:quit

Posted: 25 Jan 2007 12:23
by danielbb
audio codec is A52 if that helps

Posted: 25 Jan 2007 12:30
by DJ
Personally I would have done this the easy way and just exchanged containers. Copy the original formats to a new container.

Posted: 25 Jan 2007 12:32
by danielbb
\ven whjen i use the wizard and tell it to do audio obly it outputs video!

Posted: 25 Jan 2007 12:35
by DJ
If you want to do audio only, you will need to shut down the video in preferences.

Posted: 25 Jan 2007 23:36
by danielbb
thanks for the responses

i changed container but it still would not open in any of the editors previosly stated. I could change container then try the script thing again? Im gonna concentrate getting the audio done now, video is great.

Posted: 25 Jan 2007 23:38
by danielbb
Is this on the right lines, i just trying to get audio done for now.

Code: Select all

"C:\Program Files\VideoLan\vlc\vlc.exe" %1 :sout=#transcode{--no-video,--audio-track=2,acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=file,mux=ps,dst="d:\%~n1.dvd.mpg"}} vlc:quit

Posted: 26 Jan 2007 03:47
by Tappen
--audio-track=2 should be outside the #transcode block, just before vlc:quit. That was probably the problem all along with audio. Oh and --no-video needs to be outside as well. And you can't put just audio in a PS encapsulation.

I'd say go back to:

"C:\Program Files\VideoLan\vlc\vlc.exe" %1 :sout=#transcode{vcodec=mp2v,vb=8192,deinterlace,audio-sync,acodec=mpga,ab=128,channels=2}:duplicate{dst=std{access=file,mux=ps,dst="%~dpn1.dvd.mpg"}} :sout-transcode-width=720 :sout-transcode-height=480 :aspect-ratio='16:9' :sout-deinterlace-mode=blend :sout-transcode-fps=29.97 :sout-ffmpeg-keyint=16 :sout-ffmpeg-strict-rc --audio-track=2 vlc:quit

and do both video and audio at once. Splitting them up is just asking for sync trouble later on.

Posted: 26 Jan 2007 17:20
by danielbb
i tryed the --audio-track everywhere b4. Still no audio ^. Guess its not possible, why do i always get files like this. Play perfect but wont reencode! :cry:

Posted: 26 Jan 2007 23:57
by Tappen
This is just sad. Are you telling me that if you made a .cmd file with just
"C:\Program Files\VideoLan\vlc\vlc.exe" %1 --audio-track=2
and dropped the file on the icon it plays fine, with the audio track you want, but when you add the transcode parameters it somehow fails? I assumed you got this all working during playback before trying to transcode but I guess I could be wrong.

Posted: 27 Jan 2007 12:50
by danielbb
"C:\Program Files\VideoLan\vlc\vlc.exe" %1 --audio-track=2
It plays with no audio still , have to manually change it to track 2 on the audio menu.

Posted: 27 Jan 2007 12:52
by danielbb
ahhhhhhhhh ha, tryed 0 then 1. audio track one does the job, even thouh its labelled 2. Ill try the previos line again.

Posted: 27 Jan 2007 12:56
by danielbb

Code: Select all

"C:\Program Files\VideoLan\vlc\vlc.exe" %1 :sout=#transcode{vcodec=mp2v,vb=8192,deinterlace,audio-sync,acodec=mpga,ab=128,channels=2}:duplicate{dst=std{access=file,mux=ps,dst="%~dpn1.dvd.mpg"}} :sout-transcode-width=720 :sout-transcode-height=480 :aspect-ratio='16:9' :sout-deinterlace-mode=blend :sout-transcode-fps=29.97 :sout-ffmpeg-keyint=16 :sout-ffmpeg-strict-rc --audio-track=1 vlc:quit
That does the jobm, cheers mate. It was a combination of me putting the -"-audio-track" in the worong place, and that track 2 is actually track1? :-)

Posted: 27 Jan 2007 16:28
by danielbb
Spot on my son im well happy! :D thank you VERY much