Problems generating a file with sout in python

About encoding, codec settings, muxers and filter usage
EparionaD
New Cone
New Cone
Posts: 3
Joined: 17 Feb 2018 14:37

Problems generating a file with sout in python

Postby EparionaD » 13 Nov 2019 22:32

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

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: Problems generating a file with sout in python

Postby unidan » 14 Nov 2019 11:15

Hi, what are the logs ?

EparionaD
New Cone
New Cone
Posts: 3
Joined: 17 Feb 2018 14:37

Re: Problems generating a file with sout in python

Postby EparionaD » 15 Nov 2019 14:40

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]$


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 8 guests