Closed voluburator closed 3 years ago
Hi,
This is a know issue, I'm gonna send an update on opam
right away. Meanwhile, you can do the following:
git clone git@github.com:savonet/ocaml-ffmpeg.git
cd ocaml-ffmpeg
opam install -y .
git clone git@github.com:savonet/liquidsoap.git
cd liquidsoap
git checkout v2.0.0
opam install -y .
Sorry about that.
It seems with codec = "libfdk_aac" similar problems. Please check. When will it be possible to get the update from opam?
Have you tried to pin to the latest version as suggested above?
Yes, but new problem. I'm trying to start a YouTube stream but nothing happens
Log:
2021/09/14 19:59:29 >>> LOG START
2021/09/14 19:59:29 [main:3] Liquidsoap 2.0.0
2021/09/14 19:59:29 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=7.4.6 sedlex=2.4 menhirLib=20210419 dtools=0.4.4 duppy=0.9.2 cry=0.6.5 mm=0.7.1 mad=0.5.0 dynlink=[distributed with Ocaml] lame=0.3.4 fdkaac=0.3.2 ffmpeg-avutil=e50c556 ffmpeg-avcodec=e50c556 ffmpeg-avdevice=e50c556 ffmpeg-av=e50c556 ffmpeg-avfilter=e50c556 ffmpeg-swresample=e50c556 ffmpeg-swscale=e50c556 samplerate=0.1.6 taglib=0.3.6 camomile=1.0.2
2021/09/14 19:59:29 [clock:3] Using builtin (low-precision) implementation for latency control
2021/09/14 19:59:29 [lang:2] WARNING: "set" is deprecated and will be removed in future version. Please use settings.path.to.key.set(value)
2021/09/14 19:59:29 [lang:2] WARNING: "set" is deprecated and will be removed in future version. Please use settings.path.to.key.set(value)
2021/09/14 19:59:29 [lang:2] WARNING: "set" is deprecated and will be removed in future version. Please use settings.path.to.key.set(value)
2021/09/14 19:59:29 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz main.
2021/09/14 19:59:29 [frame:3] Video frame size set to: 1280x720
2021/09/14 19:59:29 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2021/09/14 19:59:29 [frame:3] Targeting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2021/09/14 19:59:29 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2021/09/14 19:59:29 [sandbox:3] Sandboxing disabled
2021/09/14 19:59:29 [video.converter:3] Using preferred video converter: ffmpeg.
2021/09/14 19:59:29 [audio.converter:3] Using samplerate converter: ffmpeg.
2021/09/14 19:59:30 [clock.main:3] Streaming loop starts in auto-sync mode
2021/09/14 19:59:30 [clock.main:3] Delegating synchronisation to CPU clock
2021/09/14 19:59:30 [decoder:3] Unable to decode "/var/relaxmixer/pianorelaxyoutube/media/air/6.mp3"!
2021/09/14 19:59:30 [decoder:3] Available decoders cannot decode "/var/relaxmixer/pianorelaxyoutube/media/air/6.mp3" as {audio=none,video=yuva420p,midi=none}
2021/09/14 19:59:30 [mksafe:3] Switch to safe_blank.
2021/09/14 19:59:30 [playlist_0:3] Prepared "/var/relaxmixer/pianorelaxyoutube/media/air/1.mp3" (RID 1).
2021/09/14 19:59:30 [mksafe:3] Switch to playlist_0 with transition.
2021/09/14 19:59:30 [stderr:3] [mp3float @ 0x7fdc4c05e3c0] Could not update timestamps for skipped samples.
2021/09/14 19:59:30 [mksafe:3] Switch to safe_blank.
-- Unit pianorelaxyoutube.service has finished starting up.
MY LIQ FILE:
set("init.daemon.pidfile.path", "/run/pianorelaxyoutube.pid")
set("log.file.path","/var/log/liquidsoap/pianorelaxyoutube.log") set("log.level", 3)
audio = playlist(mode="random", "/var/relaxmixer/pianorelaxyoutube/media/air")
audio = mksafe(audio)
audio = ffmpeg.encode.audio( %ffmpeg(%audio(codec="libmp3lame")), audio)
video = playlist(mode="random", "/var/relaxmixer/pianorelaxyoutube/media") video = mksafe(video)
video = ffmpeg.encode.video( %ffmpeg(%video(codec="libx264")), video)
stream = mux_video(video=video, audio)
enc = %ffmpeg( format="flv", %audio.copy, %video.copy)
key = "-------------" url = "rtmp://a.rtmp.youtube.com/live2/#{key}" output.url(url=url, enc, stream)
Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-156-generic x86_64) opam 4.08.0 liquidsoap v 2.0.0 rc-1
Liquidsoap whith ffmpeg but i cannot start broadcasting - dependencies are required, although installed on the system
Encode it in mp3:
source = ffmpeg.encode.audio( %ffmpeg(%audio(codec="libmp3lame",samplerate=44100,channels=2)) source)
LOG:
Sep 14 15:57:52 live.radiospinner.com liquidsoap[9979]: Error 12: Unsupported format: %ffmpeg(%audio(codec="libmp3lame",samplerate=44100,channels=2)). Sep 14 15:57:52 live.radiospinner.com liquidsoap[9979]: You must be missing an optional dependency. Sep 14 15:57:52 live.radiospinner.com systemd[1]: pianorelaxyoutube.service: Control process exited, code=exited status=1 Sep 14 15:57:52 live.radiospinner.com systemd[1]: pianorelaxyoutube.service: Failed with result 'exit-code'.