PCM格式的视频文件怎么播放,或者转换格式 10
6个回答
展开全部
首先用你的app把视频文件下下来,然后在你的手机上找到那个app的文件夹,把你下载的pcm格式导出到电脑上,然后在电脑上下一个pcm格式批量提取器,就可以实现把网校的课程下载到电脑上用常用的视频格式给打开了,pcm格式相当于手机上的网校给他们的视频加密了,用pcm提取器就可以实现破解在电脑上观看并保存。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2017-06-07
展开全部
PCM是Pulse Code Modulation的缩写,意思是脉码调制录音,也被称为 脉码编码调制。其实就是wav格式的一种.wav在有的音频软件保存项中可以比较明显的选择几种格式.
PCM就是将声音等模拟信号变成符号化的脉冲列,再予以记录。PCM信号是由[1]、[0]等符号构成的数字信号。与模拟信号比,它不易受传送系统的杂波及失真的影响。动态范围宽,可得到音质相当好的影响效果。
我一般转换用“格式工厂” 你搜搜。还是很好用的。转视频转音频我都经常用。
PCM就是将声音等模拟信号变成符号化的脉冲列,再予以记录。PCM信号是由[1]、[0]等符号构成的数字信号。与模拟信号比,它不易受传送系统的杂波及失真的影响。动态范围宽,可得到音质相当好的影响效果。
我一般转换用“格式工厂” 你搜搜。还是很好用的。转视频转音频我都经常用。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
PCM格式是一种音频格式,不是视频格式,你要转换成mp3吗?音频不带有视频,不能转换成其它视频格式的。如果你想转换成mp3,软件很多,比如:格式工厂等。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
安装ffmpeg
ffmpeg -y -ac 1 -ar 16000 -f s16le -i input.pcm -c:a libmp3lame -q:a 2 output.mp3
不安装ffmpeg,直接写C++代码:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
// PCM WAV Format (44 bytes)
typedef struct WavHeader {
uint32_t chunk_id; // "RIFF"
uint32_t chunk_size; // (44-8) + pcm_data_len
uint32_t format; // "WAVE"
uint32_t sub_chunk_1_id; // "fmt "
uint32_t sub_chunk_1_size; // 16 (PCM)
uint16_t audio_format; // 1 - PCM
uint16_t num_channels; // 1-mono, 2-stero
uint32_t sample_rate;
uint32_t byte_rate; // sample_rate * block_align
uint16_t block_align; // num_channels * bit_per_sample
uint16_t bit_per_sample;
uint32_t sub_chunk_2_id; // "data"
uint32_t sub_chunk_2_size; // pcm_data_len
uint8_t data[0]; // data pointer (不占内存)
}WavHeader;
int main()
{
// pcm 数据
const char *pcm_file_name = "./resource/input.pcm";
FILE *pcm_file = fopen(pcm_file_name,"rb");
if(!pcm_file) {
printf("can not read pcm file %s\n", pcm_file_name);
return 0;
}
int32_t pos_s = ftell(pcm_file);
fseek(pcm_file, 0, SEEK_END);
int32_t pos_e = ftell(pcm_file);
int32_t pcm_data_len = pos_e - pos_s;
rewind(pcm_file);
// wav 数据
const char *wav_file_name = "output.wav";
FILE *wav_file = fopen(wav_file_name, "wb");
if(!wav_file) {
printf("can not read pcm file %s\n", wav_file_name);
return 0;
}
void *wav_buff = malloc(sizeof(WavHeader) + pcm_data_len);
WavHeader *wavHeader = (WavHeader*)wav_buff;
memcpy(&wavHeader->chunk_id,"RIFF",4);
wavHeader->chunk_size = 36 + pcm_data_len;
memcpy(&wavHeader->format, "WAVE", 4);
memcpy(&wavHeader->sub_chunk_1_id, "fmt ", 4);
wavHeader->sub_chunk_1_size = 16;
wavHeader->audio_format = 1;
wavHeader->num_channels = 2;
wavHeader->sample_rate = 8000;
wavHeader->bit_per_sample = 16;
wavHeader->block_align = wavHeader->num_channels * wavHeader->bit_per_sample / 8;
wavHeader->byte_rate = wavHeader->sample_rate * wavHeader->block_align;
memcpy(&wavHeader->sub_chunk_2_id, "data", 4);
wavHeader->sub_chunk_2_size = pcm_data_len;
// read pcm data
fread(wavHeader->data, 1, pcm_data_len, pcm_file);
// 写wav头、PCM数据
fwrite(wavHeader, 1, sizeof(WavHeader) + pcm_data_len, wav_file);
// 关闭文件
fclose(pcm_file);
fclose(wav_file);
free(wav_buff);
return 0;
}
ffmpeg -y -ac 1 -ar 16000 -f s16le -i input.pcm -c:a libmp3lame -q:a 2 output.mp3
不安装ffmpeg,直接写C++代码:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
// PCM WAV Format (44 bytes)
typedef struct WavHeader {
uint32_t chunk_id; // "RIFF"
uint32_t chunk_size; // (44-8) + pcm_data_len
uint32_t format; // "WAVE"
uint32_t sub_chunk_1_id; // "fmt "
uint32_t sub_chunk_1_size; // 16 (PCM)
uint16_t audio_format; // 1 - PCM
uint16_t num_channels; // 1-mono, 2-stero
uint32_t sample_rate;
uint32_t byte_rate; // sample_rate * block_align
uint16_t block_align; // num_channels * bit_per_sample
uint16_t bit_per_sample;
uint32_t sub_chunk_2_id; // "data"
uint32_t sub_chunk_2_size; // pcm_data_len
uint8_t data[0]; // data pointer (不占内存)
}WavHeader;
int main()
{
// pcm 数据
const char *pcm_file_name = "./resource/input.pcm";
FILE *pcm_file = fopen(pcm_file_name,"rb");
if(!pcm_file) {
printf("can not read pcm file %s\n", pcm_file_name);
return 0;
}
int32_t pos_s = ftell(pcm_file);
fseek(pcm_file, 0, SEEK_END);
int32_t pos_e = ftell(pcm_file);
int32_t pcm_data_len = pos_e - pos_s;
rewind(pcm_file);
// wav 数据
const char *wav_file_name = "output.wav";
FILE *wav_file = fopen(wav_file_name, "wb");
if(!wav_file) {
printf("can not read pcm file %s\n", wav_file_name);
return 0;
}
void *wav_buff = malloc(sizeof(WavHeader) + pcm_data_len);
WavHeader *wavHeader = (WavHeader*)wav_buff;
memcpy(&wavHeader->chunk_id,"RIFF",4);
wavHeader->chunk_size = 36 + pcm_data_len;
memcpy(&wavHeader->format, "WAVE", 4);
memcpy(&wavHeader->sub_chunk_1_id, "fmt ", 4);
wavHeader->sub_chunk_1_size = 16;
wavHeader->audio_format = 1;
wavHeader->num_channels = 2;
wavHeader->sample_rate = 8000;
wavHeader->bit_per_sample = 16;
wavHeader->block_align = wavHeader->num_channels * wavHeader->bit_per_sample / 8;
wavHeader->byte_rate = wavHeader->sample_rate * wavHeader->block_align;
memcpy(&wavHeader->sub_chunk_2_id, "data", 4);
wavHeader->sub_chunk_2_size = pcm_data_len;
// read pcm data
fread(wavHeader->data, 1, pcm_data_len, pcm_file);
// 写wav头、PCM数据
fwrite(wavHeader, 1, sizeof(WavHeader) + pcm_data_len, wav_file);
// 关闭文件
fclose(pcm_file);
fclose(wav_file);
free(wav_buff);
return 0;
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |