MP4

Discussions related to sound, music, video and other multimedia applications
KenDown
Posts: 327
Joined: Wed 04 Apr 2018, 06:36

MP4

Post by KenDown »

I've used the method set out in the Wiki to play .mpg files - it also plays .mp3 audio files - but I need to play .mp4 and .mpeg files. If I double-click on them up comes a player, so there must be a codec somewhere, but I can't get them to play from within BASIC. Any ideas, please?
mikeg
Posts: 101
Joined: Sat 23 Jun 2018, 19:52

Re: MP4

Post by mikeg »

Focus is on code subject. Feel free to judge the quality of my work.
KenDown
Posts: 327
Joined: Wed 04 Apr 2018, 06:36

Re: MP4

Post by KenDown »

Thanks, but that is the method I already use to play .mp3 and .mpg files. It simply does not play .mp4 Indeed, it won't even play .mpg files until I have installed Adobe Premiere, which must load in a codec or two.
RichardRussell

Re: MP4

Post by RichardRussell »

KenDown wrote: Sun 22 Dec 2019, 11:31 Thanks, but that is the method I already use to play .mp3 and .mpg files. It simply does not play .mp4
You evidently don't have a suitable codec. There's a free codec pack available for download here which includes an MP4 codec; it should allow the Direct Show player code from the wiki to work. I've tried it and it works for me.

Just be careful not to click through the installation wizard without de-selecting the optional anti-virus program and browser that it tries to foist on you. Easy enough to disable, and a legitimate way for them to get an income, but potentially irritating if you don't notice the 'fine print'.

On the plus side the codec pack is signed, so I was a lot more comfortable installing it than I would have been otherwise.
KenDown
Posts: 327
Joined: Wed 04 Apr 2018, 06:36

Re: MP4

Post by KenDown »

Thanks. Unfortunately, when I tried downloading, the download was successful and demanded permission to make changes (which I granted) but as soon as I clicked on anything, the installer vanished. Even something as simple as "Accept" crashed it.
RichardRussell

Re: MP4

Post by RichardRussell »

KenDown wrote: Thu 02 Apr 2020, 19:46 Unfortunately, when I tried downloading, the download was successful and demanded permission to make changes (which I granted) but as soon as I clicked on anything, the installer vanished. Even something as simple as "Accept" crashed it.
Obviously I'm in no position to give any detailed help; it's not my code (my only contribution was a Google search!). I'm sure you've tried the usual precautions such as disabling your virus scanner, and double-checking that you've downloaded the right version. All I can say is that it works very nicely here (Windows 10) and I'm pleased to have a more comprehensive set of codecs, so thanks for raising the issue.
KenDown
Posts: 327
Joined: Wed 04 Apr 2018, 06:36

Re: MP4

Post by KenDown »

Ironically, some time after my previous post I accidentally left a reference to an .mp4 file in my Display program - and it played! I was astonished and couldn't work out how come or how to achieve the same result with my laptops. I tried installing various programs that used .mp4 without success and then remembered this conversation. I downloaded the drivers file on my Win10 laptop and it not only installed without difficulty but enabled me to play .mp4 with Display. I can only conclude that despite the apparent crashing, the drivers did actually install - so a huge thank-you to Richard. A much-felt need solved.
RichardRussell

Re: MP4

Post by RichardRussell »

KenDown wrote: Sat 31 Oct 2020, 20:16so a huge thank-you to Richard.
Actually to Google! Although I don't exactly mind acting as your amanuensis and typing in the Google search, it would be a lot quicker and easier to do that yourself. In general I would say that if you have a query that is not very specific to BBC BASIC you should use Google to find the answer, not ask here. That would also I mean I don't get the blame if it doesn't work.
KenDown
Posts: 327
Joined: Wed 04 Apr 2018, 06:36

Re: MP4

Post by KenDown »

I'll admit that I'm suspicious about offers to update my drivers, even if I've gone looking for them. Plus, of course, I didn't know that drivers were the problem. I thought it possible that playing different media (ie. mp4 as opposed to mpg) might require a completely different routine. I was mildly surprised to discover that it didn't.
RichardRussell

Re: MP4

Post by RichardRussell »

KenDown wrote: Sun 01 Nov 2020, 00:45 I'll admit that I'm suspicious about offers to update my drivers, even if I've gone looking for them. Plus, of course, I didn't know that drivers were the problem.
It's not drivers but codecs. I thought it was well known (I still do!) that which media formats you can play depends on which codecs you have installed. I agree that updating an existing driver or codec might be considered risky*, but you needed to add a new codec rather than update an existing one.

*Modern Windows will not even allow you to update a driver unless it is signed, so the risk should be small anyway.