# Stream to LibreTime using ffmpeg: Works fine with device, but not working with files \[solved\]

**URL:** <https://discourse.libretime.org/t/stream-to-libretime-using-ffmpeg-works-fine-with-device-but-not-working-with-files-solved/660>\
**Category:** Get Help\
**Created:** [September 5, 2020, 4:39am UTC](https://discourse.libretime.org/t/stream-to-libretime-using-ffmpeg-works-fine-with-device-but-not-working-with-files-solved/660 "2020-09-05T04:39:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ppriede](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/ppriede/32/382_2.png) [@ppriede](https://discourse.libretime.org/u/ppriede)\
**Post date:** [September 5, 2020, 4:39am UTC](https://discourse.libretime.org/t/stream-to-libretime-using-ffmpeg-works-fine-with-device-but-not-working-with-files-solved/660/1 "2020-09-05T04:39:29Z")

</div>

I like to stream to LibreTime using [ffmpeg](https://ffmpeg.org/)

Why ffmpeg?  
Is very popular and I’m used to it.

One thing that work is using and audio device and start streaming  
Is a simple command

`ffmpeg -f dshow -i audio="Wave/MIDI/CD (3- Sound Blaster Live! 24-bit External)" -acodec libmp3lame -ab 192k -ac 2 -content_type audio/mpeg -f mp3 -legacy_icecast 1 -f mp3 -legacy_icecast 1 icecast://user:pass@url:port/mount`

The “Wave/MIDI/CD (3- Sound Blaster Live! 24-bit External)” is the device,  
If you want to know the list of devices in your computer, execute this

`ffmpeg -list_devices true -f dshow -i dummy`

Well, the first part works fine.

But, I’m having trouble working with files  
In theory, you can use this command

`ffmpeg -re -i audio.mp3 -acodec libmp3lame -ab 192k -ac 2 -content_type audio/mpeg -f mp3 -legacy_icecast 1 icecast://user:pass@url:port/mount`

But, is not working.  
Connects to the server, and in the main panel, you can see that is getting some info,  
but never really change to the source.  
If you press “q” in ffmpeg, you suddenly get a little part of the stream from the file

The ffmpeg get “stuck” in frame=1

So I’m unable to recreate a streaming with framerate (for example with an image in loop)  
`ffmpeg -loop 1 -r 30 -i image.png -re -i audio.mp3 -acodec libmp3lame -ab 192k -ac 2 -content_type audio/mpeg -f mp3 -legacy_icecast 1 icecast://user:pass@url:port/mount`

Any suggestion?  
How can I stream a file to the LibreTime server with ffmpeg?  
Of maybe another tool in the command line (liquidsoap?)

Thx.

---

<div class="post-metadata">

**Author:** ![ppriede](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/ppriede/32/382_2.png) [@ppriede](https://discourse.libretime.org/u/ppriede)\
**Post date:** [September 5, 2020, 7:49pm UTC](https://discourse.libretime.org/t/stream-to-libretime-using-ffmpeg-works-fine-with-device-but-not-working-with-files-solved/660/2 "2020-09-05T19:49:25Z")

</div>

It was really easy to solve

Just force to remove the video part:

[https://ffmpeg.org/ffmpeg-all.html#Stream-selection](https://ffmpeg.org/ffmpeg-all.html#Stream-selection)  
add **-vn** after the audio input

`ffmpeg -re -i audio.mp3 -vn -acodec libmp3lame -ab 192k -ac 2 -content_type audio/mpeg -f mp3 -legacy_icecast 1 icecast://user:pass@url:port/mount`

I hope this is usefull to someone.
