Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: MP4 file not being written but FLV is

  1. #1
    Join Date
    Dec 2011
    Posts
    8

    Default MP4 file not being written but FLV is

    Hi,

    We've got a strange issue. We are doing a live video post using an RTMP feed. The broadcaster is using:

    rtmp://ouringestpoint:1935/rtmplive/mp4:NewLayout/somestream

    I have a server-side module that is triggered when the write is complete that moves the resulting MP4 file into a specific directory depending on the stream name. This all seems to work fine IF I use something like ffmpeg to send the stream, e.g.:

    ffmpeg -f video4linux2 -i /dev/video0 -vcodec libx264 -f flv rtmp://ouringestpoint:1935/rtmplive/mp4:NewLayout/ricktest01

    However, when our client (using their application) tries it, the live stream occurs, you can watch it live, but when it's over the system writes an FLV file and never writes the MP4 file. I'm not sure if my module is ever triggered. Their application is iPhone based, I don't know what libraries they're using.

    Any ideas? Could this be the application versus application instance (stream name) problem? I thought that only affected VOD playback.

  2. #2

    Default

    Hi there.

    What version of Wowza are you running?
    Can you please confirm that your custom module is writing the FLV file to a specified directory, or if the file is being saved to the [install-dir]/content directory.

    If you are running a Wowza version previous to Wowza 4.x, and the custom module is working as expected but not creating an .mp4, it could be because previous versions of Wowza recorded to .flv. You can specify the recordings be saved to .mp4 by editing [install-dir]/conf/Server.xml and change:
    <Streams>
        <DefaultStreamPrefix>flv</DefaultStreamPrefix>
    </Streams>
    And change to:
    <Streams>
    	<DefaultStreamPrefix>mp4</DefaultStreamPrefix>
    </Streams>
    If you are running Wowza 4.x, and/or your module is not working as expected, you could try the Wowza ModuleMediaWriterFileMover:
    How to move recordings from live streams (ModuleMediaWriterFileMover)

    I hope this helps.

    Salvadore

  3. #3
    Join Date
    Dec 2011
    Posts
    8

    Default

    We are running 3.5.2. Note that my custom module does not write an MP4--it expects to move an existing MP4 once it has been written by Wowza. Again, using ffmpeg as the encoder (see my previous post), Wowza DOES write an MP4 file. When that's complete, my module is triggered and it moves the MP4 to the appropriate spot. It is only when the client uses their iPhone application to publish that the system only writes an FLV file. I can enable logging on my module to see if it is triggered, but my guess is that it is not. I don't know if this is because their iPhone app doesn't close the stream cleanly or what, but an MP4 is never written when their iPhone app is used.

  4. #4
    Join Date
    Dec 2011
    Posts
    8

    Default

    I should also add that this only occurs if a path is used in the stream name. If they publish to "rtmp://ouringestpoint:1935/mp4:somestreamname" then the MP4 is written. It is if they publish to "rtmp://ouringestpoint:1935/mp4:NewLayout/somestreamname" that the MP4 isn't written and only the FLV is.

  5. #5

    Default

    If you have not done so, you could change the default prefix Wowza records to from .flv to .mp4 as described in my last post and see if that helps.
    If it does not, please do enable logging for your module, and run a test from the iPhone app, then zip up your /conf and /log folders and send them to support@wowza.com for a closer look. Please include a link to this thread as a reference.

    Thank you.

    Salvadore

  6. #6
    Join Date
    Dec 2011
    Posts
    8

    Default

    There is no "DefaultStreamPrefix" property in any of the XML config files on our server, and no "<Streams></Streams>" stanza in Server.xml, so I'm not sure where to put this. Should it go in the application's Application.xml file?

  7. #7

    Default

    I see, you are right. They added the ability to change the default prefix in Wowza 4.x as well. Sorry about that.

    But it may be that you are using the wrong URL.
    Try it like this:
    rtmp://ouringestpoint:1935/NewLayout/mp4:somestreamname
    Salvadore

  8. #8
    Join Date
    Dec 2011
    Posts
    8

    Default

    Sorry about the long delay in responding to this. Getting the customer to help out here is a bit, well, difficult.

    We did trace the issue back to the client's library. To publish, they simply hand a complete URL such as:

    rtmp://ourserver/rtmplive/_definst_/mp4:NewLayout/ricktest06

    to the library and it would split things at the last "/". Everything before that was the application name, and everything after it was the stream name. Hence the stream name wasn't prefixed by "mp4:", so it wrote FLV files. They got a beta version of the library and now they can specify the application and stream name and things are good as far as that's concerned.

    We've hit another problem. I use the above publishing URL to have ffmpeg stream my web camera. I then try to watch the live streams.

    Using an OSMF player to play "http://ourserver/rtmplive/_definst_/NewLayout/ricktest06/manifest.f4m" seems to work (although there is a huge delay...possibly something from ffmpeg). However, if I try to play "http://ourserver/rtmplive/_definst_/NewLayout/ricktest06/playlist.m3u8" using Safari on a Macbook Air, I get the m3u8 file, but we get 404s on the chunklists associated with it and the m3u8 file itself has a MIME type of "application/vnd.apple.mpegurl" (which Safari can't handle).

    Am I doing something wrong here? What would be correct live URLs for people to watch the streams?

  9. #9

    Default

    Hello there,
    This could be caused by application configurations, audio/video codec dependencies, bit rate/profile to high, as well as other causes.

    You might try a clean application and test streaming to that application, making sure the profile is "main" or "baseline". And, or you could zip up your /conf and /logs folders and send then to support@wowza.com to open a ticket.

    Thank you.

    Salvadore

  10. #10
    Join Date
    Dec 2011
    Posts
    8

    Default

    Actually, more research shows that the client's library is still splitting the app, app instance and stream names at the wrong spot. We're working on that.

    I'll keep you posted.

Page 1 of 2 12 LastLast

Similar Threads

  1. flv via http from mp4 on s3
    By biomancer in forum On-Demand Streaming
    Replies: 2
    Last Post: 09-08-2014, 06:47 AM
  2. mp4 and flv
    By kenji24 in forum Live Streaming and Encoders
    Replies: 2
    Last Post: 02-14-2014, 08:09 PM
  3. http(hls) streaming with smil file to refer 1 mp4 file ( multi-cahannels )
    By qstream in forum Video On Demand Streaming Discussion
    Replies: 4
    Last Post: 10-26-2013, 12:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •