• SEARCH
  • DOWNLOADS
  • MY ACCOUNT
  • Buy (0)
  • CONTACT
  • Free Trial
Wowza Logo
  • PRODUCTS
  • DEVELOPER
  • SOLUTIONS
  • PRICING
  • RESOURCES
  • SUPPORT
  • My Account
  • Buy (0)
  • SEARCH
  • Ask a question
  • Forums
    • Wowza ClearCaster
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Topics
    • Questions
    • Articles
    • Users
    • Badges
  • Sign in
  • Community Home /
  • Wowza Streaming Engine /
  • Wowza Transcoder /
avatar image
Question by Peter Robinett · May 04, 2012 at 07:42 PM · wowza transcoder

Setting Up Transcoding of a Live Stream

This is a real long shot, but I figure it can't hurt to throw this out here:

I have an IP camera that has an RTSP stream with h.264 video and G.711 audio. I setup a Wowza application ( myapp) to use the rtp-live StreamType and then got Flowplayer with the RTMP plugin correctly playing the video. However, I believe the audio isn't being transcoded (it sounds horrible and I don't have transcoding on).

My Streams/StreamType in conf/myapp/Application.xml is rtp-live. I have the RTSP stream specified in content/camera.stream. That's really it, and it works, putting out a standard RTMP stream at rtmp://myserver/myapp with stream camera.stream.

So, I've been trying to enable transcoding of the audio while passing through the video, but everything I find (the Transcoding Guide[1] and others) just confuses me more and all my attempts don't work, often with errors about missing SMIL files (I tried to follow a guide[2] but I might have missed something). I found one guide that specifically outlines audio-only transcoding[3], but of course I had no luck.

Is this the correct way to approach things? I thought it was and then tried to follow the Flowplayer example for dynamic streaming with Wowza[4] using the F4M and HTTP Streaming plugins, but no joy.

I think a lot of my problem is it's unclear to me what URL format I should use to reference my streams

http://myserver:1935/myapp/smil:camera.stream.smil/manifest.f4m


or maybe

http://myserver:1935/myapp/_definst_/ngrp:camera.stream_all/manifest.f4m


?

Any suggestions of where to start? What should my `Application.xml` and my transcoding template look like? Thanks.

[1]: http://www.wowza.com/forums/content.php?304

[2]: http://www.wowza.com/forums/content.php?299-How-to-create-and-play-SMIL-files-with-streams-created-by-Wowza-Transcoder

[3]: http://www.wowza.com/forums/content.php?347-Transcoder-Publish-h.264-with-Speex-from-Flash-11-to-h.264-with-AAC-audio-for-playback-across-clients

[4]: http://flowplayer.org/plugins/streaming/httpstreaming.html#example-with-wowza-http-dynamic-streaming-and-live-dvr
Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Richard Lanham · May 04, 2012 at 06:47 PM

Take a look at the audio.xml Transcoder template in this example as a starting place:

http://www.wowza.com/forums/content.php?347-Transcoder-Publish-h-264-with-Speex-from-Flash-11-to-h-264-with-AAC-audio-for-playback-across-clients

Richard
Comment

People who like this

0 Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Peter Robinett · May 05, 2012 at 11:21 AM 0
Share
Hi Richard, like I said, I've done that.

I just setup a clean install on a new server so be clear what I've done. I've setup the rtp-live stream using the sample rtp-live Application.xml, and then followed the instructions in the audio-only guide. The only exemption is that I've left the StreamType as rtp-live. Is that a problem? As I understand it rtp-live is more appropriate for what I want to do (only transcode the RTSP stream and broadcast it as RTMP when a viewer connects to Wowza).

So, now that I have setup the transcoding template I try to open the stream in one of the example players I get the following server log output:

INFO server comment - MediaStreamMediaCasterPlay: startPlay
INFO server comment - RTPMediaCaster.create[1309289016]
INFO server comment - RTPMediaCaster.init[1309289016]
INFO server comment - RTPMediaCaster.Reconnector[1309289016:myapp/_definst_:camera.stream_aac]: start: 1
INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo[myapp/_definst_]: /Library/WowzaMediaServer/content/camera.stream_aac
WARN server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: SDP file missing: /Library/WowzaMediaServer/content/camera.stream_aac
INFO server comment - RTPMediaCaster.Reconnector[1399877303:myapp/_definst_:camera.stream_aac]: done: 1


Using the example player at examples/LiveVideoStreaming/client/live.html, I've set the server at rtmp://localhost/myapp. For the stream I've tried both mp4:camera.stream_aac and camera.stream_aac. In both cases I get the SDP file missing error in the logs. camera.stream still works as the untranscoded stream.

I've also tried with the LiveOSMFPlayer from examples/LiveVideoStreaming/clientOSMF/bin-release/LiveOSMFPlayer.html. I've tried the following URLs:



  • http://localhost:1935/myapp/mp4:camera.stream_aac/manifest.f4m
  • http://localhost:1935/myapp/camera.stream_aac/manifest.f4m
  • http://localhost:1935/myapp/camera.stream/manifest.f4m

    Regardless of the URL I try I get an 'Error #2032' on the page and my browser's error console has a 404 error, for example:

    GET http://localhost:1935/myapp/mp4:camera.stream_aac/manifest.f4m 404 (Not Found)


    Have I missed a step? I am running Wowza Media Server 3 Trial Edition (Expires: Jun 03, 2012) 3.1.1 build1479.
  • avatar image

    Answer by Richard Lanham · May 05, 2012 at 04:26 PM

    You have to use files with a .stream extension. Change camera.stream_aac to something like camera_aac.stream

    And use StreamType "live", then use StreamManager to start the stream for sanjosestreaming playback.

    There is a guide for this here:

    http://www.wowza.com/forums/content.php?39-How-to-re-stream-video-from-an-IP-camera-(RTSP-RTP-re-streaming)

    Richard
    Comment

    People who like this

    0 Show 3 · Share
    10 |600 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Peter Robinett · May 06, 2012 at 11:02 AM 0
    Share
    Hi Richard,

    I went ahead and setup a second application ( live) on my machine. I have it also use camera.stream, like my other, rtp-live app, myapp.

    When I go to the Stream Manager and add camera.stream as a stream under the live application, it says it it setup correctly and I see in access.log that it connects and starts the transcoder with the correct settings. However, neither the new transcoded stream nor the streams on my other app are available, and I cannot access the Stream Manager page. There are no entries in error.log and restarting Wowza is the only solution.

    This is the end of my log file before I restarted it:

    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: command:PLAY response:RTSP/1.0 200 OK status:200 handled:false	-	-	-	239.388	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	senderReport[RTP-Info]: track1	-	-	-	239.388	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	senderReport[RTP-Info]: track2	-	-	-	239.389	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	firstPacket: TCP:$2	-	-	-	239.404	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	TranscoderSessionNative.loadLibrary: Load transcoder list: /usr/local/WowzaMediaServer/lib-native/linux64/transcoder.list	-	-	-	239.413	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	LiveStreamTranscoder.init[live/_definst_/camera.stream]: Load transcoder template: file:///usr/local/WowzaMediaServer/transcoder/templates/audioonly.xml	-	-	-	239.426	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	JNI:TranscoderSession.isCUDAAvailable[_defaultVHost_:live/_definst_/camera.stream]: NVidia CUDA hardware acceleration is NOT available on Linux	-	-	-	239.444	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	JNI:TranscoderSession.isQuickSyncAvailable[_defaultVHost_:live/_definst_/camera.stream]: Intel Quick Sync hardware acceleration is NOT available on Linux	-	-	-	239.445	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	firstPacket: TCP:$0	-	-	-	239.461	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	create	stream	INFO	200	-	-	-	-	-	0.001	-	-	-	-	-	-	-	-	-	-	2	0	0	0	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	publish	stream	INFO	200	camera.stream_aac	-	-	-	-	0.001	-	-	-	-	-	-	-	-	-	-	2	0	0	0	camera.stream_aac	-	-	-	-	-	/camera.stream_aac	/camera.stream_aac	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	JNI:TranscoderSession.audioDecoderCreate[_defaultVHost_:live/_definst_/camera.stream]: Create audio decoder: G711 MULAW: default	-	-	-	239.467	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	decoder-audio-start	transcoder	INFO	200	camera.stream	{codec:G711_MULAW, objectType:0, sampleRate:16000, channels:1}	-	-	-	239.468	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	LiveStreamPacketizerSanJose.init[live/_definst_/camera.stream]: chunkDurationTarget: 10000	-	-	-	239.469	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	JNI:TranscoderSession.audioEncoderAdd[_defaultVHost_:live/_definst_/camera.stream:aac]: Create audio encoder: AAC: default	-	-	-	239.469	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	LiveStreamPacketizerSanJose.init[live/_definst_/camera.stream]: chunkDurationTolerance: 500	-	-	-	239.469	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	LiveStreamPacketizerSanJose.init[live/_definst_/camera.stream]: playlistChunkCount:4	-	-	-	239.47	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	JNI:AudioEncoderAAC.initialize[_defaultVHost_:live/_definst_/camera.stream:aac]: channels:1 sampleRate:8000 bitRate:48000	-	-	-	239.472	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: sanjosestreamingpacketizer:camera.stream	-	-	-	239.472	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    2012-05-06	04:27:14	CDT	comment	server	INFO	200	-	ModuleMediaCasterStreamMonitorAdvanced.getMonitor[live/_definst_] create:camera.stream	-	-	-	239.482	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
    
    avatar image Peter Robinett Peter Robinett · May 07, 2012 at 03:08 PM 0
    Share
    Ok, it is crashing. A selection from the crash log:

    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  java.util.zip.Inflater.inflateBytes(J[BII)I+0
    j  java.util.zip.Inflater.inflate([BII)I+59
    j  java.util.zip.InflaterInputStream.read([BII)I+53
    j  sun.misc.Resource.getBytes()[B+115
    j  java.net.URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;+219
    j  java.net.URLClassLoader.access$000(Ljava/net/URLClassLoader;Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;+3
    j  java.net.URLClassLoader$1.run()Ljava/lang/Object;+43
    v  ~StubRoutines::call_stub
    j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+0
    j  java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;+13
    j  java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+43
    j  java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+3
    v  ~StubRoutines::call_stub
    j  com.wowza.wms.media.aac.AACUtils.decodeFrame([BJ)Lcom/wowza/wms/media/aac/AACFrame;+194
    j  com.wowza.wms.transcoder.model.TranscoderWorkerAudioEncoder.sendAACCodecConfig(Lcom/wowza/wms/transcoder/model/TranscoderPacket;)Z+261
    j  com.wowza.wms.transcoder.model.TranscoderWorkerAudioEncoder.run()V+306
    J  java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V
    j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5
    j  java.lang.Thread.run()V+11
    v  ~StubRoutines::call_stub
    ---------------  P R O C E S S  ---------------
    Java Threads: ( => current thread )
      0x00000000026f6000 JavaThread "LiveStreamTranscoderSorter-live/_definst_/camera.stream" daemon [_thread_blocked, id=5604, stack(0x00007f7e21c9d000,0x00007f7e21d9e000)]
      0x0000000002c15800 JavaThread "SocketAcceptorIoProcessor-2.0" [_thread_in_native, id=5603, stack(0x00007f7e1ba3b000,0x00007f7e1bb3c000)]
      0x00007f7e280cf800 JavaThread "VHostTransport._defaultVHost_.80" daemon [_thread_blocked, id=32433, stack(0x00007f7e1bb3c000,0x00007f7e1bc3d000)]
      0x00007f7e280cd800 JavaThread "VHostTransport._defaultVHost_.79" [_thread_blocked, id=32432, stack(0x00007f7e1bc3d000,0x00007f7e1bd3e000)]
      0x0000000002480000 JavaThread "VHostTransport._defaultVHost_.78" [_thread_blocked, id=32431, stack(0x00007f7e1bd3e000,0x00007f7e1be3f000)]
    


    Could the fact that I'm using OpenJDK be a problem?

    Or perhaps I'm out of memory? Wowza is given the default 1200M and this is what the heap info says in the crash log:

    Heap
     PSYoungGen      total 404032K, used 164945K [0x00000000e7000000, 0x0000000100000000, 0x0000000100000000)
      eden space 398976K, 40% used [0x00000000e7000000,0x00000000f0cc7168,0x00000000ff5a0000)
      from space 5056K, 87% used [0x00000000ffb10000,0x00000000fff5d3c0,0x0000000100000000)
      to   space 5312K, 0% used [0x00000000ff5a0000,0x00000000ff5a0000,0x00000000ffad0000)
     PSOldGen        total 36096K, used 8380K [0x00000000b5000000, 0x00000000b7340000, 0x00000000e7000000)
      object space 36096K, 23% used [0x00000000b5000000,0x00000000b582f1e8,0x00000000b7340000)
     PSPermGen       total 25216K, used 25049K [0x00000000aaa00000, 0x00000000ac2a0000, 0x00000000b5000000)
      object space 25216K, 99% used [0x00000000aaa00000,0x00000000ac276788,0x00000000ac2a0000)
    
    avatar image Peter Robinett Peter Robinett · May 07, 2012 at 03:23 PM 0
    Share
    It looks like I'm running into the same issue as another thread: http://www.wowza.com/forums/showthread.php?16636-Transcoder-Crashes-Server Should I try downgrading to the 3.0.3-patch14 update mentioned in the thread? I'm running 3.1.1 build1479, so I assume the fix is included.

    Sorry for all the posts...
    avatar image

    Answer by Richard Lanham · May 08, 2012 at 12:19 AM

    Do a fresh test. First re-starting Wowza, then run through starting the camera.stream in StreamManager, then trying to playback one of the encoded streams.

    Then zip up conf, logs and the transcoder template and send to support@wowza.com.

    Include camera.stream file

    Include a link to this thread.

    Richard
    Comment

    People who like this

    0 Show 1 · Share
    10 |600 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Peter Robinett · May 08, 2012 at 09:21 AM 0
    Share
    Thanks, Richard, I'll get on this today.

    Peter
    avatar image

    Answer by Lisa Wong · May 07, 2012 at 04:17 PM

    The fix for Main Concept on Linux described in this post is included in 3.1.1. It is important that your server is properly tuned. 1200MB is all right for development, but needs to be tuned for a production environment. Take a look at the Tuning Guide.

    Do you see any messages like this? It indicates that the server is overworked and CPU is maxed out. These types of INFO messages would be in the [install-dir]/logs/wowzamediaserver_access.log, not the wowzamediaserver_error.log.

    Video behind filter state change. New state: SKIP1FRAME


    -Lisa
    Comment

    People who like this

    0 Show 1 · Share
    10 |600 characters needed characters left characters exceeded
    ▼
    • Viewable by all users
    • Viewable by moderators
    • Viewable by moderators and the original poster
    • Advanced visibility
    Viewable by all users
    avatar image Peter Robinett · May 08, 2012 at 09:20 AM 0
    Share
    Thanks Lisa, but what's the difference between a development environment and a production one? 2 streams? 3?

    I grep-ed the logs and I found two, but only two, mentions of skipping. Since it was only during one of my attempts, I don't think it's the (main) cause of my problems:

    2012-05-07      09:02:54        CDT     comment server  INFO    200     -       TranscodingSession.updateBehindFilter[live/_definst_/camera.stream]: Video behind filter state change. New state: SKIP2FRAME  -       -       -       102836.064      -       -
           -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -       -
    2012-05-07      09:02:55        CDT     comment server  INFO    200     -       TranscodingSession.updateBehindFilter[live/_definst_/camera.stream]: Video behind filter state change. New state: SKIP4FRAME  -       -       -       102837.102      -       -
    


    The machine is an "Intel Xeon-SandyBridge E3-1270-Quadcore [3.4GHz]". That should be a decent CPU simply audio transcoding, no? Though of course the memory could be an issue...

    Your answer

    Hint: You can notify a user about this post by typing @username

    Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

    Follow this Question

    Answers Answers and Comments

    1 Person is following this question.

    avatar image

    Related Questions

    Transcoder sample rate / resampling 1 Answer

    EC2 instance to transcode incoming 15 1080p channels to 5 profiles 1 Answer

    Transcode Frame Rate 1 Answer

    nDVR and record transcoded stream but not source stream 1 Answer

    How to accurately measure latency or delay from transcoder input to output 2 Answers

    Hot Topics
    • AWS Hosting
    • Mobile SDK
    • Deployment Options
    • Load Balancing
    • Content Security
    Product Sign-in
    • Wowza Streaming Cloud
    • Wowza Player
    Under the Hood
    • Developer Tools
    • Wowza System Status
    • Test Players
    • Developer IDE
    Resellers
    • Find a Reseller
    • Reseller Portal
    • Become a Reseller
    Company
    • About Us
    • Blog
    • News
    • Events
    • Careers
    • Customers
    • Partners
    • Contact Us
    Stay Connected
    Get Monthly Newsletter
    Select a Language
    • English
      • English
      • Español
      • 日本語
      • 한국어
      • हिन्दी भाषा
      • 中文
      • русский язык

    © 2005–2019 Wowza Media Systems, LLC. All rights reserved.   Terms | Privacy | Trademarks | Legal


    Enterprise
    Social Q&A

    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Forums
    • Wowza ClearCaster
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Explore
    • Topics
    • Questions
    • Articles
    • Users
    • Badges