works but FMLECmd does not

Dear Lazyweb,

How can it be ts the GUI of FMLE is able to connect and stream video, but the command line version, running with the same XML file and as the same user, cannot?

These error-looking farts in FMLECmd's output (shared memory, mach ports, command not found) do not occur in the log when the GUI runs.

+ exec '/Applications/Adobe/Flash Media Live Encoder 3.2/CommandLineFMLE/FMLECmd' /p /Users/jwz/src/icecast/streamup.xml
Adobe(R) Flash(R) Media Live Encoder Command Line Utility v
Copyright(C) 2009-10 Adobe Systems Incorporated. All rights reserved.

DVFreeThread - CFMachPortCreateWithPort hack = 0xe6bb50, fPowerNotifyPort= 0xe6b720
DVFreeThread - CFMachPortCreateWithPort hack = 0x2c6a310, fPowerNotifyPort= 0x2c63fd0
[ ... lots more like that ... ]

No such file or directory
Mon Aug 18 2014 13:30:09 : Unable to initialize Shared Memory.
Mon Aug 18 2014 13:30:09 :
Video Settings :-
       Device      : Blackmagic HD 720p 60 - 10 Bit
       Format      : H.264
       Input Size  : 1280x720
       Output Size : 640x360;
       Bit rate    : 350 Kb ps;
       Frame Rate  : 60.00 fps
       Crop        : Disabled
       Timecode    : Disabled
       Deinterlace : Disabled

Audio Settings :-
       Device      : Line In
       Format      : Mp3 Stereo
       Sample Rate : 44100 Hz
       Bit rate    : 96 Kbps
       Volume      : 74 %

Stream to Flash Media Server :-
       FMS URL     : rtmp://
[ ... ]
       Backup URL  :
       Stream Name :
[ ... ]

Mon Aug 18 2014 13:30:09 : Selected video input device: Blackmagic HD 720p 60 - 10 Bit
Mon Aug 18 2014 13:30:09 : Selected audio input device: Line In
DVFreeThread - CFMachPortCreateWithPort hack = 0xa88e20, fPowerNotifyPort= 0xa87e00
DVFreeThread - CFMachPortCreateWithPort hack = 0xd7b1e0, fPowerNotifyPort= 0xd7c280
[ ... more of same ... ]

No such file or directory
Mon Aug 18 2014 13:30:09 : Unable to initialize Shared Memory.
Mon Aug 18 2014 13:30:09 : Primary - Connected to FMS/3,5,7,7009
Mon Aug 18 2014 13:30:09 : Primary - Network Command: onFCPublish
Mon Aug 18 2014 13:30:09 : Primary - Stream
[...] Status: Success
Mon Aug 18 2014 13:30:10 : Primary - Stream
[...] Status: NetStream.Publish.Start
Mon Aug 18 2014 13:30:10 : Primary - Network Command: onMessageFromServer
Mon Aug 18 2014 13:30:10 : Session Started
Mon Aug 18 2014 13:30:10 : Audio Encoding Started
[ ... ]

Streaming to Primary...
[ ... and then it doesn't encode anything. ]

Also: how do I set the output frame rate? It is changing the resolution just fine, but if I set the frame rate to anything but 60, I get "an unexpected encoding error occurred" every 30 seconds, and it drops and reconnects.

Is there any non-GUI alternative to FMLECmd that runs on MacOS?

Tags: , , , , ,

17 Responses:

  1. Chas. Owens says:

    Not a direct answer, but have you tried renaming the command to FMLECmd.real and then creating a shell script to dump the arguments and environment before running FMLECmd.real?

  2. Manuel says:

    You have certainly tried to run the FMLECmd as root user, right ?
    I know I know less about that topic than you do, but were Mac.apps not able to gain higher priviliges/rights once admitted?

    • jwz says:

      Yes, I have. When run as root, it bombs out with an assertion failure.

      It's really an amazingly shitty piece of software, and it hasn't been updated in 5 years.

  3. Jason says:

    I have nothing to add, but it took me until the capital E to realize the app probably wasn't named "Fuck My Life".

  4. crc34 says:

    I've had good luck using ffmpeg to stream RTMP out to Zencoder from a Blackmagic device before. Have you tried doing that?

    Since various streaming providers all use different implementations of RTMP (Red5 and the like) there are some incompatibilities between ffmpeg and streaming providers. But its worth a shot.

    Or you could just ditch the streaming provider and output HLS and upload to S3 and then stream it out via Cloudfront or some other CDN using native HLS support on Safari/iOS and Chromeless HLS player (flash implementation of HLS) from:

    Contact me if you want more details and example command lines and options for ffmpeg.

    • jwz says:

      Sure, an ffmpeg recipe would be nice to see.

      I don't want to pay for my own video bandwidth because I'm already burning enough money giving away webcasts for free. Increasing the cost even more is not cool.

    • jwz says:

      Well, I just spent 30 minutes figuring out how to get ffmpeg to even tell me what it thinks the name of the video device is, and wasted another 10 failing to figure out how to get it to tell me what it thinks the name of the Mac's line-in audio port is, so... yeah... a recipe would be extremely helpful.

      This is about par for course with my attempts to use ffmpeg. It's like they taught a user interface how to hate humans. How is this software 13 years old and people still tolerate this?

      • nooj says:

        I don't know, and I spend every day of my life wondering the same thing. My field thinks "UI" is "I finally got it to work for my situation."

      • James says:

        ffmpeg sucks due to all the parts they had to disembowel and then sew back together as optional modules, because of patents of course.

      • jml says:

        I now understand why I've downloaded a couple of different software packages that were, AFAICT, just GUI frontends to ffmpeg. (Not Mac, so I can't help with that, just commiserating.)

      • crc34 says:

        Here's an example to have ffmpeg stream RTMP to a server when it plays HLS:

        ./ffmpeg -re -i http://localhost/streams/hls-stream.m3u8 -vcodec copy -r 25 -acodec mp3 -ab 64k -vb 5500k -ar 44100 -v debug -fdebug ts -f flv rtmp://[YOUR HOSTNAME]:1935/live/[YOUR STREAM NAME]

        • jwz says:

          But that's reading from a file, right? I still have no idea how to get the audio from the line-in jack and the video from the Blackmagic box muxed together.

          • crc34 says:

            That example is just playing a HLS stream, it could be a mp4 or any other ffmpeg input.

            So you want ffmpeg to read two inputs at once.. the SDI cable doesn't have the mixed in audio? I seem to recall you were using a blackmagic device, but it seems to be the case.

            Did you build ffmpeg with OpenAL?

            OpenAL is part of CoreAudio on Mac OS X.

            Once you get the audio in working, and the BlackMagic working just mux them together.

            You can just map the two inputs like this to the output stream:

            (you'll have one -i for the OpenAL and the other -i for the BlackMagic, you may want -an on the BM input so you don't take its audio at all)

            -map 0:v:0 -map 1:a:0 -f flv rtmp://[YOUR HOSTNAME]:1935/live/[YOUR STREAM NAME]

            • jwz says:

              the SDI cable doesn't have the mixed in audio?

              No. The SDI cable just has video from the cameras, post-switcher. I suppose I could buy another box to inject the audio onto the SDI or HDMI stream, but I don't have one at the moment. We have a Blackmagic UltraStudio Mini Recorder and it just has SDI and HDMI on one end and Thunderbolt on the other.

              Did you build ffmpeg with OpenAL?

              I don't know how to tell. I did this: "port install ffmpeg +nonfree +librtmp +libdc1394"

            • jwz says:

              FWIW, it's ffmpeg 2.2.3.

              Also, in my FMLE config, there are two big hex numbers: the one at the end of the rtmp URL, and one called "stream". This was true with both Justin and Streamup. Where does that second number go?