如何从VB6的文件中播放不同格式的音频\视频流? [英] How can i play Audio\Video Streams of different Formats from within a file in VB6 ?

查看:116
本文介绍了如何从VB6的文件中播放不同格式的音频\视频流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用电影播放器​​,以一种非常罕见的受支持视频格式(* .dpg或更高版本)
 称为NDS-Mpeg.我弄清楚了DPG格式的文件格式规范,发现DPG格式是一种可以容纳1个音频和1个视频流的容器格式.我已经编写了一个工作类型结构,可以读取所有DPG标头 信息.我还设法找到并提取了音频和音频.通过使用DPG标头中存储的信息进行视频流.音频流是Mpeg第2层编码的.视频流是包含Mpeg Layer-1的* .avi文件 编码视频或Mpeg Layer-1 * .mpg.我还阅读了一些有关AVICreateStream API的文档,但被卡住了.我想从DPG文件中逐块地读取流,这样我就可以缓冲流数据并在保持同步的同时对其进行播放. 应该在不将流提取到外部文件的情况下完成此操作.这意味着我也需要有机会明智地播放Stream块.
   我可以读出Streams,所以那不是问题.如果我将它们提取出来,它们甚至可以立即在WMP中播放,甚至无需修改即可.还有另一个问题.从版本3之前的DPG提取的AVI流似乎总是具有60 FPS.一世 通过修补提取的视频和VLC来设法修复FPS,例如以正确的速度播放视频,但是WMP例如仍以60 FPS播放.通过使用媒体信息,我发现还有一个称为原始帧速率"的值 称即使修补后仍为60 FPS(而FPS显示正确的固定FPS).我还阅读了有关AVI文件格式规范的不同文档,并且知道如何计算原始帧率(速率\比例),但是当我通过修补它来更改值时 要么导致AVI损坏,要么对播放时的FPS没有影响.如何为原始帧速率"将视频修补到正确的FPS ???

I am currently working on a movie player for a very rare supported video format, *.dpg or better
  known as NDS-Mpeg. I figured out the file format specifications for the DPG format and found out that the DPG Format is a container format that can hold 1 Audio and 1 Video Stream. I have written a working type structure that reads out all the DPG Header Information. I am also managed to locate and extract the Audio & Video Streams by use of the information that is stored in the DPG Header. The Audio Stream is Mpeg Layer-2 encoded. The Video Stream is either an *.avi file that contains an Mpeg Layer-1 encoded Video or a Mpeg Layer-1 *.mpg. I also read some documentation about the AVICreateStream API but i got stuck. I want to read out the streams block wise from within the DPG file, so i can then buffer the stream data and play it back while keep it synced. This should be acomplished without to extract the streams to an external file. That means that i need a possibility to play a Stream block wise, too.
    I can read the Streams out, so thats not the problem. They even play right away in the WMP even without modifications if i extract them. There is another question. An AVI Stream extracted of a DPG up to version 3 always seems to have 60 FPS. I managed to fix the FPS by patching the extracted video and VLC for example does play the video in correct speed, but the WMP e.g. does still play it at 60 FPS. Using Media Info i figured out that there is another value called 'original framerate' that stills says 60 FPS even after patching (while FPS is showing the correct fixed FPS). I also read different documentation on the AVI file format specifications and know how to calculate the original framerate (rate\scale) but when i change the values by patching it either results in corrupt AVI or has no effect on the FPS while playback. How do i patch the video to the correct FPS for the 'original framerate' ???

即使对于Microsoft的你们来说,这似乎也确实是一种黑魔法,或者为什么我在网上找不到那么多文章呢? :)

This really seems to be some kind of black magic even for you guys at microsoft or why the heck i can't find so few articles on the web ?! :)

希望'某人可能会帮助我...如果我想到自己有多近,我就要疯了
达到我想要的,我无法得到.工作中最困难的部分已经完成. Atleast
我是这么认为的;(

hope' someone may can help me ... i am about to went crazy if i think about how near i am
to what i want and i can't get it. The most of the hard part of work is already done. Atleast
i thought so ;(

 

 

推荐答案

请仔细阅读此主题.>>

Please read this thread thoroughly.>>

The blue text portions on that post are further links .  :-)

 

此论坛通常是 ,仅用于VB.Net问题,对不起.

This forum is usually intended for VB.Net questions only, sorry.

对于VB6问题,您可能需要尝试使用此论坛.>>

You may want to try this forum instead for VB6 questions.>>

http://www.programmersheaven.com/mb/VBasic/Board.aspx


这篇关于如何从VB6的文件中播放不同格式的音频\视频流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆