Hi,<br><br><div class="gmail_quote">2010/9/25 Zhao, Halley <span dir="ltr"><<a href="mailto:halley.zhao@intel.com">halley.zhao@intel.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="ZH-CN">
<div>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US">However, I think it in another way, the way like most bittorrent
tools does.</span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US">At the start of progressive downloaded, a dummy file is created
on disk;</span> <br></p></div></div></blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="ZH-CN">
<div>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US">When there is seek operation requested from parser, souphttpsrc
will write bunk of data to file with offset as well.</span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US">Then I will get the entire file after finish playback.</span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US"></span></p></div></div></blockquote><div><br>I agree such an approach may be useful for a few cases where you want to save the file while playing it, but it can bring to really bad performances in some others: think e.g. about an embedded device using a slow flash as mass storage device. Caching everything on a file may either not be possible because of the narrow size usually these devices have or, if possible, it would be really slow at the risk of saturating the flash chip bandwidth when e.g. both reading the file and swapping.<br>
<br>Btw I'd still like to have somebody prototyping an (optional) behaviour like the one you're suggesting. Adding a way to store to file all the contents httpsrc reads the way you point out may be really interesting at least for debugging purposes.<br>
<br>Unfortunately, I've the feeling that getting it accepted in the "official" souphttpsrc would be a completely separate beast. Writing a custom element (such an evolved tee) may help to work around the issue.<br>
<br>Regards<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="ZH-CN"><div><p class="MsoNormal">
<span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> Marco Ballesio
[mailto:<a href="mailto:gibrovacco@gmail.com" target="_blank">gibrovacco@gmail.com</a>] <br>
<b>Sent:</b> Monday, September 20, 2010 1:54 PM<div><div></div><div class="h5"><br>
<b>To:</b> Discussion of the development of GStreamer<br>
<b>Subject:</b> Re: [gst-devel] some issues when trying to save content to disk
during http progressive downloaded</div></div></span></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span lang="EN-US">Hi,</span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">2010/9/20 Zhao, Halley <<a href="mailto:halley.zhao@intel.com" target="_blank">halley.zhao@intel.com</a>></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US">Your suggestion may be
helpful, </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US">But I expect a solution needn</span><span style="font-size: 10.5pt; color: rgb(31, 73, 125);">’<span lang="EN-US">t care about
demux/mux, because all these data are passed through souphttpsrc, save the data
from souphttpsrc shouldn</span>’<span lang="EN-US">t care about mux/demux.</span></span><span lang="EN-US"></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><br>
As you wrote:<br>
<br>
"it seek to the end of the mp4 file at the beginning of playback."<br>
<br>
the seek operation is performed from the demuxer (qtdemux), which identifies
essential meta-data present at the end of the file. This data will not be
transferred again at the end of the playback, so *in this case* you can't
consider souphttpsrc as just a mere data pipe through which you get the
complete clip.<br>
<br>
Said so, you have many ways to address this:<br>
<br>
- You can (try and) use the "moov-recovery-file" transmuxing the file
after having saved it. It will restore the missing meta-info.<br>
- You can re-mux on-the-file the file while you're getting it from souphttpsrc.
Again, it will rebuild the lost meta-infos.<br>
- You can use only progressive-download compliant files: they will have all the
meta-information stored at the beginning and no seek will be needed.<br>
<br>
Regards<br>
<br>
</span></p>
</div>
<blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;">
<div>
<div>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span lang="EN-US"></span></p>
<div style="border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0cm 0cm; border-color: -moz-use-text-color;">
<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> Marco Ballesio [mailto:<a href="mailto:gibrovacco@gmail.com" target="_blank">gibrovacco@gmail.com</a>] <br>
<b>Sent:</b> Sunday, September 19, 2010 12:53 AM</span></p>
<div>
<p class="MsoNormal"><span style="font-size: 10pt;" lang="EN-US"><br>
<b>To:</b> Discussion of the development of GStreamer</span></p>
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">Subject:</span></b><span style="font-size: 10pt;" lang="EN-US"> Re: [gst-devel] some issues when trying to
save content to disk during http progressive downloaded</span></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span lang="EN-US">Hi,</span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">2010/9/13 Zhao, Halley <<a href="mailto:halley.zhao@intel.com" target="_blank">halley.zhao@intel.com</a>></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks Stefan.<br>
After add a 'queue' after 'souphttpsrc' and use 'decodebin2'; I still got same
result.<br>
<br>
I think the possible solution is to enhance souphttpsrc to save content to disk
after some refractor, because souphttpsrc does some seek following the command
of parser.<br>
<br>
Attached mp4.log is the log of souphttpsrc, it seek to the end of the mp4 file
at the beginning of playback. Finally, tail of the original mp4 file is missing
in downloaded mp4 file.</span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><br>
It looks like you're not re-muxing the content. Are you simply storing the raw
mp4 data to a file or are you using a muxer before the filesink? What does
mp4info tell about your output file?<br>
<br>
You may try and recover the saved files with mp4mux using the option
"moov-recovery-file". What happens if you transmux the files using
it?<br>
<br>
Regards<br>
</span></p>
</div>
<blockquote style="border-width: medium medium medium 1pt; border-style: none none none solid; padding: 0cm 0cm 0cm 6pt; margin: 5pt 0cm 5pt 4.8pt; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204);">
<p class="MsoNormal"><span style="color: rgb(136, 136, 136);" lang="EN-US">halley@halley-lucid:~/swap/streaming/mp4$ ls
-l<br>
total 5216<br>
-rwxr--r-- 1 halley halley 1776915 2010-09-08 23:08 download.mp4<br>
-rw-r--r-- 1 halley halley 1773281 2010-09-08 18:15 original.mp4</span><span lang="EN-US"></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><br>
-----Original Message-----<br>
From: Stefan Kost [mailto:<a href="mailto:ensonic@hora-obscura.de" target="_blank">ensonic@hora-obscura.de</a>]<br>
Sent: 2010</span>Äê<span lang="EN-US">9</span>ÔÂ<span lang="EN-US">11</span>ÈÕ<span lang="EN-US"> 1:27<br>
To: Discussion of the development of GStreamer</span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span lang="EN-US">Cc: Zhao, Halley<br>
Subject: Re: [gst-devel] some issues when trying to save content to disk during
http progressive downloaded</span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span lang="EN-US">Am 08.09.2010 04:45, schrieb Zhao, Halley:<br>
> During playback of progressive content, I tried to save the content to
disk as well.<br>
><br>
> But the result is strange:<br>
><br>
> Some contents are saved correctly, some contents are saved but can</span>’<span lang="EN-US">t playback<br>
> again; some contents even can</span>’<span lang="EN-US">t playback during
progressive downloaded.<br>
><br>
><br>
><br>
> ## most ogg contents work well, the saved contents can playback again<br>
><br>
> gst-launch-0.10 souphttpsrc<br>
> location=<a href="http://10.238.37.11/share/media/video/test.ogv" target="_blank">http://10.238.37.11/share/media/video/test.ogv</a> ! tee name=t
! decodebin<br>
> ! ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.ogv<br>
><br>
><br>
><br>
> ## some mp4 saved contents can</span>’<span lang="EN-US">t playback again,
the saved contents differ from<br>
> the original one; even the following test.mp4 and test2.mp4 are different<br>
><br>
> gst-launch-0.10 souphttpsrc location=http://<br>
> <a href="http://10.238.37.11/share/media/video/test.mp4" target="_blank">10.238.37.11/share/media/video/test.mp4</a>
! tee name=t ! decodebin !<br>
> ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.mp4<br>
><br>
> gst-launch-0.10 souphttpsrc location=http://<br>
> <a href="http://10.238.37.11/share/media/video/test.mp4" target="_blank">10.238.37.11/share/media/video/test.mp4</a>
! filesink<br>
> location=/home/halley/swap/streaming/test2.mp4<br>
><br>
<br>
At first use decodebin2!<br>
<br>
If the http source is seekable, the muxer in decodebin will do pull. You could
try:<br>
<br>
gst-launch-0.10 souphttpsrc<br>
location=<a href="http://10.238.37.11/share/media/video/test.mp4" target="_blank">http://10.238.37.11/share/media/video/test.mp4</a> ! queue !
tee name=t !<br>
decodebin2 ! ffmpegcolorspace ! xvimagesink t. ! queue ! filesink
location=test.mp4<br>
<br>
Stefan<br>
<br>
><br>
><br>
> ## some wmv contents even can</span>’<span lang="EN-US">t playback during
progressive downloaded (though<br>
> some saved wmv contents can playback again)<br>
><br>
> gst-launch-0.10 -v -v souphttpsrc location=http://<br>
> <a href="http://10.238.37.11/share/media/test.wmv" target="_blank">10.238.37.11/share/media/test.wmv</a>
! tee name=t ! queue ! decodebin !<br>
> ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.wmv<br>
><br>
><br>
><br>
> thanks in advance for your help.<br>
><br>
><br>
><br>
><br>
><br>
> *ZHAO, Halley (Aihua)*<br>
><br>
> Email: <a href="mailto:halley.zhao@intel.com" target="_blank">halley.zhao@intel.com</a>
<blocked::mailto:<a href="mailto:aihua.zhao@intel.com" target="_blank">aihua.zhao@intel.com</a>><br>
><br>
> Tel: +86(21)61166476 iNet: 8821-6476<br>
><br>
> SSG/OTC/Moblin 3W038 Pole: F4<br>
><br>
><br>
><br>
><br>
><br>
>
------------------------------------------------------------------------------<br>
> This SF.net Dev2Dev email is sponsored by:<br>
><br>
> Show off your parallel programming skills.<br>
> Enter the Intel(R) Threading Challenge 2010.<br>
> <a href="http://p.sf.net/sfu/intel-thread-sfd" target="_blank">http://p.sf.net/sfu/intel-thread-sfd</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span lang="EN-US"><br>
------------------------------------------------------------------------------<br>
Start uncovering the many advantages of virtual appliances<br>
and start using them to simplify application deployment and<br>
accelerate your shift to cloud computing<br>
<a href="http://p.sf.net/sfu/novell-sfdev2dev" target="_blank">http://p.sf.net/sfu/novell-sfdev2dev</a><br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span lang="EN-US"><br>
------------------------------------------------------------------------------<br>
Start uncovering the many advantages of virtual appliances<br>
and start using them to simplify application deployment and<br>
accelerate your shift to cloud computing.<br>
<a href="http://p.sf.net/sfu/novell-sfdev2dev" target="_blank">http://p.sf.net/sfu/novell-sfdev2dev</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
</div></div></div>
</div>
<br>------------------------------------------------------------------------------<br>
Start uncovering the many advantages of virtual appliances<br>
and start using them to simplify application deployment and<br>
accelerate your shift to cloud computing.<br>
<a href="http://p.sf.net/sfu/novell-sfdev2dev" target="_blank">http://p.sf.net/sfu/novell-sfdev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>