Page 1 of 1

Problems generating a file with sout in python

Posted: 13 Nov 2019 22:32
by EparionaD
Good afternoon

I have the following code in python:

Code: Select all

import time import vlc def grabar_audio(): convertidor = "--sout=#transcode{acodec=flac,ab=320,channels=1,samplerate=16000}:std{access=file,mux=raw,dst='/home/eparionad/Descargas/audio.flac'} --run-time=40 --stop-time=40" instancia = vlc.Instance(convertidor) reproductor = instancia.media_player_new() medios = instancia.media_new('http://198.15.86.218:9386/stream') medios.get_mrl() reproductor.set_media(medios) reproductor.play() time.sleep(40) return medios grabar_audio()
The problem I have is that in the end I can't generate the flac file. I don't know what mistake I am making. Could you help me. I have installed vlc 3.0.8 and python-vlc.

Thank you

Re: Problems generating a file with sout in python

Posted: 14 Nov 2019 11:15
by unidan
Hi, what are the logs ?

Re: Problems generating a file with sout in python

Posted: 15 Nov 2019 14:40
by EparionaD
good morning

Sorry for the delay, this is all that appears on the console. Or you could explain how to view the logs you need.

Regards.

Code: Select all

eparionad@Sp1k3 ~]$ cd Descargas/ [eparionad@Sp1k3 Descargas]$ python radio.py [00007f9cb800af50] mpeg4audio demux packetizer: AAC channels: 2 samplerate: 22050 [eparionad@Sp1k3 Descargas]$