Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Tag editing mpg, mpeg (Read 3138 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Tag editing mpg, mpeg

I hope I'm in the right spot to ask this.
I have used foobar2000 for a long time as a strong tag editor.

Version 2.24.1 x64  seemingly ignores files with extensions mpg and mpeg.

+Question: Was support for tagging of filenames with the extensions, mpg and mpeg get dropped from foobar2000? I have evidence it was supported in the past as a result of mistake I made years ago.

My mistake was, due to a column I created in foobar2000, I could see there was a mpeg2 stream inside the mpg file. I added .mp2 to the end of the filenames (making it filename.mpg.mp2). I never knew it was the wrong extension, as foobar2000 edited the tags fine, and media players could play them without complaint or issue.

I only discovered today that mp2 is an audio only container via ffmpeg. (ffmpeg copy process to a valid filename.ext of mkv, mp4 or avi and both video and audio streams would be present, but the same copy process to a mp2, the video stream was dropped). So I learned something today.

After what I learned, I search the web and learn more specifically about mpeg-1 file containers. In my search, I could find nothing to help me with the subject matter of this post, so here I am.

But wait, there's more. Now not only does my foobar2000 not show files with extensions mpg and mpeg. Now the editing of the incorrectly named mp2 files has become spotty. Now some mp2 files with a video stream can be edited, while others won't update and the properties dialog won't go away. I know for a fact, it's not a permission issue.

If I use ffmpeg to put them in a mkv container, they can be tagged, but I'd really like to avoid doing that.

Anyone who has a strong grasp of the changes in foobar2000 over the past decade, I would love to hear from you.

My foobar file type is set to:
Restrict to:
Exclude: *.cue;*7z;*.rar;*.cdg;*.txt;*.wim;*.png;*.jpg;*.zip

+Question: Am I correct in believing support was there, and now it's not, for foobar2000 to edit tags for mpg, mpeg and mp2 files? And if it still can, where else could it be "switched off" other than the file type section?

Note:  I did search this forum for mpeg, mpg, tagging mpg, and a bunch of other key words, and in combination. Found nothing even close to my question. So if someone does find my issue, please be kind.

Re: Tag editing mpg, mpeg

Reply #1
OK.. After changing foobar2000 Preferences>Local Media>File Type Restrict to: * then changing it back to an empty field, and files ending with mpg and mpeg are now showing up in the scan of a folder. .. (Don't ask me).

So that error is seemingly resolved, now to elaborate on the other one. Yesterday the properties dialogue wouldn't save and gave an error, "Unsupported file format" or "Access Denied". Access denied is illogical as all of the files have the same permissions.

So, take an untouched mpg file. I edit the Artist field and add an x to the end of the Artist Name, save. Works!
For good measure, I edit it again and change it back (remove the extra x).
Change the extension from mpg to mp2, edit the Artist field, it works. ..
Open again, remove the x. Save, works!
Change the extension back to mpg, edit the artist field, Access Denied
Change it back to mp2, Access Denied..

Uh.....It seems the Access Denied is somewhat a blanket error?

So I think, let's repackage this deal. I run it through ffmpeg, to refresh it:
ffmpeg -i FileName.mpg -c copy FileName2.mpg
And I'm back to, Unsupported file format.

Re: Tag editing mpg, mpeg

Reply #2
OK.. After changing foobar2000 Preferences>Local Media>File Type Restrict to: * then changing it back to an empty field, and files ending with mpg and mpeg are now showing up in the scan of a folder. .. (Don't ask me).

So that error is seemingly resolved, now to elaborate on the other one. Yesterday the properties dialogue wouldn't save and gave an error, "Unsupported file format" or "Access Denied". Access denied is illogical as all of the files have the same permissions.

So, take an untouched mpg file. I edit the Artist field and add an x to the end of the Artist Name, save. Works!
For good measure, I edit it again and change it back (remove the extra x).
Change the extension from mpg to mp2, edit the Artist field, it works. ..
Open again, remove the x. Save, works!
Change the extension back to mpg, edit the artist field, Access Denied
Change it back to mp2, Access Denied..

Uh.....It seems the Access Denied is somewhat a blanket error?

So I think, let's repackage this deal. I run it through ffmpeg, to refresh it:
ffmpeg -i FileName.mpg -c copy FileName2.mpg
And I'm back to, Unsupported file format.
Just put the MPG in a MKV container. After that you can tag everything you want.

Use MKVtoolnix to do the container conversion. It's free.

Re: Tag editing mpg, mpeg

Reply #3
Just put the MPG in a MKV container. After that you can tag everything you want.
Use MKVtoolnix to do the container conversion. It's free.

If I use ffmpeg to put them in a mkv container, they can be tagged, but I'd really like to avoid doing that.

Good idea, but if you read my original post, I prefer not to do that. I have my reasons....

My issue is, clearly foobar2000 is not able to edit the tags, it itself set.

Another idea, over the past decade, was there a plug-in that allowed editing of mpg files that has since been disabled, for compatibility reasons?

I'm trying to think of stuff here..

If there's a way to fix them outside of foobar2000, so foobar200 will be able to set the tags, I'm willing to try. However, I don't want to have to repeat the process every time I hit save.

It was just yesterday that I was able to set tags on the files, when they had incorrect extensions of mp2. Now, they are "Access Denied" under the correct extension of mpg. And before someone says, change 'em back. As previously stated, been there, done that=Fail.

Re: Tag editing mpg, mpeg

Reply #4
Off topic, but why do you wipe the "restrict incoming files to" filter empty? It's asterisk (*) by default, which means accept everything. It's even documented as '"Restrict incoming files" should be set to "*" unless you explicitly want to allow only files matching some criteria to be added'. Blank string is undefined, but I suppose in practice foobar treats it as asterisk.

Now to your topic. Doesn't look like MPEG has ever been supported by foobar2000 natively. I tested various version from foobar2000 v0.8 to modern day and foobar does not understand the files at all. There have been various addons during the years that have allowed decoding using system installed codecs, but I doubt directshow filters or such could add any form of tagging support.

Note that file extension does not tell what kind of file you are dealing with in reality. If your file is in a format that foobar2000 does understand, then tagging can work. You should do some closer examination of the files. If you have for example MPC-HC video player you can use its properties dialog to get codec ID from MediaInfo.

Access Denied is not a blanket error, it should only be shown when OS returns such error code. I suspect your file renames cause some shell extensions to go nuts with your files and they get locked by another process because of that. It should cause sharing violation error though.
When you do those renames, can foobar2000 read the file info from the files correctly afterwards? If you open Properties dialog, click Tools -> Reload info, do you get right data like valid tags (if present) and valid track duration?

You should really examine the files to get more information about the format they use. If you want to verify the Access Denied error, you could use Process Monitor to spy on the tagging process and see what goes on.

Re: Tag editing mpg, mpeg

Reply #5
Since mpg is essentially a video format and FB2K is essentially an audio player, one wonders why the OP is so persistent in wanting to shove a square peg into a round hole.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Tag editing mpg, mpeg

Reply #6
Wouldn't an "easy" test for access and locks be to
* tag file
* use explorer / cmd to copy the file to somewhere outside the library nor anywhere anything might want to scan it
* drag the copy into fb2k and see what happens?

Note that fb2k behaves different if you drag "unsupported" files into a playlist, than if you drag a folder with the same files.

Re: Tag editing mpg, mpeg

Reply #7
Off topic, but why do you wipe the "restrict incoming files to" filter empty? It's asterisk (*) by default, which means accept everything. It's even documented as '"Restrict incoming files" should be set to "*" unless you explicitly want to allow only files matching some criteria to be added'. Blank string is undefined, but I suppose in practice foobar treats it as asterisk.

First, thank you for your thoughtful reply.

Good to know, I'll put in an * -- I've got a lot on my plate in life, so that detail is something I didn't know. I don't claim to know everything, that's why I'm here. However foobar2000 seems to behave the same either way.

Now to your topic. Doesn't look like MPEG has ever been supported by foobar2000 natively. I tested various version from foobar2000 v0.8 to modern day and foobar does not understand the files at all. There have been various addons during the years that have allowed decoding using system installed codecs, but I doubt directshow filters or such could add any form of tagging support.

To put it simply, I have no reason to believe any file that foobar2000 displays after searching a path, is not supported. I mean, there are other file types with metadata, it doesn't dispay them. (And when I say scan, I don't mean drag and drop).

Note that file extension does not tell what kind of file you are dealing with in reality. If your file is in a format that foobar2000 does understand, then tagging can work. You should do some closer examination of the files. If you have for example MPC-HC video player you can use its properties dialog to get codec ID from MediaInfo.

As hinted, the files contain mpeg-1 video stream, mp2 audio stream. If you would like, I can give you the output of ffprobe.

Access Denied is not a blanket error, it should only be shown when OS returns such error code. I suspect your file renames cause some shell extensions to go nuts with your files and they get locked by another process because of that. It should cause sharing violation error though.
When you do those renames, can foobar2000 read the file info from the files correctly afterwards? If you open Properties dialog, click Tools -> Reload info, do you get right data like valid tags (if present) and valid track duration?

First off, your suggestion to click Tools -> Reload info is a good one! However, I don't see it. So I'll have to continue to close foobar2000, waited a bit, and re-opened it to get it to rescan. My foobar has the menus: File Edit View Playback Library Help
The files that are of issue are being scanned by foobar2000, I'm not dealing with a drag and drop thing.
The files tags are being read after being scanned perfectly. They display perfectly.

You should really examine the files to get more information about the format they use. If you want to verify the Access Denied error, you could use Process Monitor to spy on the tagging process and see what goes on.

As previously stated, I'm pretty sure it's not a permission issue:
   I was able to edit some of these files tags with foobar2000 just days ago. Didn't move them, didn't change permissions.
   The filename EXTENSION change is the only variable.
   And another note, as previously mentioned, wouldn't a file, freshly created with ffmpeg be writable? Because according to foobar2000, it's not.
   
   Another note, the files that are creating issues, are in the same directory as non-problematic files containing the same mpeg1 + mp2 steams.
   There are no funky permissions going on.
   Resetting file permissions no help
   Windows has me marked as the "Owner"
   Restarting the machine, no help.
   Moving the files to another folder, no help.
   NOTE: If Windows has a lock on the file, restarting the computer would break it, and you couldn't rename the file.
   I even installed foobar2000 (x64) in another folder, bare bones. Access Denied

Filename is only alpha numeric. No other characters. e.g., 2abc - de fghi jkl mno pq rs.mpg

Thanks for your thoughtful reply, but I'm still stuck.

Process Monitor to spy on the tagging process and see what goes on... I'm interested! How?

Re: Tag editing mpg, mpeg

Reply #8
Since mpg is essentially a video format and FB2K is essentially an audio player, one wonders why the OP is so persistent in wanting to shove a square peg into a round hole.

Your post is off topic!

I have come here for help.

What is the purpose of your post. Is it purely to insult me? Shame me? Or just to boost your numbers of how many posts you have made?


Re: Tag editing mpg, mpeg

Reply #9
Wouldn't an "easy" test for access and locks be to
* tag file
* use explorer / cmd to copy the file to somewhere outside the library nor anywhere anything might want to scan it
* drag the copy into fb2k and see what happens?

Note that fb2k behaves different if you drag "unsupported" files into a playlist, than if you drag a folder with the same files.

I would love to tag the file that I used to be able to tag just fine two days ago.
I didn't mention this before, but I did try that before my inital post. I copied a series of files to another drive, and filesystem completely, no change.
When I said foobar2000 scanned them, I didn't drag and drop them. I closed foobar2000, waited 10 or so seconds to save, and re-opened it. Put in a search parameter of where the files were and worked from there.

NOTE, I have been a DJ since the 80's. I have over 12k CD's DVD's VCDs etc... I have a lot of music. I have a lot of videos. These videos are old, mpg videos with mpeg-1 video stream and mp2 audio stream.

Everything leads me to believe the files have RW access to everything.

I've even opened them on a different machine in foobar2000, same result.

I can rename them, I can run them through ffmpeg and do a -c copy and even the copied file fails in foobar2000 (as previously mentioned).


Re: Tag editing mpg, mpeg

Reply #10
I am willing to share images from my screen if that helps... Is it even possible?

Re: Tag editing mpg, mpeg

Reply #11
Your post is off topic!
Don't be silly.  Not being what you want to hear doesn't make it off-topic.

Quote
What is the purpose of your post. Is it purely to insult me? Shame me? Or just to boost your numbers of how many posts you have made?
Not at all, it is a gentle suggestion that you might be barking up the wrong tree.

Video files have multiple streams within a container format, audio files are usually containerless or at least have just the one stream within.  There is no reason to expect FB2K to do what you want, even if (by chance) it has managed to in the past.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Tag editing mpg, mpeg

Reply #12
I've even opened them on a different machine in foobar2000, same result.

I can rename them, I can run them through ffmpeg and do a -c copy and even the copied file fails in foobar2000 (as previously mentioned).
I rest my case.

I have come here for help.
That does not mean help will be forthcoming, except to advise you do it a different way.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Tag editing mpg, mpeg

Reply #13
...one wonders why the OP is so persistent in wanting to shove a square peg into a round hole..

Your post is off topic!
Don't be silly.  Not being what you want to hear doesn't make it off-topic.

So you insult me by essentially calling me stupid "wanting to shove a square peg into a round hole". Then you insult me again by labeling my reaction to your insult as "silly". The majority of what you've contributed to this thread is inflamitory and can only lead to discussions that are off topic.. Hence my statemet is True.


Video files have multiple streams within a container format, audio files are usually containerless or at least have just the one stream within.  There is no reason to expect FB2K to do what you want, even if (by chance) it has managed to in the past.

3GP is a audio container; which supports codecs: AMR-NB AMR-WB AMR-WB+ AAC-LC HE-AAC v1, HE-AAC V2; MP3
ADTS is a container, which supports AAC & mpeg
mp4 is a container; which is designed to contain AAC, ALS, FLAC, SLS, MP4, MP1 speech, TTSI SAOL Apple lossless, Free Lossless Audio Codec and Opus
mpeg-1 and mpeg-2 containers support: MPEG-1 Audio Layer I, MPEG-1 Audio Layer II, MPEG-1 Audio Layer III (MP3)
ogg is a container and supports: FLAC, Opus, Vorbis

What I expect is irrelevent. What is fact is relevent.

Again, See how your post leads to "off topic"

I've even opened them on a different machine in foobar2000, same result.

I can rename them, I can run them through ffmpeg and do a -c copy and even the copied file fails in foobar2000 (as previously mentioned).
I rest my case.

So your case is?... Since foobar2000 opens a file for tagging, for years, then--without any system or software changes--refuses to save to said file again, I shouldn't have used foobar2000 in the first place? -- Not helpful off topic.

Again, why I'm using foobar, how dumb you think I am, and the difference between a codec and a container is Not the topic.

The topic at hand: Foobar2000 works. Foobar2000 doesn't work, all because of a file extension changed twice. Did foobar2000 damage my files?

If you're willing to contribute to a conclusion for the topic, good or bad-- That's great! But you have done nothing but make negative comments that can only lead to off topic discussions, your feelings about my question are off topic, and I'd appreciate for you to stop sharing your feelings and stick to the facts. If you wanna talk about how you feel about a thread, please start a new one.

Re: Tag editing mpg, mpeg

Reply #14
I am willing to share images from my screen if that helps... Is it even possible?
If you got a file, I could see if it behaves any different from mine ... ?

As for that other discussion, I use fb2k to play videos when not watching them, and I don't find that request weird.

Re: Tag editing mpg, mpeg

Reply #15
I could reproduce an "Access Denied". Turns out I have very few .mpg files around still, but I found a few; two have a tag set and I could provoke "Access Denied".

* They are silent; contains silent MP2 at 32 kbit/s mono. Thus I cannot be completely sure that fb2k plays them, but it seems to do so. It correctly reports codec, channel count and bitrate, but wrong length.
* fb2k reports they contain ID3v2.4|ID3v1. Inspecting them I see "ID3" at the beginning and "TAG" near the end.
* Opening the tag dialog, trying to make a change: "Access Denied". RG scan and try to save: "Could not update tags (Access denied) on:" <new line with path>
* If I run ffmpeg -i file -codec copy out.mpg , then out.mpg does not behave the same.

Edit: Could it be the tagsets ...?

Re: Tag editing mpg, mpeg

Reply #16
I am willing to share images from my screen if that helps... Is it even possible?
If you got a file, I could see if it behaves any different from mine ... ?

As for that other discussion, I use fb2k to play videos when not watching them, and I don't find that request weird.

Great!.. Two things..
First I need to find a small one, see if it works/doesn't work.
Second, and I don't see how to share them. So, could you please tell me what we have to do?

I'm not using foobar2000 to play them. I've spent thousands of hours on foobar writing conditional tests to manage my huge database. stuff, like this:
Code: [Select]
$if($not($strstr(%path%,'\HD')),$puts(tit,$replace($replace($replace($replace($replace($replace($replace($replace($replace($ifgreater($len($meta(Title)),0,$meta(Title),$mid($meta(MBD),$add($strchr($meta(MBD),'|'),1),$sub($strrchr($meta(MBD),'|'),1))),$if($or($strchr($left($meta(Title),1),'"'),$strchr($left($meta(Title),1),'”')),$left($meta(Title),2),),'“'$substr($meta(Title),2,2)),' "',' “'),'("','(“'),'["','[“'),'"','”'),'*','^'),'/',';'),':','-'),'?','~'))$puts(art,$replace($replace($replace($replace($replace($replace($replace($replace($replace($ifgreater($len($meta(Artist)),0,$meta(Artist),$right($meta(MBD),$sub($len($meta(MBD)),$strrchr($meta(MBD),'|')))),$if($or($strchr($left($meta(Artist),1),'"'),$strchr($left($meta(Artist),1),'”')),$left($meta(Artist),2),),'“'$substr($meta(Artist),2,2)),' "',' “'),'("','(“'),'["','[“'),'"','”'),'*','^'),'/',';'),':','-'),'?','~'))$puts(alb,$replace($replace($replace($replace($replace($replace($replace($replace($replace($ifgreater($len($meta(Album)),0,$meta(Album),),$if($or($strchr($left($meta(Album),1),'"'),$strchr($left($meta(Album),1),'”')),$left($meta(Album),2),),'“'$substr($meta(Album),2,2)),' "',' “'),'("','(“'),'["','[“'),'"','”'),'*','^'),'/',';'),':','-'),'?','~'))$puts(albsrt,$meta(AlbumSort)$meta(AlbumSortOrder))$puts(aa,$replace($replace($replace($replace($replace($replace($replace($replace($replace($swapprefix($meta(Album Artist),'A','DJ','El','La','Le','Las','Los','MC','Tha','The'),$if($or($strchr($left($meta(Album Artist),1),'"'),$strchr($left($meta(Album Artist),1),'”')),$left($meta(Album Artist),2),),'“'$substr($meta(Album Artist),2,2)),' "',' “'),'("','(“'),'["','[“'),'"','”'),'*','^'),'/',';'),':','-'),'?','~'))$if($or($strstr(%path%,'\Karaoke\'),$strstr(%Grouping%,'Karaoke')),$puts(kc,'1')$puts(pth1,$if($put(aaso,$meta(AlbumArtistSortOrder)$meta(AlbumArtistSort)),$get(aaso)'_')$get(aa))$puts(pth2,$if($info(Video_Codec),'Videos\','CDG\'))$puts(pth3,'Karaoke\')$if($not($strstr(%path%,'\Jockey\')),$puts(pth2,$get(pth1))$puts(pth1,$get(albsrt)),)$puts(echfna,$if($get(albsrt),$get(albsrt)'-'$if($and($greater($num(%tracknumber%,1),0),$greater($meta(TotalTracks),99)),$num(%track number%,$len($meta(TotalTracks))),$if(%tracknumber%,%tracknumber%,'##'))$ifgreater($strstr(%Grouping%,'Vocal Left'),0,'_L',$ifgreater($strstr(%Grouping%,'Multiplex'),0,'_R',$ifgreater($strstr(%Grouping%,'Vocal'),0,'_C',$ifgreater($strstr(%Grouping%,'Explicit'),0,'_E',)))),$left($meta(MBD),$sub($strchr($meta(MBD),'|'),1)))[' - '$get(art)' - ']),$puts(rdet,$ifgreater($num($substr($replace($replace($replace($replace($upper(%copyright%),'©',),'℗',),'(C)',),' ',),1,4),4),1850,$num($substr($replace($replace($replace($replace($upper(%copyright%),'©',),'℗',),'(C)',),' ',),1,4),4),$ifgreater($num($substr($replace($replace($replace($replace($upper(%publisher%),'©',),'℗',),'(C)',),' ',),1,4),4),1850,$num($substr($replace($replace($replace($replace($upper(%publisher%),'©',),'℗',),'(C)',),' ',),1,4),4),$ifgreater($num($left($meta(Date),4),4),1850,$left($meta(date),4),))))$puts(grp,$ifgreater($len($meta(Grouping)),0,' ['$replace($meta(grouping),'; ','][')']',))$puts(stralb,$right($get(alb),$len($stripprefix($replace($replace($get(alb),$char(160),$char(32)),$char(95),$char(32)),'A','DJ','El','La','Le','Las','Los','MC','Tha','The'))))$puts(strlab,$stripprefix($meta(label)))$if($or($not($meta(Album Artist)),$strcmp($left($get(aa),9),'Unknown A'),$and($strstr($get(aa),'Various'),$not($meta(Album)))),$puts(pth3,'Music\z5_no_Album_artist')$puts(pth1a,$get(stralb)),$if($or($strstr(%Album Artist%,'Various'),$strstr($get(grp),'Mixed')),$puts(pth3,'Music\z1_Various')$if($meta(Series),$puts(pth1a,$right($meta(Series),$len($stripprefix($replace($replace($meta(Series),$char(160),$char(32)),$char(95),$char(32)),'A','DJ','El','La','Le','Las','Los','MC','Tha','The')))' {'$get(rdet)'} '$trim($right($get(alb),$sub($len($get(alb)),$len($stripprefix($replace($replace($meta(Series),$char(160),$char(32)),$char(95),$char(32)),'A','DJ','El','La','Le','Las','Los','MC','Tha','The')),1)))),$puts(pth1a,$get(stralb))),$puts(pth4,'Music\z0_Artist')$puts(aal,$left($caps2($get(aa)),1))$puts(pth3,$if($strstr(0123456789,$get(aal)),'0 up (numbers)',$if($strstr('XYZ',$get(aal)),'XYZ',$get(aal))))$puts(pth2,$get(aa))$puts(pth1a,$if($get(alb),$if($get(rdet),$if($and($get(rdet),$get(alb)),$get(rdet)'_ '$get(alb),),$get(stralb))))$if($meta(Series),$puts(pth1b,' ('$meta(Series)')'),)))$puts(pth1c,$if($get(alb),$if($and($strstr($get(grp),'Compilation'),$get(strlab),$not($meta(Series))),$replace($get(grp),'Compilation',$if($strchr($get(strlab),$char(32)),$left($get(strlab),$strchr($get(strlab),$char(32))),$get(strlab)$char(32))'Compilation'),$get(grp))))$puts(pth1d,$if($or($greater($meta(totaldiscs),1),$greater($meta(discnumber),1)),' (CD'$ifgreater($meta(totaldiscs),9,$num($meta(discnumber),2),$meta(discnumber))$if($meta(discsubtitle),' '$meta(discsubtitle))')',))$puts(pth1p,$get(pth1a)$get(pth1b)$get(pth1c)$get(pth1d))$puts(pth1,$if($strcmp('...',$right($get(pth1p),3)),$left($get(pth1p),$sub($len($get(pth1p)),3)),$if($strcmp('..',$right($get(pth1p),2)),$left($get(pth1p),$sub($len($get(pth1p)),2)),$if($strcmp('.',$right($get(pth1p),1)),$trim($left($get(pth1p),$len($get(pth1p)))),$get(pth1p))))))$puts(echfn,$if($strcmp($info(cue_embedded),'yes'),$if($strcmp($get(pth3),'z1_Various'),$if($meta(Series),$get(pth1),$get(pth1a)$get(pth1c)$if($get(rdet),' {'$get(rdet)'}',)$get(pth1d)),$get(pth2)' - '$get(rdet)' - '$get(alb)$get(pth1b)$get(pth1c)$get(pth1d)),$if($strcmp($get(kc),'1'),$get(echfna),$if($and($meta(Album Artist),$not($strcmp($left($get(aa),9),'Unknown A')),$meta(Album),$meta(TrackNumber)),%tracknumber%' - ',)$if($get(art),$get(art)' - ',))$get(tit)$if($and($strstr(%path%,'\Jockey\'),$or($strstr(%owner%,'!W4S'),$not($or($strstr(%owner%,'BH'),$strstr(%owner%,'CC'),$strstr(%owner%,'DW'),$strstr(%owner%,'EM'),$strstr(%owner%,'GD'),$strstr(%owner%,'JC'),$strstr(%owner%,'LC'),$strstr(%owner%,'wsy'))))),'[!W4S]'))$replace($if($not($strstr(%path%,'\Jockey\')),$puts(fntit,$substr(%filename%,$add($strrchr($replace(%filename%,' - ','|'),'|'),$sub($len(%filename%),$len($replace(%filename%,' - ',)),1)),$len(%filename%)))$ifgreater($put(fnsc,$strchr($replace($get(fntit),'{','['),'[')),1,$puts(fnsuf,$substr($get(fntit),$if($strchr($substr($get(fntit),$sub($get(fnsc),1),$sub($get(fnsc),1)),$char(32)),$sub($get(fnsc),1),$get(fnsc)),$strrchr($replace($get(fntit),'}',']'),']'))),)$ifgreater($strchr($get(fntit),'{'),1,$puts(fnsufc,$substr($get(fntit),$strchr($get(fntit),'{'),$strrchr($get(fntit),'}'))),)$ifgreater($strchr($get(fntit),'['),1,$puts(fnsufk,$substr($get(fntit),$strchr($get(fntit),'['),$strrchr($get(fntit),']'))),)$puts(fnsuffo,$if($strstr($get(tit),$get(fnsufc)),$replace($replace($get(fnsuf),$get(fnsufc),),'{}',),$get(fnsuf)))$if($strstr($get(tit),$get(fnsufk)),$replace($replace($get(fnsuffo),$get(fnsufk),),'[]',),$get(fnsuffo)),),'] [',']['))$ifgreater($len(%path%),259,>>>$sub($len(%path%),259)' Characters too many!'<<<,)$puts(pthtst,$if($and($strchr($meta(OriginalFilename),'÷'),$not($strstr(%path%,'\Jockey\'))),$replace(%OriginalFilename%,'÷','\'),))$if($not($strstr(%path%,$if2($get(pthtst),$if($get(pth4),$get(pth4)'\',)$if($get(pth3),$get(pth3)'\',)$if($get(pth2),$get(pth2)'\',)$get(pth1)$if($and($get(pth1),$get(echfn)),'\')$get(echfn)))),$replace(>$if($strstr(%path%,'\Jockey\'),$if($and($get(pth4),$not($strstr(%path%,'\'$get(pth4)'\'))),$get(pth4)'\')$if($and($get(pth3),$not($strstr(%path%,'\'$get(pth3)'\'))),$get(pth3)'\')$if($and($get(pth2),$not($strstr(%path%,'\'$get(pth2)'\'))),$get(pth2)'\')$if($and($get(pth1),$not($strcmp($directory(%path%,1),$get(pth1)))),$get(pth1)'\'),)$if($not($strcmp(%filename%,$get(echfn))),$get(echfn))<,$char(160),<<<<'░'>>>>)),)
And that's in a file that's 2670 lines long.

I just did some experimenting. And I seem to have solved this myself.

The files in question have id3v2.3 tags (even though my foobar2000 is set up to write v2.4 tags, I suspect this regression is due to the extension).

Files that I run through ffmpeg and simply remux them, ffmpeg strips the id3v2.3 tags, and even is you specify tag parameters in the transcode line, to retain or write metadata such as artist, title. ffmpeg will not write a id3v2.3 tag.

And here's the solution: Files with the extension .mpg, that lack a id3v2.3 tag do not appear in foobar2000 "Media library search".

If I drag them into a playlist, and try to add a tag, I get the, "Unsupported file format" error in the lower left of the Properties window, and it won't close. Okay... Not what I wanted, but it's logical and an answer.

If I append the wrong file extension to the filename (.mp2),  they suddenly appear in the "Media library search" area.
Now I can open the properties dialogue in foobar2000, add my information for the tag and foobar2000 will successfully writes a id3v2.3 tag with all the bells and whistles, including replay gain!

Now I removed the appended extension and it now shows the correct one (.mpg). And with that extension, foobar2000 will continue to display the file in the "Media library search" with all the information nice and pretty. But any attempt to write any changes to the file again results in the error, Access Denied.
So there's no doubt in my mind, Access Denied is Not the correct error result. --- Not why I'm here, but it's a notable point.

One thing that's cleared up is, for a while yesterday, I couldn't even edit them as mp2. (don't ask me).

After some reading online, mpg weren't originally designed to contain a id3v2.3 tag. But they can be injected in with software that allows it, and using foobar2000, it can be done with the aforementioned steps.

.. So i guess I have my answers.

And one final thing, I would like to amend my reply to a previous answer (that I can no longer edit):

Now to your topic. Doesn't look like MPEG has ever been supported by foobar2000 natively. I tested various version from foobar2000 v0.8 to modern day and foobar does not understand the files at all. There have been various addons during the years that have allowed decoding using system installed codecs, but I doubt directshow filters or such could add any form of tagging support.

To put it simply, I have no reason to believe any file that foobar2000 displays after searching a path, is not supported. I mean, there are other file types with metadata, it doesn't display them. (And when I say scan, I don't mean drag and drop).

Given what I have learned through all of my experimentation, I would like to add that you are correct. .mpg files not supported in foobar2000 natively -- Unless they come with a id3 tag.. Which is a good thing for me!

Now.. That I know foobar2000 can inject tags into mpeg files.. Please don't remove that ability.. I really heavily on tags.

Heck, I'd like it if there was an option in foobar2000's Preference to inject a id3v2.3 tag into mpg/mpeg video files. Clearly it works.  Or at the very least, allow modification of existing id3v2.3 tag. --- I know it may not be readable by all software, but the ones I've tried, it works! And most importantly, it serves a purpose for me and it's functional in this ecosystem!

Thanks for your time, have a great day.

 

Re: Tag editing mpg, mpeg

Reply #17
All right.

Same seems to happen here, if I rename the file into .mp1, .mp2 or .mp3 (but not .mp4). Then I can tag, and set MP3 tag type (ID3v1, ID3v2 as .3 or .4 - and APEv2). I can also drag the file into MP3tag; it objects ("MP3 header parse error" even if extension is ".mp1"), but it can do the tagging.
Picard will also tag (but not not ".mp1") - with ID3v2.4.

Change extension back to .mpg; then foobar2000 accepts it if it has tags. Not otherwise.
 
Since I could do this on files with "proper audio", not just silence: foobar2000 then plays them completely wrong. Not static - rather, gibberish.


I guess ... not "problem solved", but explanation found?

Re: Tag editing mpg, mpeg

Reply #18
I seem to suck at replicating this. If I rename an mpeg video to .mp2 or .mp3 I can load and tag such file, but as soon as I rename it back to .mpg it's no longer accepted by foobar2000.

Re: Tag editing mpg, mpeg

Reply #19
I seem to suck at replicating this. If I rename an mpeg video to .mp2 or .mp3 I can load and tag such file, but as soon as I rename it back to .mpg it's no longer accepted by foobar2000.

I'd be afraid to name it mp3, just feels wrong.

Also I'm finding a similar issue with flv files. Some flv files show up in foobar2000's Media Library Search, while (most) others do not. So this isn't an isolated issue... Seems to me I've set tags in those too in the past. But when it comes to my memory, I know one thing, every time I put on a different work hat (electrician, plumber, auto mechanic, farm work, Computer networking, OS install and setup, music database manager. bla bla bla) I realize how much I don't remember!

Clearly tags can be injected  into certain video files by foobar2000 without damaging the files.. ... .. I'm sure you can imagine all the things off topic I'd like to put here about wishes...

Let me know if I can run any tests that I haven't thought of, I'm willing to help.

Re: Tag editing mpg, mpeg

Reply #20
Faking the extension to .mp3 isn't any more wrong than faking it to .mp2. With both extensions, if the fooling is successful, foobar2000 will just work with ID3 tags. These tags don't affect the bits of the original file as they exist completely outside its bitstream. If foobar2000 for some reason recognized the file as MP4 however, then the file might get ruined. That format has the metadata inside the container bitstream. But obviously the file would need to look like MP4 format for foobar2000 to treat it as such.

I would have liked to reproduce the Access Denied issue you and Porcus managed to trigger. Would have been curious to try to see what it is about. It sounds like some component returns a wrong exception code when it doesn't actually support the format.

FLV is another format that has never been supported by foobar2000 by default or with a first party component. There is (or was) a very old component for it though, foo_flv.

Edit: just a quick update that Peter found the cause for access denied error, no need for reproducing anymore.

Re: Tag editing mpg, mpeg

Reply #21
Update, while messing around a few days ago, I changed the extension of a mp3 to mp3x .. (I don't remember why).. Well, I forgot about it, and it showed up when I did a search in foobar2000's Media Library Search. I didn't notice the odd extension until after I got he infamous message : 1 file could not be updated: Access Denied. So I opened the folder Dropped the x and, it updated fine after that.

If foobar2000 is a audio player and a tag editor, and the more I think about it, it can edit tags for containers that have also contain video streams (mp4, ogg).   3GP ADTS mp4 mpg mpeg-1, mpeg-2 and ogg are all containers. foobar2000 clearly does a great job managing  tags on some of them. Here's my argument, If it contains an audio stream, why not allow foobar2000 to edit an appropriate tag matching the audio stream, or at the very least, the Exif data. I know Exif data can be restrictive but it's something. How does VLC do it? This technically question is on topic (if you ignore the fact I've mentioned containers other than mpeg1/2) and could lead to a solution  From what I've read, mpeg1 or mpeg2 audio streams in a mpg container can contain Exif data by design.