MP4 Movies
MP4 Movies
Might PB someday handle MP4 movie playback?
Re: MP4 Movies
It does. Well, it uses whatever codecs you have installed. So install 'em for MP4. 

I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: MP4 Movies
I think I have the codec. I can play mp4 files with Windows Media Player but no joy with the PB movie functions. The video is H.264.
Re: MP4 Movies
Just tested it. Works here without any problems.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: MP4 Movies
Yep, been playing MP4s for many years with PureBasic.
Here's the stats of one such video (H264 like you) as shown by Media Player Classic:
Here's the stats of one such video (H264 like you) as shown by Media Player Classic:
Code: Select all
Video: MPEG4 Video (H264) 1280x720 23.976fps 2772kbps [Video]
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3mn 17s
Bit rate : 2 773 Kbps
Maximum bit rate : 5 029 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.125
Stream size : 65.3 MiB (93%)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: MP4 Movies
MP4 works fine here:
Code: Select all
EnableExplicit
InitNetwork() : InitMovie()
Define.s video = "http://www.annettlouisan.de/1/video/deinding.mp4"
Define.s file = GetTemporaryDirectory() + GetFilePart(video)
If FileSize(file) <= 0
ReceiveHTTPFile(video, file)
EndIf
If LoadMovie(0, file)
OpenWindow(0, #PB_Ignore, #PB_Ignore, MovieWidth(0), MovieHeight(0), "Annett Louisan - www.annettlouisan.de")
PlayMovie(0, WindowID(0))
While MovieStatus(0) <= 0
Delay(10)
Wend
Repeat
Select WaitWindowEvent(100)
Case #PB_Event_CloseWindow
Break
Case 0
If Not MovieStatus(0)
Break
EndIf
EndSelect
ForEver
EndIf
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

- BasicallyPure
- Enthusiast
- Posts: 539
- Joined: Thu Mar 24, 2011 12:40 am
- Location: Iowa, USA
Re: MP4 Movies
Using ts-soft's code the movie downloads to the temp folder ok but PureBasic does not play it.
The movie plays fine with Windows media player or VLC media player.
I'm using Windows 7 Home premium (x64) service pack 1.
The movie plays fine with Windows media player or VLC media player.
I'm using Windows 7 Home premium (x64) service pack 1.
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
Until you know everything you know nothing, all you have is what you believe.
Re: MP4 Movies
I think you have to change the priority of codecs. You can use this tool:
http://www.majorgeeks.com/files/details ... er%29.html
http://www.majorgeeks.com/files/details ... er%29.html
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
