duhastmich
V2EX  ›  问与答

mp4 文件中间多了一个字节为什么就不能播了?

  •  
  •   duhastmich · May 25, 2013 · 3484 views
    This topic created in 4767 days ago, the information mentioned may be changed or developed.
    4 replies    1970-01-01 08:00:00 +08:00
    ziseyinzi
        1
    ziseyinzi  
       May 25, 2013
    你用记事本打开了?windows记事本好像会自动加文件头
    duhastmich
        2
    duhastmich  
    OP
       May 25, 2013
    @ziseyinzi 下载文件的时候wget -c 追加到一个同名文件了,文件太大不想重来,于是重新下载了开头一点,想把2个文件拼接起来,用head 和tail 蛮有意思的

    head -c50312 video.mp4 > output
    tail -c+50313 video-head.mp4 >> output

    第一次用了2个50312, 多了一个字节,就播不了
    duhastmich
        3
    duhastmich  
    OP
       May 25, 2013
    文件名颠倒了。。 上面一个是后来下载的,下面一个是损坏的
    kinreven
        4
    kinreven  
       May 25, 2013
    如果完全不能播放,说明你已经损坏了MP4的头结构(moov atom).
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3199 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 67ms · UTC 03:43 · PVG 11:43 · LAX 20:43 · JFK 23:43
    ♥ Do have faith in what you're doing.