请选择 进入手机版 | 继续访问电脑版

北南南北论坛

 找回密码
 立即注册
查看: 56|回复: 0

转换TS文件到MP4

[复制链接]

448

主题

760

帖子

2163

积分

金牌会员

Rank: 6Rank: 6

积分
2163
发表于 2017-11-12 18:55:00 | 显示全部楼层 |阅读模式
I think there are two issues here, and also the input looks truncated or damaged, so results may var

1. avconv is buggy (as usual)

It shows the input audio stream having 0 channels which is wrong.

Get a recent build of ffmpeg. I don't know what Ubuntu version you're using, so the easiest method is to use a recent static build. Just download, extract, and run. Also, you tagged your question with ffmpeg, so I assume you would be willing to use it instead (avconv != ffmpeg). It should show the proper number of audio channels.

2. Use a compatible output container format

Matroska

This will stream copy (re-mux) the video and re-encode the audio:

  1. ffmpeg -i input -c:v copy -c:a aac output.mkv
复制代码

Re-encoding the audio is probably required in this case because the Matroska muxer will refuse to mux an audio stream with invalid extradata.
Older ffmpeg builds will require -strict experimental for the AAC encoder.
MP4

This will re-encode the video and stream copy the audio:

ffmpeg -i input -c:v libx264 -c:a copy -bsf:a aac_adtstoasc output.mp4

In this case the aac_adtstoasc bitstream filter is required. Newer ffmpeg builds may add this automatically.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


手机版|北南南北论坛  

GMT+8, 2017-12-18 09:23 , Processed in 0.083778 second(s), 31 queries .

© 2001-2016 VxWorks6 Inc.

快速回复 返回顶部 返回列表