bugGnash - The GNU Flash player - Bugs: bug #24371, silent youtube videos hang gnash

 
 

bug #24371: silent youtube videos hang gnash

Submitted by:  Jason Woofenden <jasonwoof>
Submitted on:  Wed 24 Sep 2008 11:38:57 PM UTC  
 
Category: videoSeverity: 5 - Blocker
Release: trunkStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 06 Oct 2008 10:23:17 PM UTC, comment #9:

Yes, here's one:

http://www.youtube.com/watch?v=cd6clppG5bQ

In MediaParserGst I have taken the following approach:

The probe will run until any of the following happen:

a) the demuxer (or parser, in case of a nondemuxable format) signals that it has detected all the types in the stream;
b) the first video and audio types have been found;
c) A timer, started when we started probing, has expired, and we have probed at least MIN_PROBE bytes of data. The timer is currently set for one second and MIN_PROBE is set to 3*1024.

Bastiaan Jacques <bjacques>
Project Member
Mon 06 Oct 2008 06:56:32 PM UTC, comment #8:

Should be fixed, we'll get more reports if anything goes wrong
as soon as we call for test on gnash lists.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 30 Sep 2008 10:33:43 PM UTC, comment #7:

In revision 9868 Bastiaan raised probe bytes to 8192.
Can anyone find a video failing to play with that much ?

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 25 Sep 2008 02:31:17 PM UTC, comment #6:

Both of the flvs from http://samples.mplayerhq.hu/A-codecs/Nelly_Moser/ have their first sound packet past 7000 bytes.

Gnash won't play the sound anyway unless you enable Nellymoser in FfmpegAudioDecoder, but you will see the error message (and you get sound if you enable Nellymoser and increase PROBE_BYTES to 8192).

Benjamin Wolsey <bwy>
Project Member
Thu 25 Sep 2008 08:29:40 AM UTC, comment #5:

FYI: revision 9838 is the one to test.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 25 Sep 2008 08:21:19 AM UTC, comment #4:

Also committed the PROBE_BYTES.

For an easy testing: go around to youtueb and let me know
if you get any black screen for more then a few seconds or unexpectedly silent video or unexpectedly blank video.

If you wait too much PROBE_BYTES should be decreased (now 1024).
If you get no video or no audio PROBE_BYTES should be increased.

In any case gnash should tell you pretty much what happens
(verbosity 1 is enough). It will tell you if it finds an unexpected
video or audio tag and ot which offset....

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 25 Sep 2008 08:09:08 AM UTC, comment #3:

I committed a slighly modified version of the patch, basically adding more debugging/error logging.

Now working on the othe case around : flag say no video/audoi,
stream contains video/audio.

I tested locall that even wth all flags clear we're supposed to
do play the movie. I'm going to commit a version based
on a PROBE_BYTES define. Further testing will need to manually
craft a big FLV that advertises NO video but has video tags
near the end.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Thu 25 Sep 2008 06:56:35 AM UTC, comment #2:

attached patch fixes the problem for short films, but long silent films are scanned in their entirety which can hangs gnash for a finite, but sometimes quite long time.

For me the following video hung gnash for about 17 seconds:

http://www.youtube.com/watch?v=Um19K4dYNJo

The "while" loop it FLVParser.cpp (the one edited in the attached patch) should be further edited so it only scans a certain number of bytes into the stream before giving up on not-found streams.

Jason Woofenden <jasonwoof>
Thu 25 Sep 2008 06:55:55 AM UTC, comment #1:

The patch fixes an implementation bug, but there's also
a design issue with the probe scan itself, that is
gnash insists in scannin the whole file while looking
for advertised audio/video tags.

This example makes gnash hung for 15/20 seconds before
it's done scannin the file:

http://www.youtube.com/watch?v=Um19K4dYNJo

So a further step might be to limit the amount of data
scanned before giving up and assumin there is no
audio (or video) in the stream.

Ideally it'd be a user-configured amount.
At least a compile-time one.

I'll work on that.

Kudos to Jason for the work he did so far.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 24 Sep 2008 11:38:57 PM UTC, original submission:

When you try to play a .flv file which contains only a video stream, but claims (in bit 0x04 of the 5th byte) to contain audio, gnash hangs with %100 cpu.

Steps to reproduce:

go to: http://www.youtube.com/watch?v=-AiLyQWXjIg

Or locally:

1) grab the flv version of the above with youtube-dl

2) replace testsuite/media/square.flv with the downloaded file

3) run GNASHRC=testsuite/gnashrc gui/gtk-gnash -v testsuite/misc-ming.all/NetStream-SquareTest.swf

Expected results: the typical squaretest screen comes up with the green and pink boxes. When you press p then space you see the grey video playing tilted

Actual results: get a white background with only "- xtrace enabled -" on it, using max cpu.

4) using a hex editor, change the 5th byte from 0x05 to 0x01

Now when you repeat #3 above, it works as expected.

Jason Woofenden <jasonwoof>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #16569:  silent_youtube_fix.diff added by jasonwoof (2KiB - text/x-diff - This fixes the bug!)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bjacques (Posted a comment)
  • -unavailable- added by bwy (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by jasonwoof (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 06 Oct 2008 06:56:32 PM UTCstrkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 25 Sep 2008 08:09:08 AM UTCstrkStatusIn Progress=>Ready For Test
    Thu 25 Sep 2008 06:55:55 AM UTCstrkCategoryNone=>video
      Severity3 - Normal=>5 - Blocker
      StatusNone=>In Progress
      Assigned toNone=>strk
    Thu 25 Sep 2008 06:42:50 AM UTCjasonwoofAttached File-=>Added silent_youtube_fix.diff, #16569

    Back to the top


    Powered by Savane 3.1-cleanup1