Stop working record audio stream

About encoding, codec settings, muxers and filter usage
Tormund1985
New Cone
New Cone
Posts: 9
Joined: 17 Aug 2022 10:22

Stop working record audio stream

Postby Tormund1985 » 26 Aug 2022 08:54

I am working with the following command from an ubuntu server to record an audio stream that I am broadcasting from a Pi zero with microphone through ffmpeg.

Code: Select all

cvlc --repeat -vvv tcp/wav://7xxxxx --sout="#std{access=file,mux=ogg,dst=/home/VLC_audios/$(date +%Y%m%d_%H%M%S_audio).wav}"
After executing the command in VLC it starts working but after a few minutes it stops working, without showing any log or warning. I know it has stopped working because the .wav file stops increasing its size.

I don't have great knowledge in cvlc so I would appreciate your help.

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

Re: Stop working record audio stream

Postby unidan » 29 Aug 2022 13:47

Can you share the broadcast ffmpeg command too ?

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: Stop working record audio stream

Postby InTheWings » 29 Aug 2022 14:52

wav into ogg won't achieve anything
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

Tormund1985
New Cone
New Cone
Posts: 9
Joined: 17 Aug 2022 10:22

Re: Stop working record audio stream

Postby Tormund1985 » 30 Aug 2022 09:17

Can you share the broadcast ffmpeg command too ?
Of course:

Code: Select all

while true; do ffmpeg -ar 44100 -ac 1 -f alsa -i plughw:2,0 -f wav -listen 1 tcp://xxxxx:xxxxx@0.0.0.0:8554; done

Tormund1985
New Cone
New Cone
Posts: 9
Joined: 17 Aug 2022 10:22

Re: Stop working record audio stream

Postby Tormund1985 » 30 Aug 2022 09:19

wav into ogg won't achieve anything
So which output should I use for the mux? wav directly?

Thanks.

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

Re: Stop working record audio stream

Postby unidan » 30 Aug 2022 09:59

For wav, you can use the wav muxer, and let the correct demuxer open (avformat will get chosed).

Code: Select all

while true; 130 ↵ do ffmpeg -ar 44100 -ac 1 -f pulse -i alsa_input.pci-0000_00_1f.3.analog-stereo.3 -f wav -listen 1 tcp://0.0.0.0:8554; done # ... cvlc -vvv tcp://127.0.0.1:8554 --sout="#std{access=file,mux=wav,dst=audiotest$(date +%Y%m%d_%H%M%S_audio).wav}"

Tormund1985
New Cone
New Cone
Posts: 9
Joined: 17 Aug 2022 10:22

Re: Stop working record audio stream

Postby Tormund1985 » 30 Aug 2022 10:19

For wav, you can use the wav muxer, and let the correct demuxer open (avformat will get chosed).

Code: Select all

while true; 130 ↵ do ffmpeg -ar 44100 -ac 1 -f pulse -i alsa_input.pci-0000_00_1f.3.analog-stereo.3 -f wav -listen 1 tcp://0.0.0.0:8554; done # ... cvlc -vvv tcp://127.0.0.1:8554 --sout="#std{access=file,mux=wav,dst=audiotest$(date +%Y%m%d_%H%M%S_audio).wav}"
When I execute sh file it shows, but I tested and its recording.

Code: Select all

libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 alsa_input.pci-0000_00_1f.3.analog-stereo.3: No such process

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

Re: Stop working record audio stream

Postby unidan » 30 Aug 2022 10:25

Hi, you should replace the -f pulse -i .... by -f alsa -i plughw:2,0 on your end if you use alsa for that.

Tormund1985
New Cone
New Cone
Posts: 9
Joined: 17 Aug 2022 10:22

Re: Stop working record audio stream

Postby Tormund1985 » 30 Aug 2022 19:40

It keeps stopping without repeating a pattern or any alarm, this time it only recorded 8 minutes.

Could I modify the buffer?

Tormund1985
New Cone
New Cone
Posts: 9
Joined: 17 Aug 2022 10:22

Re: Stop working record audio stream

Postby Tormund1985 » 08 Sep 2022 11:11

From pi Zero I get thorough journalctl next messages:

Code: Select all

sep 08 09:30:39 PIZERO2A rc.local[515]: Error writing trailer of tcp://0.0.0.0:8554: Broken pipe sep 08 09:30:39 PIZERO2A rc.local[515]: size= 290923kB time=00:59:59.78 bitrate= 662.1kbits/s speed=1.07x sep 08 09:30:39 PIZERO2A rc.local[515]: video:0kB audio:290924kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: u sep 08 09:30:39 PIZERO2A rc.local[515]: Conversion failed! sep 08 09:30:40 PIZERO2A rc.local[515]: ffmpeg version 4.1.9-0+deb10u1+rpt1 Copyright (c) 2000-2022 the FFmpeg developers sep 08 09:30:40 PIZERO2A rc.local[515]: built with gcc 8 (Raspbian 8.3.0-6+rpi1) sep 08 09:30:40 PIZERO2A rc.local[515]: configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/ sep 08 09:30:40 PIZERO2A rc.local[515]: WARNING: library configuration mismatch sep 08 09:30:40 PIZERO2A rc.local[515]: avutil configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardene sep 08 09:30:40 PIZERO2A rc.local[515]: avcodec configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardene sep 08 09:30:40 PIZERO2A rc.local[515]: avformat configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardene sep 08 09:30:40 PIZERO2A rc.local[515]: avdevice configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardene sep 08 09:30:40 PIZERO2A rc.local[515]: avfilter configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardene sep 08 09:30:40 PIZERO2A rc.local[515]: avresample configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardene sep 08 09:30:40 PIZERO2A rc.local[515]: swscale configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardene sep 08 09:30:40 PIZERO2A rc.local[515]: swresample configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardene sep 08 09:30:40 PIZERO2A rc.local[515]: postproc configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardene sep 08 09:30:40 PIZERO2A rc.local[515]: libavutil 56. 22.100 / 56. 22.100 sep 08 09:30:40 PIZERO2A rc.local[515]: libavcodec 58. 35.100 / 58. 35.100 sep 08 09:30:40 PIZERO2A rc.local[515]: libavformat 58. 20.100 / 58. 20.100 sep 08 09:30:40 PIZERO2A rc.local[515]: libavdevice 58. 5.100 / 58. 5.100 sep 08 09:30:40 PIZERO2A rc.local[515]: libavfilter 7. 40.101 / 7. 40.101 sep 08 09:30:40 PIZERO2A rc.local[515]: libavresample 4. 0. 0 / 4. 0. 0 sep 08 09:30:40 PIZERO2A rc.local[515]: libswscale 5. 3.100 / 5. 3.100 sep 08 09:30:40 PIZERO2A rc.local[515]: libswresample 3. 3.100 / 3. 3.100 sep 08 09:30:40 PIZERO2A rc.local[515]: libpostproc 55. 3.100 / 55. 3.100
I don't understand what is happening, could you help me?


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 11 guests