1) possible fix for temp files not deleted; 2) slow encoding time; 3) skipping ahead for progressive download

5 views
Skip to first unread message

Brian Will

unread,
Oct 17, 2009, 11:48:15 PM10/17/09
to Panda
1) Our /var/tmp/videos was filling up with residual files
*.temp.video.mp4, *.temp.audio.mp4, and *.temp.video.wav. I think I
fixed this by adding these lines to the end of the method
encode_mp4_aac_flash:

FileUtils.rm(temp_video_output_file) if File.exists?
(temp_video_output_file)
FileUtils.rm(temp_audio_output_file) if File.exists?
(temp_audio_output_file)
FileUtils.rm(temp_audio_output_wav_file) if File.exists?
(temp_audio_output_wav_file)

This seems to work so far, but you shouldn't trust my Ruby. Would it
be more canonical to just use rm_f?

FileUtils.rm_f(temp_video_output_file)
FileUtils.rm_f(temp_audio_output_file)
FileUtils.rm_f(temp_audio_output_wav_file)

2) Our encoding is taking about 4 seconds for every second of video.
Is this slow? The output is aac, h264, mp4, 480x270, 400kb/s.

3) On some progressive download sites, like Youtube, the user can skip
ahead such that they don't have to wait for the download of everything
before that point; the download simply skips forward. Most videos
we've encoded in Panda don't seem to allow this. If we want to skip
ahead in a 10 min video, we have to sit and wait for everything up to
that point to load. Is there a fix for this?

Thanks,
Brian Will

Damien Tanner

unread,
Oct 19, 2009, 6:11:39 AM10/19/09
to panda...@googlegroups.com
Hi Brian,

1) Thanks for this, we have in fact fixed this in the upcoming
version. We're now deleting all files which start with the encoding's
id.

2) This is not unusual for certain qualities, esp if you are doing two pass.

3) These sites are streaming the video from a streaming server which
can serve up video from any point in a file. Most people using Panda
use S3 which doesn't support this. If you wanted to do this you could
use nginx with the flv streaming module.

Kind Regards,
Damien Tanner
Co-Founder and Director, New Bamboo

Creating fresh, flexible and fast-growing web applications is our passion.

3rd Floor, Gensurco House, 46A Rosebery Avenue, London, EC1R 4RP

+44 (0)78 6312 7999
+44 (0)20 7099 7486
http://www.new-bamboo.co.uk

Brian Will

unread,
Oct 19, 2009, 1:12:49 PM10/19/09
to Panda
> 2) This is not unusual for certain qualities, esp if you are doing two pass.

Not sure if it's doing 2-pass. It's doing whatever the
encode_mp4_aac_flash function does.

> 3) These sites are streaming the video from a streaming server which
> can serve up video from any point in a file. Most people using Panda
> use S3 which doesn't support this. If you wanted to do this you could
> use nginx with the flv streaming module.

I want the Youtube behavior, which isn't streaming, right? My
understanding was that prorgressive requires some sort of meta info at
the front of the vid file in order to skip the download ahead, and
mp4box is supposed to add this meta info.

Damien Tanner

unread,
Oct 27, 2009, 7:59:47 AM10/27/09
to panda...@googlegroups.com
Brian,

The example profile is only 1-pass, but encoding h264 just takes a long time.

Your are correct it's not streaming as such, but the webserver has to
understand the metadata, and serving from S3 doesn't allow you to do
this..

Kind Regards,
Damien Tanner
Co-Founder and Director, New Bamboo & Panda

Creating fresh, flexible and fast-growing web applications is our passion.

3rd Floor, Gensurco House, 46A Rosebery Avenue, London, EC1R 4RP

+44 (0)78 6312 7999
+44 (0)20 7099 7486
http://www.new-bamboo.co.uk
http://www.pandastream.com
Reply all
Reply to author
Forward
0 new messages