Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Error with some YouTube-Videos (URL based issue)

11 replies [Last post]

Hello LongTail-Team,

first: you've done a great job with the JW-FLV-Player. Big thanks!

I integrated it in my project and it works very well. Currently i use it for playing MP3-Files and YouTube-Videos.

With the most YouTube-Video works all like expected, but with some comes to an Error "YouTube error (video not found?)".

Of course it exist on YouTube and enabled for embedding. For example the following Video:

----

Don't Work:
http://www.youtube.com/v/SZR6Jfr3--0?f=videos&app=youtube_gdata

But the same URL without the QueryString works very well:
http://www.youtube.com/v/SZR6Jfr3--0

----

Other videos, however work with QueryString, like this:
http://www.youtube.com/watch?v=CbJRlB6pmqQ?f=videos&app=youtube_gdata

You can test it in your Setup-Wizard.

I think it's at the double hyphen. Anything in the processing with the URL going wrong.

Sorry for my bad english, i hope you understand all.

Best regards,

Waldemar Derr

 
Are you urlencoding the YouTube URIs?

All URIs for media files and data files should be urlencoded.

You can do the urlencoding manually, using a chart like this: http://i-technica.com/whitestuff/urlencodechart.html

Or, if you are using swfobject with JavaScript to embed your Flash content, you can use JavaScript's encodeURIComponent() method to do the urlencoding.

See the Tutorial Embedding Flash for more details.

Hi lost,

my embed-code is a little bit special and looks so (Example: http://id.kihiwi.de/WladiD/Kis/Kenne_ich/KiHiWi.113/index.html ):

<script type="text/javascript"><!--
(function()
{
var FlashVars = {};
FlashVars.backcolor = "FFFFFF";
FlashVars.frontcolor = "000000";
FlashVars.lightcolor = "3C49D1";
FlashVars.screencolor = "000000";
FlashVars.displaytitle = true;
FlashVars.file = "http://id.kihiwi.de/WladiD/tools/box.666/player/PlayList.xml";
FlashVars.repeat = "list";
swfobject.embedSWF("/media/player.swf","KiHiWiBoxPlayer28","640","400","9.0.0","/media/expressInstall.swf",FlashVars,{allowFullScreen:true,allowscriptaccess:"always",wmode:"opaque"},{name:"KiHiWiBoxPlayer28"});
})();
$(document).ready(function()
{
$("#KiHiWiBoxPlayer28").closest("div.KiHiWiBox.Player").BoxFetcherPlayer();
});
//--></script>

It is a mix of swfobject, jQuery and my own jQuery-Plugin to allow interaction between many player-instances. The playlist is loading from a rss-feed (in this case: http://id.kihiwi.de/WladiD/tools/box.666/player/PlayList.xml ), because i think, there is no need to additional encodings.

I'm still of the opinion that it is up to the double hyphens in the YouTube-VideoID and with the processing of URLs anywhere in jwPlayer.

I makes a workaround by simple remove the QueryString of http://www.youtube.com/v/SZR6Jfr3--0<<cut>>?f=videos&app=youtube_gdata<</cut>> in the rss-feed and now works all fine.

Best regards,

Waldemar Derr

 
Your playlist is missing the type element for the YouTube track.

Please review the supported values for the type element here:

    http://developer.longtailvideo.com/trac/wiki/FlashVars#Fileproperties

Since you're using a MediaRSS format playlist, you will have to use the jwplayer namespace (http://developer.longtailvideo.com/trac/wiki/FlashFormats#JWPlayerNamespace), like this:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
  <channel>
    <title>Abspielliste für die Player-Box #666</title>
    <item>
      <title>Test Track</title>
      <link></link>
      <description>Test for YouTube URI with hyphens</description>
      <media:group>
        <media:content url="<strong>http://www.youtube.com/watch?v=SZR6Jfr3--0&f=videos&app=youtube_gdata</strong>"/>
        <media:thumbnail url="http://img.youtube.com/vi/SZR6Jfr3--0/0.jpg"/>
      </media:group>
      <strong><jwplayer:type>youtube</jwplayer:type></strong>
    </item>
    <item>
      <title>Outer Limits Intro #1</title>
      <link>http://www.youtube.com/watch?v=CbJRlB6pmqQ</link>
      <description>Das Intro der Science-Fiction-Serie Outer-Limits.</description>
      <media:group>
        <media:content url="http://www.youtube.com/v/CbJRlB6pmqQ"/>
        <media:thumbnail url="http://img.youtube.com/vi/CbJRlB6pmqQ/0.jpg"/>
      </media:group>
      <strong><jwplayer:type>youtube</jwplayer:type></strong>
    </item>
    <item>
      <title>Outer Limits Intro</title>
      <description>Die Audio-Spur des Intros.</description>
      <media:group>
        <media:content url="/WladiD/Dateien/Outer%20Limits%20Intro.mp3"/>
        <media:thumbnail url="/WladiD/Dateien/Outer-Limits-FilmType.s3.1.jpg"/>
      </media:group>
    </item>
  </channel>
</rss>

You can see it working correctly with the hyphens and the appended parameters string here:

    http://willswonders.myip.org:8074/Simple_YouTube.html

Hi lost,

thank you for your try to help me out. Sadly i can't reach your example under: http://willswonders.myip.org:8074/Simple_YouTube.html
PC off?

Ok, i maked a static snapshot of the page, where the error occurs:

http://id.kihiwi.de/test/jwflv/index.html

There are 2 players, the first don't work, but the second do it correct. Both loading her Playlist from different XML-Files, where your suggested jwplayer-namespace is included with the type-tag for the item.

rss-feed for first player (don't work): http://id.kihiwi.de/test/jwflv/PlayList.xml
rss-feed for second player (work): http://id.kihiwi.de/test/jwflv/PlayList2.xml

I hope that example help you.
Are you involved in the development of the FLV-Player or are you responsible for the support?

Regards,
Waldemar Derr

Hello again,

i just now figured out, where the problem lies. Your posted xml works fine, but it is produced invalid xml, because the char "&" must be "& amp ;"(remove space, it is impossible to post the correct string here, but i think you know what i mean).

So, if it:

<media:content url="http://www.youtube.com/v/SZR6Jfr3--0?f=videos& amp ;app=youtube_gdata"/>

don't work, but is valid xml or it is:

<media:content url="http://www.youtube.com/v/SZR6Jfr3--0?f=videos&app=youtube_gdata"/>

works and is invalid xml. Now it is a dilemma.

I don't want to cripple my feeds only for to be compatible with the player. The better way was to fix this false attitude.

Sorry that my presumption with the hyphens was wrong...

Regards,
Waldemar Derr

 
I'm not involved with the JW FLV Player — just another user helping other users to get their players working.

This form of your playlist validates and works with the JW FLV Player.

You will have to remove the space between "&" and "amp;" before using the playlist.

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
  <channel>
    <title>Abspielliste für die Player-Box #666</title>
    <link>http://id.kihiwi.de/</link>
    <description>Test for YouTube URI with hyphens</description>
    <item>
      <title>Test Track</title>
      <link>http://id.kihiwi.de/</link>
      <description>Test for YouTube URI with hyphens</description>
      <media:group>
        <media:credit role="author">Author</media:credit>
        <!-- &amp; or &amp; -->
   <!-- <media:content url="http://www.youtube.com/watch?v=SZR6Jfr3--0&amp;f=videos&amp;app=youtube_gdata"/> -->
        <media:content url="http://www.youtube.com/watch?v=SZR6Jfr3--0& amp;f=videos& amp;app=youtube_gdata"/>
        <media:thumbnail url="http://img.youtube.com/vi/SZR6Jfr3--0/0.jpg"/>
      </media:group>
      <jwplayer:type>youtube</jwplayer:type>
      <jwplayer:playlist.image>http://img.youtube.com/vi/SZR6Jfr3--0/2.jpg</jwplayer:playlist.image>
    </item>
  </channel>
</rss>

I tested 2 forms of the "&" character, both work, however only "& amp;" (no space) validates at: http://validator.w3.org/feed/

You can use CDATA encapsulation of "bad xml" so that xml parsers realize it's not supposed to validate that text.

http://www.w3schools.com/xmL/xml_cdata.asp

<sometag><![CDATA[any test or url goes between these brackets]]></sometag>

I haven't tried using CDATA with a URL attribute, so I'm not sure if it will work for those situations

 
That's "cheating"!

YouTube Catcher 1.0 Log:

You can usually find the error in/or after the line "Stream mapping:"

on SVN-r15986, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --extra-cflags=-fno-common --enable-memalign-hack --enable-pthreads --enable-libmp3lame --enable-libxvid --enable-libvorbis

--enable-libtheora --enable-libspeex --enable-libfaac --enable-libgsm --enable-libx264 --enable-libschroedinger --enable-avisynth --enable-

swscale --enable-gpl
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 6. 0 / 52. 6. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
built on Dec 3 2008 01:59:37, gcc: 4.2.4
[h264 @ 0x3ec810]AVC: Consumed only 5 bytes instead of 256
[h264 @ 0x3ec810]AVC: Consumed only 11 bytes instead of 1793
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]AVC: nal size 0
[h264 @ 0x3ec810]non-existing PPS referenced
[h264 @ 0x3ec810]decode_slice_header error
[h264 @ 0x3ec810]no frame!
[h264 @ 0x3ec810]non-existing PPS referenced
[h264 @ 0x3ec810]decode_slice_header error
[h264 @ 0x3ec810]no frame!
[h264 @ 0x3ec810]AVC: nal size 575
[h264 @ 0x3ec810]no frame!
[flv @ 0x3eb670]skipping flv packet: type 108, size 4149567, flags 0
[flv @ 0x3eb670]Could not find codec parameters (Video: h264, yuv420p)

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, flv, from 'C:\DOCUME~1\crystal\LOCALS~1\Temp\_MTB719993231237566102009.flv':
Duration: 00:00:34.49, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 25.00 tb(r)
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16
Output #0, asf, to 'C:\Documents and Settings\crystal\Desktop\COMEDY KA HUNGAMA.wmv':
Stream #0.0: Video: wmv1, yuv420p, q=2-31, 200 kb/s, 25.00 tb(c)
Stream #0.1: Audio: wmav2, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[asf @ 0x3ece70]dimensions not set
Could not write header for output file #0 (incorrect codec parameters ?)

my error is someting like this.. after downloading, video is not playin.

my youtube url lost and i dont no how to get it back,how download videos without url,i really upset..............

sam - what is your YouTube URL?