Hi Romain, Thank you for your answer. I don't know how to build from that repo. I built from liquidsoap-full source, and now the script runs, but I can't visualize the video with a browser, it just keeps loading forever (e.g.: localhost:8000/gymix_video). The terminal also looks like frozen, and if I hit Ctrl-C it won't terminate the process: igle@liglex1604:~/radio$ liquidsoap mp4.liq 2016/05/17 13:28:39 >>> LOG START 2016/05/17 13:28:38 [main:3] Liquidsoap 1.2.0+scm (git://github.com/savonet/liquidsoap.git@a3989a7525348f1cb316689b72014a10d037a54c:20160516:134347) 2016/05/17 13:28:38 [main:3] Using: graphics=[distributed with Ocaml] bytes=[distributed with OCaml 4.02 or above] pcre=7.0.4 dtools=0.3.2 duppy=0.5.2 duppy.syntax=0.5.2 cry=0.4.0 mm=0.3.0 xmlplaylist=0.1.4 lastfm=0.3.1 ogg=0.5.0 vorbis=0.6.2 opus=0.1.1 speex=0.2.1 mad=0.4.5 flac=0.1.2 flac.ogg=0.1.2 dynlink=[distributed with Ocaml] lame=0.3.3 shine=0.2.1 gstreamer=0.2.2 frei0r=0.1.1 aacplus=0.2.2 voaacenc=0.1.1 fdkaac=0.2.1 theora=0.3.1 schroedinger=0.1.1 gavl=0.1.6 ffmpeg=0.1.1 bjack=0.1.5 alsa=0.2.2 ao=0.2.1 samplerate=0.1.3 taglib=0.3.2 magic=0.7.3 camomile=0.8.4 faad=0.3.3 soundtouch=0.1.8 portaudio=0.2.1 pulseaudio=0.1.3 ladspa=0.1.5 dssi=0.1.2 sdl=0.9.1 camlimages=4.2.0 lo=0.1.1 2016/05/17 13:28:38 [main:2] 2016/05/17 13:28:38 [main:2] DISCLAIMER: This version of Liquidsoap has been 2016/05/17 13:28:38 [main:2] compiled from a snapshot of the development code. 2016/05/17 13:28:38 [main:2] As such, it should not be used in production 2016/05/17 13:28:38 [main:2] unless you know what you are doing! 2016/05/17 13:28:38 [main:2] 2016/05/17 13:28:38 [main:2] We are, however, very interested in any feedback 2016/05/17 13:28:38 [main:2] about our development code and committed to fix 2016/05/17 13:28:38 [main:2] issues as soon as possible. 2016/05/17 13:28:38 [main:2] 2016/05/17 13:28:38 [main:2] If you are interested in collaborating to 2016/05/17 13:28:38 [main:2] the development of Liquidsoap, feel free to 2016/05/17 13:28:38 [main:2] drop us a mail at <[email protected]> 2016/05/17 13:28:38 [main:2] or to join the #savonet IRC channel on Freenode. 2016/05/17 13:28:38 [main:2] 2016/05/17 13:28:38 [main:2] Please send any bug report or feature request 2016/05/17 13:28:38 [main:2] at <https://github.com/savonet/liquidsoap/issues>. 2016/05/17 13:28:38 [main:2] 2016/05/17 13:28:38 [main:2] We hope you enjoy this snapshot build of Liquidsoap! 2016/05/17 13:28:38 [main:2] 2016/05/17 13:28:38 [protocols.external:3] Didn't find "curl". 2016/05/17 13:28:38 [gstreamer.loader:3] Loaded GStreamer 1.8.0 0 2016/05/17 13:28:39 [decoder:3] Method "GSTREAMER" accepted "sample_300kbit.mp4". 2016/05/17 13:28:39 [single:3] "sample_300kbit.mp4" is static, resolving once for all... 2016/05/17 13:28:39 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master. 2016/05/17 13:28:39 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples. 2016/05/17 13:28:39 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks. 2016/05/17 13:28:39 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks. 2016/05/17 13:28:39 [threads:3] Created thread "generic queue #1". 2016/05/17 13:28:39 [threads:3] Created thread "generic queue #2". 2016/05/17 13:28:39 [single_8822:3] Prepared "sample_300kbit.mp4" (RID 0). 2016/05/17 13:28:39 [gymix_video:3] Connecting mount gymix_video for source@localhost... 2016/05/17 13:28:39 [gymix_video:3] Connection setup was successful. 2016/05/17 13:28:39 [threads:3] Created thread "wallclock_main" (1 total). 2016/05/17 13:28:39 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock. # Here it won't do anything, it will stay like this forever, so I hit Ctrl-C ^C2016/05/17 13:29:48 [main:3] Shutdown started! 2016/05/17 13:29:48 [main:3] Waiting for threads to terminate... # And here it will stay like this again, forever. Then I try write killall liquidsoap but it will continue like this, so I have to reboot.
Regards, Mikel On 2016-05-14 19:30, Romain Beauxis wrote: > Hi Mikel, > > I think that your problem comes from the fact that the simple.mp4 > media file only has one audio channel but the encoder requires sources > with two audio channels. You should try to either change the source > file to a video with stereo audio or else set channels=1 in the > encoder. > > While looking at your issue, I made some changes in the gstreamer > code. If you can, feel free to test the latest github code. > > Romain > > 2016-05-11 12:08 GMT-05:00 <[email protected]>: > >> Hi everyone, >> >> The past week I installed Icecast2 and Liquidsoap in a Amazon EC2 >> free instance (Ubuntu 14.04) for my company. I can output to icecast >> playlists with mp3 files without any problem. The problem arises >> when I try to output a video file. I have tried with 2 different MP4 >> files and 1 AVI file. One of them cannot be shared, but I put here >> the other two: >> >> MP4: http://techslides.com/demos/sample-videos/small.mp4 >> >> AVI: http://www.engr.colostate.edu/me/facil/dynamics/files/drop.avi >> >> Well, I'm not really interested in playing AVI files in the radio. I >> have tried with %gstreamer decoder and %ogg(%theora,%vorbis), but >> both throw the same error: >> >> Could not get a valid media file of kind {audio=1;video=1;midi=0} >> from "small.mp4". >> >> And liquidsoap -r small.mp4 says this: >> >> Request resolved. >> rid="0" >> tool="HandBrake 0.9.4 2009112300" >> status="ready" >> initial_uri="small.mp4" >> temporary="false" >> filename="small.mp4" >> decoder="MP4" >> kind="{audio=0+;video=0+;midi=0+}" >> Computing duration: failed. >> >> Everything is in the ~/radio/ directory. There I have the script >> (mp4.liq) and the video (small.mp4). This is the script: >> >> #!/usr/bin/liquidsoap >> set("log.file",false) >> set("log.stdout",true) >> set("log.level",3) >> set("decoder.file_decoders",["MAD","GSTREAMER"]) >> set("decoder.file_extensions.gstreamer",["mp4"]) >> set("decoder.mime_types.gstreamer",["video/mp4"]) >> >> src = single("small.mp4") >> >> output.icecast( >> format = "video/mp4", >> icy_metadata = "false", >> %gstreamer( >> channels=2, >> audio="lamemp3enc", >> has_video=true, >> video="x264enc", >> muxer="mpegtsmux", >> metadata="metadata", >> log=5, >> pipeline="" >> ), >> host = "localhost", >> port = 8000, >> password = "omitted", >> mount = "gymix_video", >> src >> ) >> >> I have tried changing the parameters of %gstreamer (e.g.: >> channels=1). And also tried using %ogg(%theora,%vorbis) instead of >> %gstreamer(channels=2, audio...); tried changing the directory of >> the scripts, of the videos; tried changing permissions of files; >> removed+purged liquidsoap a couple of times and reinstalled it (with >> apt-get install and with aptitude install); tried to build it from >> source (couldn't, I did git clone, make init, make update, and in >> the next step ./bootstrap threw error). Tried in my own Ubuntu 16.04 >> too, doesn't work. >> >> I paste here the output of dpkg -l | grep gstreamer and dpkg -l | >> grep liquidsoap (without Description so that it's not so long): >> >> ii gir1.2-gstreamer-1.0 1.2.4-0ubuntu1 >> amd64 >> ii gstreamer-tools 0.10.36-1.2ubuntu3 >> amd64 >> ii gstreamer0.10-tools 0.10.36-1.2ubuntu3 >> amd64 >> ii gstreamer1.0-libav:amd64 1.2.4-1~ubuntu1 >> amd64 >> ii gstreamer1.0-tools 1.2.4-0ubuntu1 >> amd64 >> ii libgstreamer-ocaml 0.2.0-2build1 >> amd64 >> ii libgstreamer-ocaml-dev 0.2.0-2build1 >> amd64 >> ii libgstreamer-plugins-base1.0-0:amd64 1.2.4-1~ubuntu2 >> amd64 >> ii libgstreamer-plugins-base1.0-dev 1.2.4-1~ubuntu2 >> amd64 >> ii libgstreamer-plugins-good1.0-0:amd64 1.2.4-1~ubuntu1 >> amd64 >> ii libgstreamer0.10-0:amd64 0.10.36-1.2ubuntu3 >> amd64 >> ii libgstreamer1.0-0:amd64 1.2.4-0ubuntu1 >> amd64 >> ii libgstreamer1.0-dev 1.2.4-0ubuntu1 >> amd64 >> >> ii liguidsoap 1.1.1-6ubuntu2 >> all >> ii liquidsoap 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-faad 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-flac 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-gstreamer 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-icecast 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-lame 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-mad 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-ogg 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-pulseaudio 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-taglib 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-theora 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-voaacenc 1.1.1-6ubuntu2 >> amd64 >> ii liquidsoap-plugin-vorbis 1.1.1-6ubuntu2 >> amd64 >> >> (In one of the installations I had all plugins installed, didn't >> work neither). >> >> Also this command displays the video correctly from the start to the >> end (if I connect with VNC to the server and run it): >> >> gst-launch-1.0 filesrc location=test.mp4 ! decodebin ! >> autovideoconvert ! autovideosink >> >> I wish you could help me solve this problem before the end of this >> week, it's very important. >> >> Regards, >> >> Mikel >> > ------------------------------------------------------------------------------ >> Mobile security can be enabling, not merely restricting. Employees >> who >> bring their own devices (BYOD) to work are irked by the imposition >> of MDM >> restrictions. Mobile Device Manager Plus allows you to control only >> the >> apps on BYO-devices by containerizing them, leaving personal data >> untouched! >> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j >> _______________________________________________ >> Savonet-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/savonet-users > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of > MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data > untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > _______________________________________________ > Savonet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/savonet-users ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
