Hello Jaron.
I am jumping inside this thread, because I'm trying to accomplish exactly the same task, restream an udp stream with mistserver.
By using your suggestion (ffmpeg from cmd line) everything works as expected.
I can grab the udp stream, encode and push to rtmp, all by using a single command.
ffmpeg -y -f mpegts -i udp://.. -re -vcodec libx264 -profile:v baseline -level 30 -preset slow -maxrate 500k -s 960x540 -acodec libfaac -ar 48000 -ab 80k -f flv rtmp://..:1935/play/test
Next step is using mistserver to grab content, avoiding command line.
This does not work, ffmpeg dumps and mistcontroller keeps trying to relaunch the same command, with no success.
For reference, parameter string is
udp://... -vcodec libx264 -profile:v baseline -level 30 -preset slow -maxrate 500k -s 960x540 -acodec libfaac -ar 48000 -ab 80k
From log, MistController keeps launching
ffmpeg -re -async 2 -i udp://.. -vcodec libx264 -profile:v baseline -level 30 -preset slow -maxrate 500k -s 960x540 -acodec libfaac -ar 48000 -ab 80k -f flv - | /usr/bin/MistFLV2DTSC | /usr/bin/MistBuffer -t 120000 -s test
I did found the relative code inside controller_streams.cpp.
ffmpeg command has the first 2 parameters hardcoded, then user input concatenated, and last output settings.
ffmpeg -re --async 2 -i [USER_PARAMETERS] -f flv -
Too bad, ffmpeg is extremely sensible to parameter positioning. By removing "-re" from start, and putting inside "USER_PARAMETERS" after the input stream, ffmpeg works correctly.
Thus I did modify source, compiled and tested the "new" version.
No success :(
By manually using the same command, launched from shell, I can make things work as expected.
Full command, grabbed from MistController log is
ffmpeg -async 2 -i udp://@... -re -vcodec libx264 -profile:v baseline -level 30 -preset slow -maxrate 500k -s 960x540 -acodec libfaac -ar 48000 -ab 80k -f flv - | /usr/bin/MistFLV2DTSC | /usr/bin/MistBuffer -t 120000 -s test
Simple copy&paste, and everything runs.
I don't know what makes MistController thinks command does not work, maybe response time from ffmpeg is too high due to buffer length?
I can read in log "Process test fully terminated." after less than a second, while when running from command line ffmpeg does need at least 5s to start outputting to stdout.
Regarding ffmpeg parameters, IMHO, we do have 2 options:
1. Write a small parser, which will check and reorder ffmpeg parameters. Complex and hard to maintain.
2. Remove hardcoded parameters and let user provide full input string, maybe along with some "presets" written somewhere in documentation.
Let me know if I can provide useful informations or help with debugging.
Regards
Matteo