IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Support of audio from MPG/MPEG/M2V files., Is it available yet?
EpicForever
post Jan 20 2013, 22:31
Post #1





Group: Members
Posts: 652
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



I looked through forums for information about such plugin, but I found only old questions (asked in 2006-2009...). Does anyone knows about existing plugin that will let me play just audio stream from .mpg/.mpeg/.m2v files? I DON'T need any support for video stream. I found old Haali's plugin for some DirectShow files (foo_input_ds) that allows to play audio from .avi and .mkv as well as .ts/.m2ts files files after adding them in configuration dialog. But it can't handle .mpg files even when added in config. Surprisingly it can even play audio from .mpg files with extension changed to .avi, but I don't want to do such change in all my mvids for compatibility reasons (with TV and BluRay player).
So? Anyone uses such .mpg plugin and can link to it?
Go to the top of the page
+Quote Post
Rollin
post Jan 21 2013, 08:32
Post #2





Group: Members
Posts: 184
Joined: 5-March 08
Member No.: 51815



foo_input_exe + ffmpeg.exe and you can play audio from almost any video file
Go to the top of the page
+Quote Post
CoRoNe
post Jan 22 2013, 23:28
Post #3





Group: Members
Posts: 164
Joined: 31-May 05
From: Netherlands
Member No.: 22417



Decode command: ffmpeg.exe -i %s -f wav %d
File type mask: *.mpg; *.mpeg; *.m2v; *.vob

This works for these file types, but is it the correct decode command?
Would this decode command, with %d, be the only way to get a song length at all, or is there some ffmpeg command I can use to get a song length while piping the output instead?


--------------------
DC-Bass Source Mod: http://reino.degeelebosch.nl
Go to the top of the page
+Quote Post
EpicForever
post Jan 23 2013, 18:39
Post #4





Group: Members
Posts: 652
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



I came here to ask for exact command line as going through ffmpeg documentation scared me a bit... So thanks CoRoNe for asnwering my question before I even asked it, and let me join in your question smile.gif . How to get lenght of track without using temp wavs?
Other question is - if foobar uses FFmpeg code to decode some audio formats now, then isn't it possible to let foobar to catch audio (and only audio) from all video formats that are supported by FFmpeg by some simple code tweak/change? This question goes to foobar developers of course...
Go to the top of the page
+Quote Post
CoRoNe
post Jan 23 2013, 22:12
Post #5





Group: Members
Posts: 164
Joined: 31-May 05
From: Netherlands
Member No.: 22417



For your 2nd question...after some testing, I'd say:

CODE
Format name: ffmpeg
Decode command: ffmpeg.exe -i %s -f wav -
File type mask: *.avi; *.mpeg; *.vob; *.ts; *.m2ts; *.mp4; *.mov; *.ogm; *.mkv; *.flv; *.rm
Decoder output format: wav

Notes:
- At the moment Foobar always unsuccesfully uses its own resources to open mpg[mp2]-files. Adding *.mpg to the "File type mask" doesn't make a difference. Renaming to .mpeg does help for now.
- Foobar supports mp4[aac] just fine. *.mp4 is for everything not aac. (in my collection of test files I had a mp4[nellymoser]- and a mp4[als]-file for instance)
- Rename ogg[theora(or any other video format)+vorbis]-files to .ogm. Although ffmpeg/ffplay can handle/play them just fine, Foobar can't open them, no matter if you add *.ogg to the "File type mask" or not.
[edit]- *.webm isn't necessary. Foobar can play the Vorbis-soundtrack. *.mkv is for just in case. I've had some Matroska files Foobar itself couldn't open.[/edit]
- *.wmv isn't necessary. Foobar can play all the soundtracks.
- Everything else plays just fine! cool.gif (without a clip length or the ability to time-seek though)

This post has been edited by CoRoNe: Jan 23 2013, 23:10


--------------------
DC-Bass Source Mod: http://reino.degeelebosch.nl
Go to the top of the page
+Quote Post
EpicForever
post Jan 23 2013, 22:46
Post #6





Group: Members
Posts: 652
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Well something is strange...
I used your command and at first it worked fine. It showed time of track and .mpg files played fine. But I noticed that there was something that changed in configuration of foo_input_ds - *.mpg was added to file mask. What is completely strange foobar doesn't ask me for ffmpeg localisation... I wanted to check something and I deleted my "MPEG Video" profile. When check has failed I recreated profile and... everything stopped working. .mpg files won't play or (not all the time) foobar throws that it can't find specified decoder... What happened? how files were played at the begining? how should I point foobar to ffmpeg executable? where are temporary wavs stored? I couldn't find them anywhere.

EDIT:
OK so how it works for me:
I got foo_input_ds from Haali installed. When I add "*.mpg" to it's "Supported file types " list in foobar's "Advanced settings/DirectShow Input Settings" and create "MPEG Video" profile in Command-line Decoder Wrapper settings with just decode command: "ffmpeg.exe -i %s -f wav %d" and file type mask: "*.mpg; *.mpeg; *.m2v; *.vob" AND restart foobar - everything works fine. .mpg files are played fine and got length displayed. Before I restart foobar application throws that it cannot find decoder and any MPEG-PS file can not be played. After foobar restart everything works fine - tell me how foobar finds ffmpeg on my PC then? And how it works if I can't catch ffmpeg process in Windows Task Manager (Admin account, "show all processes" checked)? I can't also localize any temp wav files - even with Unlocker. Problem that occured when I first deleted and recreated my profile in Command Line Decoder was that in foobar's "Advanced settings/DirectShow Input Settings/Supported file types" I got " *mpg" instead of "* .mpg" (that small dot matters...). Now everyting works fine again. When I add " *.mpeg" and " *.m2v" to "Advanced settings/DirectShow Input Settings/Supported file types" they also play fine and show length... For .flv files I use foo_flv - you can find it here on foobar's forum - in 3rd party plugins section or upload section. .ts, .m2ts, .mts, .m2t and .mkv works just fine with just foo_input_ds - as well as .avi files. Additionally .vob files work - at current config (foo_input_ds + .vob added in it's config and added in Command Line Decoder Wrapper config - same as with .mpg and .m2v).

EDIT2:
However .mpg files sometimes just skip and can't play after certain time point. Some of them play with glitches throughout whole track. Also, strange thing is that format description is just file extension (I set is in Command Line Decoder Wrapper settings as " MPEG Video"), that bitrate of audio isn't diplayed, but bit depth is... Mostly it's 16bit, but I found one file that shows 32 bits... Bit depth in lossy transform coding... so it have to be that wav bit depth but how about bitrate? Sample rate is displayed... Mostly 48k, but also 44k is often... Something is strange.

EDIT3:
This configuration seems to be bit unstable. After working for more than hal an hour foobar stopped playing .mpg files and started producing glithes - like there were no profiles in CLDW and no input_ds installed. Restart of application solved this problem. Also I can't play .mov files. I can't even add them into playlist.

EDIT4:
Looks like every change to configuration (adding or deleting file extension into/from CLDW profile or into/from "Advanced settings/DirectShow Input Settings/Supported file types") requires restart of foobar. Otherwise after changing settings and changing track foobar throws that it can't find decoder...

This post has been edited by EpicForever: Jan 23 2013, 23:29
Go to the top of the page
+Quote Post
CoRoNe
post Jan 23 2013, 23:20
Post #7





Group: Members
Posts: 164
Joined: 31-May 05
From: Netherlands
Member No.: 22417



First of all, I don't use and have never used foo_input_ds, so I can't help you with that.

QUOTE (EpicForever @ Jan 23 2013, 22:46) *
how should I point foobar to ffmpeg executable?
QUOTE (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Command-Line_Decoder_Wrapper_(foo_input_exe))
Use the bottom pane of the preferences page to specify folders containing your decoder binaries. If your binaries are present in %PATH%, there's no need to do so.

QUOTE (EpicForever @ Jan 23 2013, 22:46) *
where are temporary wavs stored? I couldn't find them anywhere.
I'm still on WinXP and I found them in C:\Documents and Settings\Admin\Local Settings\temp.

QUOTE (EpicForever @ Jan 23 2013, 22:46) *
Also, strange thing is that format description is just file extension...
[edit]I guess that's all foo_input_exe is forwarding from ffmpeg for Foobar to use. You could ask Peter.[/edit]

This post has been edited by CoRoNe: Jan 23 2013, 23:27


--------------------
DC-Bass Source Mod: http://reino.degeelebosch.nl
Go to the top of the page
+Quote Post
EpicForever
post Jan 23 2013, 23:58
Post #8





Group: Members
Posts: 652
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



I found another glitch in my current config. As I said before, certain .mpg/.mpeg/.m2v files play only partially or with glitches/crackles. Other thing is that in every .mpg/.mpeg/.m2v file that I played, when I tried to seek to distant point from current play position playback was interrupted and then track was automatically changed. This does not affect .ts/.m2ts,..., .mp4, .vob, .avi and .mkv files - all that are natively supported by foo_input_ds (.ts/.m2ts,..., .avi and .mkv)+ .mp4 and .vob

This post has been edited by EpicForever: Jan 24 2013, 00:09
Go to the top of the page
+Quote Post
EpicForever
post Feb 2 2013, 15:16
Post #9





Group: Members
Posts: 652
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



I found ghosts on my PC. Ghots are playing audio from my video files sometimes instead of ffmpeg. Above you can find my configuration. What I've noticed that I could never found temp wav file and I was never asked by my firewall weather foobar can run ffmpeg. Sometimes I couldn't play audio from my videos and sometimes everything worked fine. Today something changed. At first I couldn't play any audio from my MPG files. I've tried change some config and restart foobar but it didn't work. Suddenly, about 15 minutes ago for the first time my firewall asked if foobar can run ffmpeg.exe... For the first time I found temp wav file... For the first time I understand how it works... Then my question is - how it worked before? Output with ffmpeg wasn't set to stdout - never. It was always set to output temp wavs which never could be found. ffmpeg wasn't run. Then how it worked? :/ I don't like ghosts on my PC...
Go to the top of the page
+Quote Post
Rollin
post Feb 2 2013, 19:28
Post #10





Group: Members
Posts: 184
Joined: 5-March 08
Member No.: 51815



QUOTE (EpicForever @ Feb 2 2013, 18:16) *
I found ghosts on my PC. Ghots are playing audio from my video files sometimes instead of ffmpeg.


What file types? *.mpg and *.mkv can be handled by foobar itself. But for me *.mpg is always played with glitches when it is handled by foobar.
If you have foo_input_exe and foo_input_ds installed together, maybe one time your files was handled by foo_input_ds and other time - by foo_input_exe

This post has been edited by Rollin: Feb 2 2013, 19:34
Go to the top of the page
+Quote Post
EpicForever
post Feb 2 2013, 20:13
Post #11





Group: Members
Posts: 652
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



And the other time by foobar itself - that was the moments which I described as "sometimes I couldn't play audio from my videos" - there were glitches. These are mpg/m2v/mpeg files. What causes that randomnes in handling these files? I thought that detection of components and other opening and decoding routines are quite unambiguous algorithms... What can I do to make handling of mpg/m2v/mpeg files bounded with foo_input_exe+ffmpeg only? or with foo_input_ds only ? That makes me corious. Currently I see ghosts that are chosing randomly between 3 kinds of handling available in foobar...

EDIT:
So it looks like quite long time my mpg/m2v/mpeg files were handled by foo_input_ds (when they were working) or by internal foobar routines (when they were not working) and today, for the very first time ffmpeg was used, despite it was properly configured since begining... So again - what can I do to make handling of mpg/m2v/mpeg files bounded with foo_input_exe+ffmpeg only? or with foo_input_ds only ?

This post has been edited by EpicForever: Feb 2 2013, 20:15
Go to the top of the page
+Quote Post
Rollin
post Feb 3 2013, 08:48
Post #12





Group: Members
Posts: 184
Joined: 5-March 08
Member No.: 51815



QUOTE (EpicForever @ Feb 2 2013, 23:13) *
That makes me corious. Currently I see ghosts that are chosing randomly between 3 kinds of handling available in foobar...

The same for me laugh.gif But my "ghost" is choosing between 2 kinds of handling available in foobar, because I not use foo_input_ds.
I tested it many, many times and it seems completely random. You better ask Peter about this.
Go to the top of the page
+Quote Post
EpicForever
post Feb 3 2013, 13:46
Post #13





Group: Members
Posts: 652
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Should I bother him via PM or should I just wait patiently for his look on this thread? I really want it to be solved...
Go to the top of the page
+Quote Post
Peter
post Feb 3 2013, 13:47
Post #14





Group: Admin
Posts: 3269
Joined: 30-September 01
Member No.: 84



When there are multiple handlers for some format, the behavior is kept random by design as there's no logic for foobar2000 to decide which handler is "better".

.MPG will be excluded from the standard MP2/MP3 decoder in version 1.2.3.


--------------------
This job would be great if it wasn't for the users.
Go to the top of the page
+Quote Post
EpicForever
post Feb 3 2013, 15:32
Post #15





Group: Members
Posts: 652
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



Thank you smile.gif . I think it's good choice smile.gif . Then I will use just foo_input_ds instead of ffmpeg.
Go to the top of the page
+Quote Post
EpicForever
post Feb 3 2013, 19:02
Post #16





Group: Members
Posts: 652
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



As an answer to my own question, from the title of the thread: yes it is easily possible with first file from this url: http://haali.su/fb2k/ - just install it via Components Manager or copy it to "foobar2000\components" directory. Additionally, in foobar's configuration under "Advanced\DirectShow input settings" you should enter this line: *.mkv;*.mka;*.avi;*.ts;*.mts;*.m2ts;*.m2t;*.mpg;*.mpeg;*.m2v;*.vob
And everything works just fine smile.gif

This post has been edited by EpicForever: Feb 3 2013, 19:40
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd April 2014 - 19:50