I am using FMLE to record and live stream TV content. In order to this I am remotely calling FMLEcmd in order to start and stop encoding processes. The problem that I am running in to is that the .flv files generated are corrupt. The odd thing is that if I use the exact same profile XML from the GUI, then the encoding process works just fine and results appear as intended.
Here is the way my workflow works:
I start the process by calling
FMLEcmd /p C:\lighttpd\htdocs\xml\default.xml /l C:\lighttpd\htdocs\logs\log.txt
then at the conclusion of the recording I call
FMLEcmd /s "C:\lighttpd\htdocs\files\default.flv"
----
When I attempt to open the files using FFmpeg I get a codec error saying that no codecs were detected. When I attempt to open the files in VLC I get a error saying that the media types are "Undf". When I attempt to open or modify the files with flvtool2 I get an end-of-file error. My guess is that my stop command is incorrect and somehow abruptly stopping the stream, but I don't know another way to stop the stream. Do I need to specify a specific stream duration in the XML and make sure to call the stop command *after* the duration has been reached? What would cause this codec corruption when the same profile works properly from the GUI?
Here is the profile I am attempting to use.
<?xml version="1.0" encoding="UTF-16"?>
<flashmedialiveencoder_profile>
<preset>
<name>Custom</name>
<description></description>
</preset>
<capture>
<video>
<device>Osprey-440 Video Device 1A</device>
<crossbar_input>0</crossbar_input>
<frame_rate>20.00</frame_rate>
<size>
<width>640</width>
<height>480</height>
</size>
</video>
<audio>
<device>SigmaTel Audio</device>
<crossbar_input>0</crossbar_input>
<sample_rate>22050</sample_rate>
<channels>1</channels>
<input_volume>75</input_volume>
</audio>
</capture>
<process>
<video>
<preserve_aspect></preserve_aspect>
<deinterlace></deinterlace>
</video>
</process>
<encode>
<video>
<format>VP6</format>
<datarate>650;</datarate>
<outputsize>640x480;</outputsize>
<advanced>
<keyframe_frequency>5 Seconds</keyframe_frequency>
<quality>Best Quality - Lower Framerate</quality>
<noise_reduction>None</noise_reduction>
<datarate_window>Medium</datarate_window>
<cpu_usage>Dedicated</cpu_usage>
</advanced>
<autoadjust>
<enable>false</enable>
<maxbuffersize>1</maxbuffersize>
<dropframes>
<enable>false</enable>
</dropframes>
<degradequality>
<enable>false</enable>
<minvideobitrate></minvideobitrate>
<preservepfq>false</preservepfq>
</degradequality>
</autoadjust>
</video>
<audio>
<format>MP3</format>
<datarate>48</datarate>
</audio>
</encode>
<restartinterval>
<days></days>
<hours></hours>
<minutes></minutes>
</restartinterval>
<reconnectinterval>
<attempts></attempts>
<interval></interval>
</reconnectinterval>
<output>
<file>
<limitbysize>
<enable>false</enable>
<size>10</size>
</limitbysize>
<limitbyduration>
<enable>false</enable>
<hours>0</hours>
<minutes>60</minutes>
</limitbyduration>
<path>C:\lighttpd\htdocs\files\default.flv</path>
</file>
</output>
<metadata>
<entry>
<key>author</key>
<value></value>
</entry>
<entry>
<key>copyright</key>
<value></value>
</entry>
<entry>
<key>description</key>
<value></value>
</entry>
<entry>
<key>keywords</key>
<value></value>
</entry>
<entry>
<key>rating</key>
<value></value>
</entry>
<entry>
<key>title</key>
<value></value>
</entry>
</metadata>
<preview>
<video>
<input>
<zoom>100%</zoom>
</input>
</video>
<audio></audio>
</preview>
<log>
<level>100</level>
<directory>C:\Documents and Settings\Administrator\My Documents\My Videos</directory>
</log>
</flashmedialiveencoder_profile>