Page 1 of 1
How to create PIPE from media's URL
Posted: Tue Mar 15, 2011 8:13 am
by S@gittarius
Hi Eugene,
Suppose I have a media’s URL in the form
http://domain.name/media_resource_path.
How can I create a PIPE from it in order to further process the stream? WmsCreateResourcePipe?
Regards
Re: How to create PIPE from media's URL
Posted: Tue Mar 15, 2011 8:19 am
by Eugene
Hi,
S@gittarius wrote:
Suppose I have a media’s URL in the form
http://domain.name/media_resource_path.
How can I create a PIPE from it in order to further process the stream? WmsCreateResourcePipe?
Regards
Use can use WmsDownloadURLToPipe
Re: How to create PIPE from media's URL
Posted: Tue Mar 15, 2011 8:22 am
by S@gittarius
Eugene wrote:Hi,
S@gittarius wrote:
Suppose I have a media’s URL in the form
http://domain.name/media_resource_path.
How can I create a PIPE from it in order to further process the stream? WmsCreateResourcePipe?
Regards
Use can use WmsDownloadURLToPipe
Wow!
You are very fast.
Thank you!
Re: How to create PIPE from media's URL
Posted: Wed Mar 16, 2011 6:56 am
by S@gittarius
Hi,
I tried to create a very simple tsMuxer transcoding profile but it didn’t work out.
Code: Select all
var
MetaFileLines: TStringList;
sMetaFileName: string;
begin
MetaFileLines := TStringList.Create;
try
InputFileName := WmsGetItemProperty(mpiMediaResourceSource);
MetaFileLines.Add('MUXOPT --no-pcr-on-video-pid --vbr --vbv-len=1500');
MetaFileLines.Add('V_MPEG4/ISO/AVC, "' + InputFileName + '", level=4.1, insertSEI, contSPS, track=1');
sMetaFileName := ChangeFileExt(OutputFileName, '.meta');
MetaFileLines.SaveToFile(sMetaFileName);
OutputFileName := ChangeFileExt(OutputFileName, '.m2ts');
TranscodingResult := WmsTranscodingExecute('TSMUXER', '"' + sMetaFileName + '" "' + OutputFileName + '"', True);
finally
MetaFileLines.Free
end
end.
The target media is MP4 encapsulated and has two streams:
1. H264 video stream
2. AAC audio stream
As you may have already guessed it’s all about the old pal Youtube.
As seen from the code I tried to only mux the video stream because it doesn’t need to be transcoded. When I get this working I’ll try to and the audio stream.
Where do I go wrong? And how to pipe the HTTP stream directly to the tsMuxer?
Regards!
Re: How to create PIPE from media's URL
Posted: Wed Mar 16, 2011 5:57 pm
by Eugene
Hi,
S@gittarius wrote:
I tried to create a very simple tsMuxer transcoding profile but it didn’t work out.
Code: Select all
var
MetaFileLines: TStringList;
sMetaFileName: string;
begin
MetaFileLines := TStringList.Create;
try
InputFileName := WmsGetItemProperty(mpiMediaResourceSource);
MetaFileLines.Add('MUXOPT --no-pcr-on-video-pid --vbr --vbv-len=1500');
MetaFileLines.Add('V_MPEG4/ISO/AVC, "' + InputFileName + '", level=4.1, insertSEI, contSPS, track=1');
sMetaFileName := ChangeFileExt(OutputFileName, '.meta');
MetaFileLines.SaveToFile(sMetaFileName);
OutputFileName := ChangeFileExt(OutputFileName, '.m2ts');
TranscodingResult := WmsTranscodingExecute('TSMUXER', '"' + sMetaFileName + '" "' + OutputFileName + '"', True);
finally
MetaFileLines.Free
end
end.
The target media is MP4 encapsulated and has two streams:
1. H264 video stream
2. AAC audio stream
As you may have already guessed it’s all about the old pal Youtube.
As seen from the code I tried to only mux the video stream because it doesn’t need to be transcoded. When I get this working I’ll try to and the audio stream.
Where do I go wrong? And how to pipe the HTTP stream directly to the tsMuxer?
I think tsMuxer does not support any container in pipe-mode, only elementary streams.
Re: How to create PIPE from media's URL
Posted: Thu Mar 17, 2011 7:20 am
by S@gittarius
Hi,
Maybe I am wrong but pipes are handled just like files and supported containers are as follows:
* Elementary stream;
* Transport stream TS and M2TS;
* Program stream EVO/VOB/MPG;
* Matroska MKV/MKA;
* MP4/MOV
Even so could you please help in creating this special profile for media sources which are:
- podcasts;
- enclosed in MP4 container;
- video stream is H264 and doesn’t need to be transcoded;
- audio stream is AAC and has to be converted into AC3 format;
- output container is M2TS as usual;
These parameters are static and we don’t need to go around finding the information. Just handle the input stream and produce the relevant output.
If you cannot afford the time I’ll keep on trying to do the script but without WMS functions’ explanation it’s a very hard task indeed.
Regards.
Re: How to create PIPE from media's URL
Posted: Thu Mar 17, 2011 7:40 am
by Eugene
Hi,
S@gittarius wrote:
Maybe I am wrong but pipes are handled just like files and supported containers are as follows:
Pipes does not support seek operations, it's may be problem for tsMuxer
S@gittarius wrote:
Even so could you please help in creating this special profile for media sources which are:
- podcasts;
- enclosed in MP4 container;
- video stream is H264 and doesn’t need to be transcoded;
- audio stream is AAC and has to be converted into AC3 format;
- output container is M2TS as usual;
These parameters are static and we don’t need to go around finding the information. Just handle the input stream and produce the relevant output.
If you cannot afford the time I’ll keep on trying to do the script but without WMS functions’ explanation it’s a very hard task indeed.
Transcoding profile "Movies-TsMuxer"