Transcoding from MPEG4/AAC to Theora/Vorbis
Posted: 09 Apr 2008 00:51
Hi, all!
I have experimented with VLC for quite some time now, trying to transcode MPEG4/AAC to Theora/Vorbis for my final school project.
Initially, h264 was chosen, but abandoned because RTSP discards DST values needed by VLC for processing.
Reading from an .mp4 file and writing to an .ogg file DOES work, using:
/Applications/VLC.app/Contents/MacOS/VLC -vvvv Movies/lab.mp4 --codec faad --sout \ "#transcode{vcodec=theora,vb=1000,venc=theora,acodec=vorbis,ab=64,aenc=vorbis} \ :standard{access=file,mux=ogg,dst=Movies/lab.ogg}"
However, I am trying to transcode live streams, NOT files.
The scenario:
I want to use VLC to pick up an RTSP-stream containing MPEG4/AAC from Darwin Streaming Server (sent to it from Wirecast3),
transcode it to Theora/Vorbis and send to an Icecast2 server over HTTP. To achieve this, I run the following:
/Applications/VLC.app/Contents/MacOS/VLC -vvvv rtsp://darwinserver:554/lab.sdp --access live555 --rtsp-caching 2000 --codec faad \
--sout "#transcode{vcodec=theora,vb=1000,venc=theora,acodec=vorbis,ab=64,aenc=vorbis} \ :standard{access=shout,mux=ogg,dst=user:pass@icecastserver:8888/lab.ogg}"
I can see the mount point in Icecast2 admin UI, but VLC dies after a few seconds with a '5173 Segmentation Fault' error message.
OS X also produces a problem report that includes (among lots of information):
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x66377be9
I am using Mac OS X 10.4.11, VLC v0.8.6f, DSS 5.5.5, and Icecast2 2.3.1-1 from Fink.
I have tried to use ffmpeg2theora for transcoding, but cannot get it to decode AAC / encode Vorbis.
Any ideas? Help is most definitely appreciated!
* * * * *
UPDATE 11.04: Requesting the URL rtsp://darwinserver:554/lab.mp4 (using the file name and extension of the actual playlist item - a file, not a remotely announced mount point) instead of rtsp://darwinserver:554/lab.sdp (the name of the playlist itself), and saving to disk instead of streaming on to Icecast, I get both video and audio, without VLC crashing. However, leaving the extension as .sdp cancels audio output when playing the video.
1) mplayer reports audio is present in the resulting .mp4 file in BOTH cases (which I assume means the chosen AAC decoder is correct)
2) audio and video tracks switch from occupying #0 and #1 respectively, using .mp4 - to tracks #1 and #0 using .sdp
Is it possible to force audio to use track #0?
I cannot see that from reading the 3500++ line long 'vlc --advanced --longhelp --help-verbose' textfile I made ...
Btw: renaming the announce job for the source feed from Wirecast to .mp4 fails (it is silently ignored). So much for an easy fix!
I have experimented with VLC for quite some time now, trying to transcode MPEG4/AAC to Theora/Vorbis for my final school project.
Initially, h264 was chosen, but abandoned because RTSP discards DST values needed by VLC for processing.
Reading from an .mp4 file and writing to an .ogg file DOES work, using:
/Applications/VLC.app/Contents/MacOS/VLC -vvvv Movies/lab.mp4 --codec faad --sout \ "#transcode{vcodec=theora,vb=1000,venc=theora,acodec=vorbis,ab=64,aenc=vorbis} \ :standard{access=file,mux=ogg,dst=Movies/lab.ogg}"
However, I am trying to transcode live streams, NOT files.
The scenario:
I want to use VLC to pick up an RTSP-stream containing MPEG4/AAC from Darwin Streaming Server (sent to it from Wirecast3),
transcode it to Theora/Vorbis and send to an Icecast2 server over HTTP. To achieve this, I run the following:
/Applications/VLC.app/Contents/MacOS/VLC -vvvv rtsp://darwinserver:554/lab.sdp --access live555 --rtsp-caching 2000 --codec faad \
--sout "#transcode{vcodec=theora,vb=1000,venc=theora,acodec=vorbis,ab=64,aenc=vorbis} \ :standard{access=shout,mux=ogg,dst=user:pass@icecastserver:8888/lab.ogg}"
I can see the mount point in Icecast2 admin UI, but VLC dies after a few seconds with a '5173 Segmentation Fault' error message.
OS X also produces a problem report that includes (among lots of information):
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x66377be9
I am using Mac OS X 10.4.11, VLC v0.8.6f, DSS 5.5.5, and Icecast2 2.3.1-1 from Fink.
I have tried to use ffmpeg2theora for transcoding, but cannot get it to decode AAC / encode Vorbis.
Any ideas? Help is most definitely appreciated!
* * * * *
UPDATE 11.04: Requesting the URL rtsp://darwinserver:554/lab.mp4 (using the file name and extension of the actual playlist item - a file, not a remotely announced mount point) instead of rtsp://darwinserver:554/lab.sdp (the name of the playlist itself), and saving to disk instead of streaming on to Icecast, I get both video and audio, without VLC crashing. However, leaving the extension as .sdp cancels audio output when playing the video.
1) mplayer reports audio is present in the resulting .mp4 file in BOTH cases (which I assume means the chosen AAC decoder is correct)
2) audio and video tracks switch from occupying #0 and #1 respectively, using .mp4 - to tracks #1 and #0 using .sdp
Is it possible to force audio to use track #0?
I cannot see that from reading the 3500++ line long 'vlc --advanced --longhelp --help-verbose' textfile I made ...
Btw: renaming the announce job for the source feed from Wirecast to .mp4 fails (it is silently ignored). So much for an easy fix!