Page 1 of 1

Transcoding

Posted: 15 Jan 2011 00:19
by nusrat1990
Hello.
I have a client that plays network stream.

Code: Select all

const char * const vlc_argv[] = { "-I", "dummy", "--ignore-config", "--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins\\"}; libvlc_instance_t * inst; libvlc_media_player_t *mp; libvlc_media_t *m; inst = libvlc_new (sizeof(vlc_argv)/sizeof(vlc_argv[0]),vlc_argv); m = libvlc_media_new_path (inst, "udp://127.0.0.1@127.0.0.1:1234"); mp = libvlc_media_player_new_from_media (m); libvlc_media_player_play (mp); Sleep (10000); /* Let it play a bit */ libvlc_media_player_stop (mp); libvlc_media_player_release (mp); libvlc_media_release (m); libvlc_release (inst);
It plays MPEG2-TS (Mpeg2/Ac3). I want to transcode it to MPEG2-TS(wmv3/wma).
Libvlc doesn't support wmv3.
How can i get raw bytes from libvlc_media_t pointer 188 bytes packets for further processing?

Re: Transcoding

Posted: 15 Jan 2011 11:48
by Jean-Baptiste Kempf
MPEG2-TS(wmv3/wma) You cannot do wmv in mpeg2-ts! You must use asf!

Re: Transcoding

Posted: 18 Mar 2011 21:17
by nusrat1990
Thank you for reply.
Ok,I should write vc1 advanced profile, but not wmv. http://www.microsoft.com/windows/window ... rview.aspx
I have already finished transcoding from mpeg2 ES -> vc1 bitstream.

Now I need to:
1)mux vc1/wma into:
1.1)ASF and output should be as http
1.2)mpeg2-ts and output should be as udp&http.
2)transcode from mpeg2audio&ac3 -> wma?

Can I do all these things using libvlc?

Re: Transcoding

Posted: 18 Mar 2011 22:43
by Jean-Baptiste Kempf
1.1 is possible.
2) yes

Re: Transcoding

Posted: 19 Mar 2011 18:48
by nusrat1990
Ok

Re: Transcoding

Posted: 31 Mar 2011 21:17
by nusrat1990
Hi Jean-Baptiste Kempf.
In the final, I need to do 1.1 using memory, without using files. I have a live stream (wvc1 encoded bitstream).
Is there any way to do that? If yes, what mechanism is used, how client and VLC share memory and what command line params needed for VLC?
There is other way: I can send wvc1 bitstream as udp output (from my app), and VLC will catch this stream and transcode, output will be as http. But, I don't want to do it in such manner at all.
Many thanks.

Re: Transcoding

Posted: 31 Mar 2011 22:45
by RĂ©mi Denis-Courmont
Have you ever heard of pipes/FIFOs?

Re: Transcoding

Posted: 01 Apr 2011 07:49
by nusrat1990
Yes, I worked with named pipes (WinAPI).

Re: Transcoding

Posted: 03 Apr 2011 21:14
by nusrat1990
Could you provide more info/link about interprocess communication?
I need to mux raw wvc1(VC-1 AP) elementary stream to ASF container. I try this:
vlc k:\samples\test.vc1 --sout #std{access=file,mux=asf,dst=k:\samples\test.asf}
It creates file and writes < 1kb. What do I wrong?
For example, if the input is test.m2v (mpeg2 Elementary stream) everything works great.
J-B said that VLC can mux wvc1 to ASF.
Thanks to all, who helps me.