How to generate Vlc Stream Output String in Qt application

About encoding, codec settings, muxers and filter usage
vinayk9119
New Cone
New Cone
Posts: 3
Joined: 06 Dec 2020 17:39

How to generate Vlc Stream Output String in Qt application

Postby vinayk9119 » 09 Dec 2020 08:30

I am developing a media player in ```Qt``` using ```libvlc``` through ```vlc-qt``` wrapper and want to do the video streaming from that player and I have seen If I do the streaming through ```VLC``` media player, I got one stream output string in the last window. For exmaple I get this the below string when I selected the video and it's stream options

```
:sout=#transcode{vcodec=h264,venc=x264{qp=5},scale=Auto,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:udp{dst=127.0.0.1:1234} :no-sout-all :sout-keep
```
And to do tthe streaming in my video player ```Qt``` application, I just pass this string to my player and it start streaming the video in the same way the ```VLC``` does.
My code to stream the same video using same codecs

```
m_media = new VlcMedia("file:///home/vinay/Desktop/Captain.America.Civil.WAR.2016.1080p.HD.TC.AC3.x264-ETRG/ETRG.mp4",m_instance);

m_media->setOption(":sout=#transcode{vcodec=h264,venc=x264{qp=5},scale=Auto,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:udp{dst=127.0.0.1:1234}");
m_media->setOption(":no-sout-all");
m_media->setOption(":sout-keep");

m_player->open(m_media);
```
So I got that this stream output string contains all the details which I require to do the streaming. So i want to do the same in my application where user choose the video clip and then choose the method of streaming and than codec and at last I want to generate the stream output string in the same way ```VLC``` media player does but I am not getting how can I generate this stream output string.

I searched in whole internet and get some documentation of streaming through command line in ```VLC``` where they explain the syntax and other thing of that string stream output but there are so many options available, I am still not getting how to implement that in Qt.

Please help is there any method exist which will give me the stream string output when i just pass the streaming method and codec to it.

The references which I get on internet are given below

https://wiki.videolan.org/Documentation ... HowTo_New/

https://wiki.videolan.org/Documentation ... _Examples/

https://wiki.videolan.org/Documentation ... mand_Line/

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

Re: How to generate Vlc Stream Output String in Qt application

Postby InTheWings » 09 Dec 2020 09:46

Qt bindings are not made by us and last version is from 2017..
We don't know how it is mapping internally, but I doubt the options need the parsing token ":"
Alternative is libvlcpp
:!: 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 !


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 12 guests