Configure %ffmpeg(%video.copy, %audio.copy, format='flv') not working. #1884
-
Hello, I try to create an internet tv station application. Code working: settings.init.allow_root.set(true) encoder = %ffmpeg(%video(codec='libx264', b='1024k'), %audio(codec='aac', b='192k'), _format='flv') output.url(url='rtmp://server:port/live/stream', encoder, mediaplaylist) Code not working: settings.init.allow_root.set(true) encoder = %ffmpeg(%video.copy, %audio.copy, format='flv') output.url(url='rtmp://server:port/live/stream', encoder, mediaplaylist) Error on console is: Error 5: this value has type I try with version 2.0.0 and 2.1.0 with same result. Best Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
I think that this is because of the |
Beta Was this translation helpful? Give feedback.
-
Thanks for your email with the script, I was able to confirm the issue and fix it! Here's a script that works here with very little CPU usage: audio.samplerate.set(48000)
audio.channels.set(2)
video.frame.width.set(640)
video.frame.height.set(360)
settings.frame.video.framerate.set(24)
settings.log.level.set(4)
settings.log.stdout.set(true)
mediaplaylist = playlist(mode='normal',reload_mode='watch','/tmp/video/pl')
security = single('/tmp/video/security.mp4')
mediaplaylist = fallback(track_sensitive=false, [security, mediaplaylist])
encoder = %ffmpeg(%video.copy, %audio.copy, format='flv')
output.url(url='rtmp://pstnet6.shoutcastnet.com:6100/live/stream', encoder, mediaplaylist) Unless you really need it, I'd suggest to keep ffmpeg logs to the default and liquidsoap logs to level Let me know if the fix works for you! It should be available both in the |
Beta Was this translation helpful? Give feedback.
Thanks for your email with the script, I was able to confirm the issue and fix it! Here's a script that works here with very little CPU usage:
Unl…