Ho to get raw compressed streams

This forum is about all development around libVLC.
fsmoke
New Cone
New Cone
Posts: 6
Joined: 12 Nov 2015 15:06

Ho to get raw compressed streams

Postby fsmoke » 12 Nov 2015 15:39

I am new in libVLC and use simplest example of using libVLC from https://wiki.videolan.org/LibVLC_Tutorial/ and https://wiki.videolan.org/Stream_to_mem ... _tutorial/. Also of course I learn libvlc documentation(doxygen) here http://www.videolan.org/developers/vlc/ ... ibvlc.html.

I have two questions:
1)How can i get raw compressed packets from libvlc_media when libvlc_media_player is working. I need something like callback for already parsed/demuxed but not yet decompressed packets of video and audio?
2)How to begin play media without decompressing? Just parse input stream...(some form of fake playing)

However may be exists more elegant solutions for my task. So what I want:
- I need to open some media(for example from net) and write it to disk(or to memory buffer) in compressed form. Function "Write to disk/buffer" may be turned on/off in realtime while live stream is going on. I don't want to transcode the stream for saving cpu time.

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Ho to get raw compressed streams

Postby Rémi Denis-Courmont » 12 Nov 2015 15:55

Use the smem hack, or write your own stream output plugin.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

fsmoke
New Cone
New Cone
Posts: 6
Joined: 12 Nov 2015 15:06

Re: Ho to get raw compressed streams

Postby fsmoke » 12 Nov 2015 16:17

Use the smem hack, or write your own stream output plugin.
Thank you for fast response!!
I found samples where smem callbacks used only for decompressed frames, i need callbacks for compressed packets, have you some useful links about this?
Can you provide some links about writing output plugins for vlc?

grindstone
New Cone
New Cone
Posts: 9
Joined: 27 Oct 2015 14:04

Re: Ho to get raw compressed streams

Postby grindstone » 14 Nov 2015 13:30

Maybe try to create the libVLC - instance with the arguments

Code: Select all

char smem_options[256]; sprintf(smem_options, "file:c:outputFile.mp3"; const char * const vlc_args[] = { "--sout", smem_options };
In my freeBasic adaption of libVLC this method works.

Regards
grindstone


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 5 guests