Call to undefined method getid3_lib::GetJJScomments()

Call to undefined method getid3_lib::GetJJScomments()

Postby amitd » Wed Mar 09, 2011 7:37 am

hello,

Firstly i was using older version of "getid3" but i was getting the wrong "Genre" i.e.(Genre was not updated while we upload new mp3 file) that's y i downloaded its new version (1.8.5)
but now i am getting new trouble that is
"Fatal error: Call to undefined method getid3_lib::GetJJScomments() in /var/www/projects/djpoolportal/admin/inc/template.class.php(71) : eval()'d code on line 108 ". i don't know why this is occurring. Should i need to change anything in code ? Somebody Please help me regarding this issue as quickly as possible for you because this is urgent work for me. i am waiting for your response.

Thanks
Aseem
amitd
User
 
Posts: 5
Joined: Wed Mar 09, 2011 7:24 am

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby James Heinrich » Wed Mar 09, 2011 7:52 am

GetJJScomments is not part of getID3(). It sounds like you're using something that's based on getID3, but rather than keeping their additional functions in a separate library file they have put them inside getid3.lib.php, which makes it hard for the end user to upgrade getID3 versions without breaking things (as you found out).

So it's not a getID3() problem, please contact the developer of whatever other project is using getID3.
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

How to upgrade getid3 with its latest version?

Postby amitd » Thu Mar 10, 2011 1:46 am

hello James,

Can you please suggest me ? what stuff of files i need to update while i upgrade the "getid3" with its latest version because as i told i am getting an Fatal Error i think that is happening due to updating wrong stuff of files or whatever. i am waiting for your reply.

Thanks
Aseem
amitd
User
 
Posts: 5
Joined: Wed Mar 09, 2011 7:24 am

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby James Heinrich » Thu Mar 10, 2011 5:49 am

Written properly, the rest of your code should be completely independent of the rest of your code the version of getID3. You need to figure out what extra code has been put into the getID3 files (such as GetJJScomments) and move them to a separate file so that next time you upgrade getID3 it doesn't break everything else. There's not much more I can tell you.
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

how do i get the image from getID3?

Postby amitd » Wed Mar 30, 2011 12:56 am

hi!

I want to get the image like artist name ,album name, description etc. but i don't know how to do this actually while i tried to fetch the [''picture] array it displayed binary code.
So, is there any way to get the image? waiting for reply..because this is an urgent issue.

Thanks
Aseem
amitd
User
 
Posts: 5
Joined: Wed Mar 09, 2011 7:24 am

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby James Heinrich » Wed Mar 30, 2011 9:47 am

The image is binary data... just save it or display it or whatever you wanted to do with it. I don't really understand your question.
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby amitd » Thu Mar 31, 2011 12:31 am

I mean i got a code in encoded form..you just tell me in simple words how do i get the attached cover image with track using getid3_lib() ? is there any function to do this ?
amitd
User
 
Posts: 5
Joined: Wed Mar 09, 2011 7:24 am

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby James Heinrich » Thu Mar 31, 2011 4:47 am

Code: Select all
require_once('../getid3/getid3.php');
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($filename);
getid3_lib::CopyTagsToComments($ThisFileInfo);
if (!empty($ThisFileInfo['tags']['picture'])) {
   foreach ($ThisFileInfo['tags']['picture'] as $key => $value) {
      file_put_contents($ThisFileInfo['filename'].'.pic'.$key.'.jpg', $value);
   }
}
If "myfile.mp3" has an attached picture, that should output "myfile.mp3.pic1.jpg", as long as your directory is writable.
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby amitd » Fri Apr 01, 2011 2:53 am

hi

I tried your function to get the image name but i got failure. I am sending you track array view which i got during upload track .

And i have seen this mp3 file into tag editor where it shows cover image perfect. Even i used this code in the image tag to display image but i didn't get any image.

Actually the picture array code is so wide and it is difficult for me to paste all the code here that's y i am giving here just a concise view of the code.
Please review the below code and reply what should i do in this case.

Code: Select all
Array
(
    [GETID3_VERSION] => 1.8.5-20110218
    [filesize] => 6018994
    [avdataoffset] => 174879
    [avdataend] => 6018994
    [fileformat] => mp3
    [audio] => Array
        (
            [dataformat] => mp3
            [channels] => 2
            [sample_rate] => 44100
            [bitrate] => 320000
            [channelmode] => stereo
            [bitrate_mode] => cbr
            [lossless] =>
            [encoder_options] => CBR320
            [compression_ratio] => 0.22675736961451
            [streams] => Array
                (
                    [0] => Array
                        (
                            [dataformat] => mp3
                            [channels] => 2
                            [sample_rate] => 44100
                            [bitrate] => 320000
                            [channelmode] => stereo
                            [bitrate_mode] => cbr
                            [lossless] =>
                            [encoder_options] => CBR320
                            [compression_ratio] => 0.22675736961451
                        )

                )

        )

    [tags] => Array
        (
            [id3v2] => Array
                (
                    [title] => Array
                        (
                            [0] => Gyallis 4 Eva
                        )

                    [artist] => Array
                        (
                            [0] => Flex
                        )

                    [composer] => Array
                        (
                            [0] => Produced By Chimney Records
                        )

                    [album] => Array
                        (
                            [0] => (2009)Movie Star Riddim*** (Produced By Chimney Records)
                        )

                    [description] => Array
                        (
                            [0] => Jamaica
                        )

                    [year] => Array
                        (
                            [0] => 2009
                        )

                    [genre] => Array
                        (
                            [0] => Dancehall
                        )

                    [comments] => Array
                        (
                            [0] => May 12
                            [1] => 0000103E 0000107E 000069D6 000084B8 000113B6 00013C6D 00008D0D 00008B69 0001A778 00021282
                            [2] => 00000000 00000210 000009AD 00000000006244C3 00000000 00590BEB 00000000 00000000 00000000 00000000 00000000 00000000
                            [3] => 1
                        )

                    [encoded_by] => Array
                        (
                            [0] => iTunes 8.1.1.10
                        )

                    [picture] => Array
                        (
                            [0] => Array
                                (
                                    [data] => �����JFIF���d�d�����Ducky�����d�����Adobe�d���������
                                    [image_mime] => image/jpeg
                                )

                        )

                )

        )
amitd
User
 
Posts: 5
Joined: Wed Mar 09, 2011 7:24 am

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby James Heinrich » Fri Apr 01, 2011 6:03 am

Sorry, I forgot it was in a [data] sub-array:

Code: Select all
require_once('../getid3/getid3.php');
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($filename);
getid3_lib::CopyTagsToComments($ThisFileInfo);
if (!empty($ThisFileInfo['tags']['picture'])) {
   foreach ($ThisFileInfo['tags']['id3v2']['picture'] as $key => $valuearray) {
      if (isset($valuearray['data']) && isset($valuearray['image_mime'])) {
         file_put_contents($ThisFileInfo['filename'].'.pic'.$key.'.'.str_replace('image/', '', $valuearray['image_mime']), $valuearray['data']);
      }
   }
}
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby ecolora » Wed Feb 15, 2012 4:47 am

I tryed use Your code, and it was not work, but when i replaced tags to comments all worked fine:
Code: Select all
 
if (!empty($ThisFileInfo['comments']['picture'])) {
   foreach ($ThisFileInfo['comments']['picture'] as $key => $value) {
      file_put_contents($ThisFileInfo['filename'].'.pic'.$key.'.jpg', $value);
   }
}

Why?
ecolora
User
 
Posts: 6
Joined: Fri May 20, 2011 9:29 am

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby James Heinrich » Wed Feb 15, 2012 3:19 pm

This line was wrong:
Code: Select all
if (!empty($ThisFileInfo['tags']['picture'])) {
it should have been:
Code: Select all
if (!empty($ThisFileInfo['tags']['id3v2']['picture'])) {
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby ecolora » Wed Feb 15, 2012 5:30 pm

Wich version are You talking about?

I'am using version GetID3 from November 2011. If I'll add code

Code: Select all
print_r($ThisFileInfo);


I'll not see any tags keys... only comments and there i can see the picture.

Do You need screenshot of my page?
ecolora
User
 
Posts: 6
Joined: Fri May 20, 2011 9:29 am

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby James Heinrich » Thu Feb 16, 2012 9:11 am

If you could send me the HTML output of /demo/demo.browse.php I would be interested to see that.
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby ecolora » Thu Feb 16, 2012 9:50 am

I'm not using /demo/demo.browse.php

I use getId3_lib in own project.

I can see picture only wen set:

Code: Select all
$getPID3->option_tag_id3v2 = true;


If i set it to false nothing shown. I have no values with 'comments' key in its case.

You can see below the result of print_r($ThisFileInfo);

Array ( [GETID3_VERSION] => 1.9.1-20110810 [filesize] => 3823533 [filename] => Arash_and_Helena_-_Broken_angel.mp3 [filepath] => D:/Program Files/Apache Group/Apache/htdocs/joomla25/music [filenamepath] => D:/Program Files/Apache Group/Apache/htdocs/joomla25/music/Arash_and_Helena_-_Broken_angel.mp3 [avdataoffset] => 252 [avdataend] => 3823533 [fileformat] => mp3 [audio] => Array ( [dataformat] => mp3 [channels] => 2 [sample_rate] => 44100 [bitrate] => 160000 [channelmode] => stereo [bitrate_mode] => cbr [codec] => LAME [encoder] => LAME3.98r [lossless] => [encoder_options] => CBR160 [compression_ratio] => 0.113378684807 [streams] => Array ( [0] => Array ( [dataformat] => mp3 [channels] => 2 [sample_rate] => 44100 [bitrate] => 160000 [channelmode] => stereo [bitrate_mode] => cbr [codec] => LAME [encoder] => LAME3.98r [lossless] => [encoder_options] => CBR160 [compression_ratio] => 0.113378684807 ) ) ) [tags] => Array ( [id3v2] => Array ( [title] => Array ( [0] => Broken Angel ) [artist] => Array ( [0] => Arash & Helena ) [encoder_settings] => Array ( [0] => LAME 64bits version 3.98.4 (http://www.mp3dev.org/) ) [length] => Array ( [0] => 191111 ) ) ) [encoding] => UTF-8 [id3v2] => Array ( [header] => 1 [flags] => Array ( [unsynch] => [exthead] => [experim] => ) [majorversion] => 3 [minorversion] => 0 [headerlength] => 252 [tag_offset_start] => 0 [tag_offset_end] => 252 [encoding] => UTF-8 [comments] => Array ( [title] => Array ( [0] => Broken Angel ) [artist] => Array ( [0] => Arash & Helena ) [encoder_settings] => Array ( [0] => LAME 64bits version 3.98.4 (http://www.mp3dev.org/) ) [length] => Array ( [0] => 191111 ) ) [TIT2] => Array ( [0] => Array ( [frame_name] => TIT2 [frame_flags_raw] => 0 [data] => Broken Angel [datalength] => 13 [dataoffset] => 10 [framenamelong] => Title/songname/content description [framenameshort] => title [flags] => Array ( [TagAlterPreservation] => [FileAlterPreservation] => [ReadOnly] => [compression] => [Encryption] => [GroupingIdentity] => ) [encodingid] => 0 [encoding] => ISO-8859-1 ) ) [TPE1] => Array ( [0] => Array ( [frame_name] => TPE1 [frame_flags_raw] => 0 [data] => Arash & Helena [datalength] => 15 [dataoffset] => 33 [framenamelong] => Lead performer(s)/Soloist(s) [framenameshort] => artist [flags] => Array ( [TagAlterPreservation] => [FileAlterPreservation] => [ReadOnly] => [compression] => [Encryption] => [GroupingIdentity] => ) [encodingid] => 0 [encoding] => ISO-8859-1 ) ) [COMM] => Array ( [0] => Array ( [frame_name] => COMM [frame_flags_raw] => 0 [data] => [datalength] => 5 [dataoffset] => 58 [framenamelong] => Comments [framenameshort] => comment [flags] => Array ( [TagAlterPreservation] => [FileAlterPreservation] => [ReadOnly] => [compression] => [Encryption] => [GroupingIdentity] => ) [encodingid] => 0 [encoding] => ISO-8859-1 [language] => eng [languagename] => English [description] => ) ) [TSSE] => Array ( [0] => Array ( [frame_name] => TSSE [frame_flags_raw] => 0 [data] => LAME 64bits version 3.98.4 (http://www.mp3dev.org/) [datalength] => 52 [dataoffset] => 73 [framenamelong] => Software/Hardware and settings used for encoding [framenameshort] => encoder_settings [flags] => Array ( [TagAlterPreservation] => [FileAlterPreservation] => [ReadOnly] => [compression] => [Encryption] => [GroupingIdentity] => ) [encodingid] => 0 [encoding] => ISO-8859-1 ) ) [TLEN] => Array ( [0] => Array ( [frame_name] => TLEN [frame_flags_raw] => 16384 [data] => 191111 [datalength] => 7 [dataoffset] => 135 [framenamelong] => Length [framenameshort] => length [flags] => Array ( [TagAlterPreservation] => [FileAlterPreservation] => 1 [ReadOnly] => [compression] => [Encryption] => [GroupingIdentity] => ) [encodingid] => 0 [encoding] => ISO-8859-1 ) ) [padding] => Array ( [start] => 152 [length] => 100 [valid] => 1 ) ) [mime_type] => audio/mpeg [mpeg] => Array ( [audio] => Array ( [raw] => Array ( [synch] => 4094 [version] => 3 [layer] => 1 [protection] => 1 [bitrate] => 10 [sample_rate] => 0 [padding] => 0 [private] => 0 [channelmode] => 0 [modeextension] => 0 [copyright] => 0 [original] => 0 [emphasis] => 0 ) [version] => 1 [layer] => 3 [channelmode] => stereo [channels] => 2 [sample_rate] => 44100 [protection] => [private] => [modeextension] => [copyright] => [original] => [emphasis] => none [padding] => [bitrate] => 160000 [framelength] => 522 [bitrate_mode] => cbr [VBR_method] => Xing [xing_flags_raw] => 15 [xing_flags] => Array ( [frames] => 1 [bytes] => 1 [toc] => 1 [vbr_scale] => 1 ) [VBR_frames] => 7317 [VBR_bytes] => 3823281 [toc] => Array ( [0] => 0 [1] => 3 [2] => 5 [3] => 7 [4] => 11 [5] => 13 [6] => 15 [7] => 17 [8] => 21 [9] => 23 [10] => 25 [11] => 29 [12] => 31 [13] => 33 [14] => 35 [15] => 39 [16] => 41 [17] => 43 [18] => 47 [19] => 49 [20] => 51 [21] => 53 [22] => 57 [23] => 59 [24] => 61 [25] => 64 [26] => 67 [27] => 69 [28] => 71 [29] => 75 [30] => 77 [31] => 79 [32] => 81 [33] => 85 [34] => 87 [35] => 89 [36] => 92 [37] => 95 [38] => 97 [39] => 99 [40] => 103 [41] => 105 [42] => 107 [43] => 110 [44] => 113 [45] => 115 [46] => 117 [47] => 120 [48] => 123 [49] => 125 [50] => 128 [51] => 130 [52] => 133 [53] => 135 [54] => 138 [55] => 141 [56] => 143 [57] => 145 [58] => 148 [59] => 151 [60] => 153 [61] => 156 [62] => 158 [63] => 161 [64] => 163 [65] => 166 [66] => 169 [67] => 171 [68] => 174 [69] => 176 [70] => 179 [71] => 181 [72] => 184 [73] => 186 [74] => 189 [75] => 192 [76] => 194 [77] => 197 [78] => 199 [79] => 202 [80] => 204 [81] => 207 [82] => 209 [83] => 212 [84] => 214 [85] => 217 [86] => 220 [87] => 222 [88] => 225 [89] => 227 [90] => 230 [91] => 232 [92] => 235 [93] => 238 [94] => 240 [95] => 242 [96] => 245 [97] => 248 [98] => 250 [99] => 253 ) [LAME] => Array ( [short_version] => LAME3.98r [RGAD] => Array ( [track] => Array ( [raw] => Array ( [name] => 1 [originator] => 3 [sign_bit] => 1 [gain_adjust] => 96 ) [name] => Track Gain Adjustment [originator] => determined automatically [gain_db] => -9.6 ) ) [raw] => Array ( [vbr_method] => 1 [RGAD_track] => 11872 [RGAD_album] => 0 [abrbitrate_minbitrate] => 160 [noise_shaping] => 2 [stereo_mode] => 1 [not_optimal_quality] => 0 [source_sample_freq] => 1 [mp3_gain] => 0 [surround_info] => 0 ) [vbr_quality] => 57 [tag_revision] => 0 [vbr_method] => cbr [lowpass_frequency] => 17500 [encoding_flags] => Array ( [nspsytune] => 1 [nssafejoint] => 1 [nogap_next] => [nogap_prev] => ) [ath_type] => 4 [encoder_delay] => 576 [end_padding] => 576 [noise_shaping] => 2 [stereo_mode] => stereo [not_optimal_quality] => [source_sample_freq] => 44.1 kHz [mp3_gain_db] => 0 [mp3_gain_factor] => 1 [surround_info] => no surround info [preset_used_id] => 160 [preset_used] => --alt-preset cbr 160 [audio_bytes] => 3823281 [music_crc] => 50562 [lame_tag_crc] => 14249 ) ) ) [replay_gain] => Array ( [track] => Array ( [originator] => determined automatically [adjustment] => -9.6 [volume] => 98.6 ) [reference_volume] => 89 ) [playtime_seconds] => 191.16405 [tags_html] => Array ( [id3v2] => Array ( [title] => Array ( [0] => Broken Angel ) [artist] => Array ( [0] => Arash & Helena ) [encoder_settings] => Array ( [0] => LAME 64bits version 3.98.4 (http://www.mp3dev.org/) ) [length] => Array ( [0] => 191111 ) ) ) [bitrate] => 160000 [playtime_string] => 3:11 [comments] => Array ( [title] => Array ( [0] => Broken Angel ) [artist] => Array ( [0] => Arash & Helena ) [encoder_settings] => Array ( [0] => LAME 64bits version 3.98.4 (http://www.mp3dev.org/) ) [length] => Array ( [0] => 191111 ) ) [comments_html] => Array ( [title] => Array ( [0] => Broken Angel ) [artist] => Array ( [0] => Arash & Helena ) [encoder_settings] => Array ( [0] => LAME 64bits version 3.98.4 (http://www.mp3dev.org/) ) [length] => Array ( [0] => 191111 ) ) )
ecolora
User
 
Posts: 6
Joined: Fri May 20, 2011 9:29 am

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby James Heinrich » Thu Feb 16, 2012 4:14 pm

ecolora wrote:I'm not using /demo/demo.browse.php
Please open up /demo/demo.browse.php, browse to the file in question (D:/Program Files/Apache Group/Apache/htdocs/joomla25/music/Arash_and_Helena_-_Broken_angel.mp3), and then email me the HTML of that page, it would be useful to me.
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby ecolora » Thu Feb 16, 2012 5:00 pm

I have no /demo/demo.browse.php ... i'm using only Your libraries. Sorry.

Thx for good libraries!

Another question: could I read information from mp3 on external FTP?
ecolora
User
 
Posts: 6
Joined: Fri May 20, 2011 9:29 am

Re: Call to undefined method getid3_lib::GetJJScomments()

Postby James Heinrich » Fri Feb 17, 2012 7:24 am

Then grab a copy of the latest distribution and use /demo/demo.browse.php from there.

As for remote file support, there's a number of threads on the subject on these forums, this is probably the most comprehensive one:
viewtopic.php?t=1197
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada


Return to Support 1.x (resolved)

Who is online

Users browsing this forum: Lexcentryst and 0 guests

cron