Hi,<br><br><div class="gmail_quote">2010/9/25 Zhao, Halley <span dir="ltr">&lt;<a href="mailto:halley.zhao@intel.com">halley.zhao@intel.com</a>&gt;</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&#39;d still like to have somebody prototyping an (optional) behaviour like the one you&#39;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&#39;ve the feeling that getting it accepted in the &quot;official&quot; 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">&nbsp;</span></p>

<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US">&nbsp;</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">&nbsp;</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 &lt;<a href="mailto:halley.zhao@intel.com" target="_blank">halley.zhao@intel.com</a>&gt;</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);">&rsquo;<span lang="EN-US">t care about
demux/mux, because all these data are passed through souphttpsrc, save the data
from souphttpsrc shouldn</span>&rsquo;<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>
&quot;it seek to the end of the mp4 file at the beginning of playback.&quot;<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&#39;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 &quot;moov-recovery-file&quot; 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&#39;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>
&nbsp;</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">&nbsp;</span><span lang="EN-US"></span></p>

<p class="MsoNormal"><span style="font-size: 10.5pt; color: rgb(31, 73, 125);" lang="EN-US">&nbsp;</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">&nbsp;</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 &lt;<a href="mailto:halley.zhao@intel.com" target="_blank">halley.zhao@intel.com</a>&gt;</span></p>

<p class="MsoNormal"><span lang="EN-US">Thanks Stefan.<br>
After add a &#39;queue&#39; after &#39;souphttpsrc&#39; and use &#39;decodebin2&#39;; 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&#39;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
&quot;moov-recovery-file&quot;. What happens if you transmux the files using
it?<br>
<br>
Regards<br>
&nbsp;</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>
&gt; During playback of progressive content, I tried to save the content to
disk as well.<br>
&gt;<br>
&gt; But the result is strange:<br>
&gt;<br>
&gt; Some contents are saved correctly, some contents are saved but can</span>&rsquo;<span lang="EN-US">t playback<br>
&gt; again; some contents even can</span>&rsquo;<span lang="EN-US">t playback during
progressive downloaded.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ## most ogg contents work well, the saved contents can playback again<br>
&gt;<br>
&gt; gst-launch-0.10 souphttpsrc<br>
&gt; 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>
&gt; ! ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.ogv<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ## some mp4 saved contents can</span>&rsquo;<span lang="EN-US">t playback again,
the saved contents differ from<br>
&gt; the original one; even the following test.mp4 and test2.mp4 are different<br>
&gt;<br>
&gt; gst-launch-0.10 souphttpsrc location=http://<br>
&gt; <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>
&gt; ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.mp4<br>
&gt;<br>
&gt; gst-launch-0.10 souphttpsrc location=http://<br>
&gt; <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>
&gt; location=/home/halley/swap/streaming/test2.mp4<br>
&gt;<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>
&gt;<br>
&gt;<br>
&gt; ## some wmv contents even can</span>&rsquo;<span lang="EN-US">t playback during
progressive downloaded (though<br>
&gt; some saved wmv contents can playback again)<br>
&gt;<br>
&gt; gst-launch-0.10 -v -v souphttpsrc location=http://<br>
&gt; <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>
&gt; ffmpegcolorspace ! xvimagesink t. ! queue ! filesink location=test.wmv<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; thanks in advance for your help.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; *ZHAO, Halley (Aihua)*<br>
&gt;<br>
&gt; Email: <a href="mailto:halley.zhao@intel.com" target="_blank">halley.zhao@intel.com</a>
&lt;blocked::mailto:<a href="mailto:aihua.zhao@intel.com" target="_blank">aihua.zhao@intel.com</a>&gt;<br>
&gt;<br>
&gt; Tel: +86(21)61166476 &nbsp; iNet: 8821-6476<br>
&gt;<br>
&gt; SSG/OTC/Moblin 3W038 Pole: F4<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;
------------------------------------------------------------------------------<br>
&gt; This SF.net Dev2Dev email is sponsored by:<br>
&gt;<br>
&gt; Show off your parallel programming skills.<br>
&gt; Enter the Intel(R) Threading Challenge 2010.<br>
&gt; <a href="http://p.sf.net/sfu/intel-thread-sfd" target="_blank">http://p.sf.net/sfu/intel-thread-sfd</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gstreamer-devel mailing list<br>
&gt; <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
&gt; <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">&nbsp;</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">&nbsp;</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>