复制视频的格式转换为另
比方说,我有:复制视频的格式转换为另
video1.avi
这是完全播放(声音和图像)在我的电视的USB媒体输入video2.avi
这是不认可由电视剧:“IMPOSIBLE读取这种格式”
我已经试过很多的解决方案,如:
ffmpeg -i video2.avi -codec:a libmp3lame -q:a 0 -ac 2 -ar 48000 -joint_stereo 0^
-codec:v libxvid -q:v 25 video2_reencoded.avi
,当我比较video1.avi
与video2_reencoded.avi
与MediaInfo,他们看起来在许多方面相似,但最后的电视不能播放video2_reencoded.avi
。
是否与ffmpeg
的方式,来复制对video2.avi
的video1.avi
(声音编码属性,视频编码属性,图像尺寸,容器类型等)的所有规格?
附录:的MediaInfo的输出为三个视频。在这个特定的例子中,video2.avi
和video2_reencoded.avi
是半工作的:图像好,但没有声音。在我试过的其他视频例子中,video2.avi
和video2_reencoded.avi
将完全是“不可读”。
video1.avi
(即工作)
Format : AVI
Format/Info : Audio Video Interleave
File size : 352 MiB
Duration : 51 min 22 s
Overall bit rate : 959 kb/s
Writing application : VirtualDubMod 1.5.10.3 | ... || (build 2550/release)
Writing library : VirtualDubMod build 2550/release
Video
ID : 0
Format : MPEG-4 Visual
Format profile : Advanced [email protected]
Format settings : BVOP1
Format settings, BVOP : 1
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (MPEG)
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 51 min 22 s
Bit rate : 821 kb/s
Width : 720 pixels
Height : 400 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.114
Stream size : 302 MiB (86%)
Writing library : XviD 1.2.1 (UTC 2008-12-04)
Audio
ID : 1
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Codec ID : 55
Codec ID/Hint : MP3
Duration : 51 min 22 s
Bit rate mode : Constant
Bit rate : 128 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Compression mode : Lossy
Stream size : 47.0 MiB (13%)
Alignment : Aligned on interleaves
Interleave, duration : 40 ms (1.00 video frame)
Interleave, preload duration : 504 ms
Writing library : LAME3.99r
Encoding settings : -m s -V 4 -q 2 -lowpass 17 -b 128
video2.avi
(即非工作)
Format : AVI
Format/Info : Audio Video Interleave
File size : 1.37 GiB
Duration : 2 h 12 min
Overall bit rate : 1 478 kb/s
Writing application : VirtualDubMod 1.5.10.2 Fr | ... || (build 2540/release)
Writing library : VirtualDubMod build 2540/release
Video
ID : 0
Format : MPEG-4 Visual
Format profile : Advanced [email protected]
Format settings : BVOP1
Format settings, BVOP : 1
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Muxing mode : Packed bitstream
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 2 h 12 min
Bit rate : 1 084 kb/s
Width : 624 pixels
Height : 368 pixels
Display aspect ratio : 5:3
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.189
Stream size : 1.00 GiB (73%)
Writing library : XviD 1.2.1 (UTC 2008-12-04)
Audio
ID : 1
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : 2000
Duration : 2 h 12 min
Bit rate mode : Constant
Bit rate : 384 kb/s
Channel(s) : 6 channels
Sampling rate : 48.0 kHz
Compression mode : Lossy
Stream size : 364 MiB (26%)
Alignment : Split accross interleaves
Interleave, duration : 40 ms (1.00 video frame)
Interleave, preload duration : 512 ms
video2_reencoded.avi
(即非工作,重新编码,但仍非工作)
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
File size : 1.13 GiB
Duration : 2 h 12 min
Overall bit rate : 1 227 kb/s
Writing application : Lavf57.26.100
Video
ID : 0
Format : MPEG-4 Visual
Format profile : Advanced [email protected]
Format settings : BVOP1
Format settings, BVOP : 1
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Muxing mode : Packed bitstream
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 2 h 12 min
Bit rate : 1 084 kb/s
Width : 624 pixels
Height : 368 pixels
Display aspect ratio : 5:3
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.189
Stream size : 1.00 GiB (88%)
Writing library : XviD 1.2.1 (UTC 2008-12-04)
Audio
ID : 1
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Codec ID : 55
Codec ID/Hint : MP3
Duration : 2 h 12 min
Bit rate mode : Constant
Bit rate : 128 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Compression mode : Lossy
Stream size : 120 MiB (10%)
Alignment : Aligned on interleaves
Interleave, duration : 24 ms (0.60 video frame)
对不起,但不幸的是,没有这样的工具可用。目前最好的方向是复制h264编码参数。
我知道的方式是读取mediainfo的高级输出,并将它们复制到手动创建的预设中,如此处所述[link](https://video.stackexchange.com/questions/19571/openload-cc-how-can- i-extract-encoding-settings-of-videos/19577) – Harry
看来我的视频不是h264,对吧@哈利? – Basj
在您的mediainfos中,我看到“格式设置,矩阵”是1和3之间唯一明显的区别。您是否尝试设置-mpeg_quant 1以强制MPEG而不是h263量化?另外我看到你的测试输出是1GB,你知道你可以通过CTRL + C停止ffmpeg编码,你仍然得到一个正确的文件,但只是更短? ;-) – Harry
@LordNeckbeard MediaInfo GUI的截图或其他方式? – Basj
@LordNeckbeard:我复制/粘贴video1.avi,video2.avi和video2_reencoded.avi。 – Basj