Page 1 of 1

Transcoding to Theora/Vorbis works - sort of...

Posted: 16 Apr 2008 19:31
by ph0t0n
I have successfully transcoded an MPEG-4/AAC stream to a Theora/Vorbis stream in VLC 0.8.6f PPC,
sent the latter to an Icecast2 server and viewed it in VLC by following these steps:

1. Run Wirecast on computer #1, sending a Unicast MPEG4/AAC stream to computer #2
(NOT QT announce to Darwin Streaming Server, as originally intended - DSS seems to mangle in-stream SDP info)

2. Copy SDP file to computer#2 (running VLC)

3. Run VLC on computer #2 with the following syntax:

vlc -vvv wc.sdp --sout "#transcode{vcodec=theora,vb=300,venc=theora,acodec=vorbis,ab=64,aenc=vorbis,audio-sync} \
:std{access=shout,mux=ogg,dst=usr:pwd@server:8888/wc.ogg}"

3. Open the stream in VLC on computer #3 (also running Icecast2) using 'vlc -vvv http://localhost:8888/wc.ogg'

HOWEVER (hold your applause just yet):

- Doing all steps locally on my G4 PowerBook (1.67GHz/1.5GB) laptop makes 100% use of the CPU, and delays audio/video (but they are in sync)
- Distributing the tasks like described above causes MASSIVE delay in audio, between computers on the same segment of a Gigabit LAN. Why???

A grep of 'warning' from the -vvv CLIENT output (blank lines indicate preceding messages removed by me):

***

[00000275] main demuxer warning: no access_demux module matched "http"
[00000311] main audio output warning: PTS is out of range (256966714), dropping buffer

[00000311] main audio output warning: output date isn't PTS date, requesting resampling (-40777)
[00000311] main audio output warning: buffer is 40778 in advance, triggering downsampling
[00000273] main input warning: clock gap, unexpected stream discontinuity
[00000273] main input warning: feeding synchro with a new reference point trying to recover from clock gap
[00000311] main audio output warning: PTS is out of range (709583), dropping buffer

[00000311] main audio output warning: audio drift is too big (451844), dropping buffer

[00000311] main audio output warning: buffer is 103571 late, triggering upsampling
[00000311] main audio output warning: computed PTS is out of range (855020), clearing out
[00000311] main audio output warning: timing screwed, stopping resampling
[00000311] main audio output warning: PTS is out of range (843884), dropping buffer
[00000311] main audio output warning: output PTS is out of range (898608), clearing out
[00000311] main audio output warning: PTS is out of range (821244), dropping buffer

[00000311] main audio output warning: input PTS is out of range (867033), trashing
[00000311] main audio output warning: computed PTS is out of range (843867), clearing out
[00000311] main audio output warning: output date isn't PTS date, requesting resampling (-42865)
[00000311] main audio output warning: buffer is 42874 in advance, triggering downsampling
[00000311] main audio output warning: audio drift is too big (-311668), clearing out
[00000311] main audio output warning: timing screwed, stopping resampling
[00000311] main audio output warning: audio drift is too big (-311486), clearing out
[00000311] main audio output warning: mixer start isn't output start (-120364)
[00000307] main video output warning: vout warning: early picture skipped (291032086)

[00000311] main audio output warning: PTS is out of range (7233), dropping buffer
[00000311] main audio output warning: PTS is out of range (-15625), dropping buffer
[00000311] main audio output warning: PTS is out of range (-38608), dropping buffer
[00000311] main audio output warning: audio drift is too big (470253), dropping buffer

[00000311] main audio output warning: buffer is 98733 late, triggering upsampling
[00000311] main audio output warning: resampling stopped after 15248350 usec (drift: 22757)

***

A grep of 'warning' from the -vvv SERVER output does not produce any significant (AFAIK) error messages

***

Trying to add 'audio-sync' to the transcode chain causes the following error on the server side:

[00000276] stream_out_transcode private debug: drift is too high, resetting master sync

ad infinitum, I might add...

...and it also silently kills the Icecast mountpoint after < 10 seconds or so, without warning (or crashing)

***

On the client side, I get these messages (again, blank lines indicate multiple removed entries similar to preceding error message):

[00000275] main demuxer warning: no access_demux module matched "http"
[00000311] main audio output warning: PTS is out of range (256966714), dropping buffer

[00000311] main audio output warning: output date isn't PTS date, requesting resampling (-40777)
[00000311] main audio output warning: buffer is 40778 in advance, triggering downsampling
[00000273] main input warning: clock gap, unexpected stream discontinuity
[00000273] main input warning: feeding synchro with a new reference point trying to recover from clock gap
[00000311] main audio output warning: PTS is out of range (709583), dropping buffer

[00000311] main audio output warning: audio drift is too big (451844), dropping buffer

[00000311] main audio output warning: buffer is 103571 late, triggering upsampling
[00000311] main audio output warning: computed PTS is out of range (855020), clearing out
[00000311] main audio output warning: timing screwed, stopping resampling
[00000311] main audio output warning: PTS is out of range (843884), dropping buffer
[00000311] main audio output warning: output PTS is out of range (898608), clearing out
[00000311] main audio output warning: PTS is out of range (821244), dropping buffer

[00000311] main audio output warning: input PTS is out of range (867033), trashing
[00000311] main audio output warning: computed PTS is out of range (843867), clearing out
[00000311] main audio output warning: output date isn't PTS date, requesting resampling (-42865)
[00000311] main audio output warning: buffer is 42874 in advance, triggering downsampling
[00000311] main audio output warning: audio drift is too big (-311668), clearing out
[00000311] main audio output warning: timing screwed, stopping resampling
[00000311] main audio output warning: audio drift is too big (-311486), clearing out
[00000311] main audio output warning: mixer start isn't output start (-120364)
[00000307] main video output warning: vout warning: early picture skipped (291032086)

[00000311] main audio output warning: PTS is out of range (7233), dropping buffer

[00000311] main audio output warning: audio drift is too big (470253), dropping buffer

[00000311] main audio output warning: buffer is 98733 late, triggering upsampling
[00000311] main audio output warning: resampling stopped after 15248350 usec (drift: 22757)

What can I do to fix this? Does ANYBODY know AT ALL?

Desperately yours,

ph0t0n

(*sigh*)

Re: Transcoding to Theora/Vorbis works - sort of...

Posted: 16 Apr 2008 19:33
by Jean-Baptiste Kempf
ask on the vlc-devel mailing list.

Re: Transcoding to Theora/Vorbis works - sort of...

Posted: 16 Apr 2008 19:57
by ph0t0n
ask on the vlc-devel mailing list.
Thanks for your quick reply, I'll do just that!

I have just subscribed, and will make a quick post.

Some thoughts, though - if I am excused:

- Isn't this what the forums are for?
- Depending on volume, it is a lot of potentially irrelevant stuff to peruse
- I am not a developer, subscribers may assume that I know more than I do

Re: Transcoding to Theora/Vorbis works - sort of...

Posted: 16 Apr 2008 20:40
by Jean-Baptiste Kempf
Well, those forums are not frequented by most of the developers, because there is too much volume, not enough people helping and too many clueless users that ask questions that have been answered 10+ times.

Re: Transcoding to Theora/Vorbis works - sort of...

Posted: 17 Apr 2008 00:35
by ph0t0n
I understand. At least I don't feel guilty of not doing research before asking! :-)

Re: Transcoding to Theora/Vorbis works - sort of...

Posted: 03 May 2008 22:41
by ph0t0n
Well, I've posted my question on the developer mailing list several days ago, and got no reply. I'm soldiering on, but I'm starting to lose hope here. I'm off the list now, seeing no point in receiving lots of irrelevant info.