Transcode to h.264 and stream with subtitles

About encoding, codec settings, muxers and filter usage
msauer
New Cone
New Cone
Posts: 6
Joined: 10 Apr 2009 01:40

Transcode to h.264 and stream with subtitles

Postby msauer » 09 May 2009 00:05

Hi,

I want to use vlc to capture data from my DVB input card (ATSC actually), and transcode this to H.264 and AAC, but I would also like to send the subtitle track along.

Does anyone have any idea how to do this?

If I don't transcode the mpeg2, and just stream it out, the subtitles go through, and I can render them on the decoder.

However whether I use soverlay or senc, scodec in my transcode string, I don't get subtitles, and there is no output indicating that subtitles are being processed.

If anyone can help me on this, I'd be grateful.

Thanks,
--Mark

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Transcode to h.264 and stream with subtitles

Postby Jean-Baptiste Kempf » 11 May 2009 02:25

Can you play the file and subtitles correctly with VLC?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

msauer
New Cone
New Cone
Posts: 6
Joined: 10 Apr 2009 01:40

Re: Transcode to h.264 and stream with subtitles

Postby msauer » 22 May 2009 22:15

I can play the source mpeg2 TS files with the subtitles correctly with VLC.

But when I try to transcode the video to h264/aac/some subtitles, I cannot get the subtitles in the stream.

Just wondering if you (or someone) may know how to do this.

Thanks,
--Mark

goldsmith
Blank Cone
Blank Cone
Posts: 10
Joined: 05 May 2009 16:24

Re: Transcode to h.264 and stream with subtitles

Postby goldsmith » 26 May 2009 10:16

Did you check keep all elementary streams flag when streaming?

I have another problem when using version 1.0.0. I am transcoding video from VOB file and streaming all elementary streams. When I watch this streaming on VLC everything is OK (I see subtitle, I can switch them off/on etc.) but on STB subtitle is transparent with light blue background made of vertical stripes. I am coding subtitle as DVB subtitle. I also tested with another mpeg file that has subtitles (not transcoded by me) and it is shown correctly on both VLC and STB. Does anybody know what could be problem?

info output for correct file:

C:\vlc\vlc\vlc-1.0.0-pre2>ffmpeg -i orca-subtitle.mpg
FFmpeg version SVN-r18866-Sherpya, Copyright (c) 2000-2009 Fabrice Bellard, et a
l.
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.29. 0 / 52.29. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 0. 5. 0 / 0. 5. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on May 18 2009 04:12:16, gcc: 4.5.0 20090517 (experimental)

Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1)
-> 25.00 (25/1)
Input #0, mpegts, from 'orca-subtitle.mpg':
Duration: 00:04:56.31, start: 66625.643767, bitrate: 4460 kb/s
Program 7050
Stream #0.0[0x1b8b]: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3]
, 15000 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x1b8c](swe): Audio: mp2, 48000 Hz, mono, s16, 96 kb/s
Stream #0.2[0x1b8d](nor): Audio: mp2, 48000 Hz, mono, s16, 96 kb/s
Stream #0.3[0x1b8e](dan): Audio: mp2, 48000 Hz, mono, s16, 96 kb/s
Stream #0.4[0x1b8f](cze): Audio: mp2, 48000 Hz, mono, s16, 96 kb/s
Stream #0.5[0x1b92](rus): Audio: mp2, 48000 Hz, mono, s16, 96 kb/s
Stream #0.6[0x1b93](pol): Audio: mp2, 48000 Hz, mono, s16, 96 kb/s
Stream #0.7[0x1c34](eng): Audio: mp2, 48000 Hz, mono, s16, 96 kb/s
Stream #0.8[0x1c35](hun): Audio: mp2, 48000 Hz, mono, s16, 96 kb/s
Stream #0.9[0x1bb8](scc): Subtitle: dvbsub
Stream #0.10[0x1c37](bul): Subtitle: dvbsub
Stream #0.11[0x1c38](scr): Subtitle: dvbsub
Stream #0.12[0x1c39](slv): Subtitle: dvbsub
At least one output file must be specified

info output for my file:

C:\vlc\vlc\vlc-1.0.0-pre2>ffmpeg -i fnm3.ts
FFmpeg version SVN-r18866-Sherpya, Copyright (c) 2000-2009 Fabrice Bellard, et a
l.
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.29. 0 / 52.29. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 0. 5. 0 / 0. 5. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on May 18 2009 04:12:16, gcc: 4.5.0 20090517 (experimental)

Seems stream 2 codec frame rate differs from container frame rate: 50.00 (50/1)
-> 25.00 (25/1)
Input #0, mpegts, from 'fnm3.ts':
Duration: 00:03:52.76, start: 29834.208300, bitrate: 1093 kb/s
Program 1
Stream #0.0[0x44]: Subtitle: dvbsub
Stream #0.1[0x45]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.2[0x46]: Video: h264, yuv420p, 720x576 [PAR 16:15 DAR 4:3], 25 tbr
, 90k tbn, 50 tbc
At least one output file must be specified

msauer
New Cone
New Cone
Posts: 6
Joined: 10 Apr 2009 01:40

Re: Transcode to h.264 and stream with subtitles

Postby msauer » 27 May 2009 18:19

How do you maintain all the elementary streams, while at the same time transcoding the mpeg2 source to h.264 and the a52 audio to AAC?

I believe I tried using the --sout-all option, which didn't seem to make a difference.

Thanks,
--Mark

goldsmith
Blank Cone
Blank Cone
Posts: 10
Joined: 05 May 2009 16:24

Re: Transcode to h.264 and stream with subtitles

Postby goldsmith » 28 May 2009 15:10

My steps are:

1. Select VOB file I want to stream

2. Select destination UDP://224.1.1.1:1234

3. Turn on: activate transcoding, in profile options I set Encapsulation:MPEG TS, Video codec:H264, Subtitles: DVB subtitles

4. In options I turn on Stream all elementary streams

In the end stream output string looks like: :sout=#transcode{vcodec=h264,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=dvbs} :sout-all

I hope this will help you.

My problem is: when playing on VLC everything is great I can turn on/off subtitles, but on STB subtitle is ugly (transparent on light blue background). Looks like subtitles codecs are different but I can stream another mpeg file not made by me (without transcoding) with correct subtitle shown. ffmpeg shows that both files have dvbs subtitles.

msauer
New Cone
New Cone
Posts: 6
Joined: 10 Apr 2009 01:40

Re: Transcode to h.264 and stream with subtitles

Postby msauer » 01 Jun 2009 23:23

What version of VLC are you using? In the GUI for subtitles, I do not see anything listed under subtitles. Perhaps it wasn't compiled correctly.

Perhaps that is my problem. Do you have your configure string that you used to build VLC?

Thanks

goldsmith
Blank Cone
Blank Cone
Posts: 10
Joined: 05 May 2009 16:24

Re: Transcode to h.264 and stream with subtitles

Postby goldsmith » 03 Jun 2009 12:18

I am using version 1.0.0. I compiled it from source code I downloaded with GIT using cygwin.

Subtitles option is chosen in destination section when configuring transcoding options.

Near: Video - H264 + AAC (TS) I have icon edit selected profile (picture of screw driver on button), when I open that window I have tab subtitles. Inside I chose DVB subtitle.

billfromhk
New Cone
New Cone
Posts: 1
Joined: 01 Oct 2009 22:28

Re: Transcode to h.264 and stream with subtitles

Postby billfromhk » 01 Oct 2009 22:30

I am having the same problem. And I just noticed MPEG2 and MPEG4 supports different subtitle codecs. Maybe somehow the container format is messing up the subtitle stream?
See here
http://wiki.videolan.org/MPEG-PS#Accept ... e_codecs_2
http://wiki.videolan.org/MPEG-4#Accepted_subtitle_codec


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 40 guests