[FFmpeg-user] How can FFmpeg truncate "00" Binary Codes in a MP4 video file?

PureOcean pureocean1 at gmail.com
Tue Jul 12 19:19:58 EEST 2016


Hello FFmpeg Devs, Experts and Users,

Firstly, I'm sorry my bad English.

I want to fix a MP4 file without re-encoding.

You know, Some Stream applications stores on disk full-size of the video 
files when non-start playback. It contains many "00" binary code. 
Overwrites "00" codes that downloading video and audio data all the more.

I have a MP4 file that jumped to random scenes when the video playing by 
a Torrent Stream application. I want to remove blank/gap from video 
which it have many "00" hex codes. So, the video-size will be reduced as 
downloading data.

Actually, I can do this MKV files from streamed. Need three stages. (I'm 
sure, it's "do something the hard way"!).

Stage One:
FFmpeg.exe" -i "streamed.mkv" -c copy OnlyDowloaded.mkv
Result: FFmpeg removes "00" blanks but it's same timestamp of the stream 
video.

Stage Two:
Run (OnlyDowloaded.mkv drag-and-drop) to Meteroite which it's MKV Repair 
software, http://www.mkvrepair.com. Meteorite corrects timestamp and 
save as "Metorite.OnlyDowloaded.mkv" filename.

Stage Three:
Remux "Metorite.OnlyDowloaded.mkv" with MKVToolnix.
Result: So, the remuxed video contains only that downloaded data (video 
& audio) with properly timestamp.

But, this stages can't work in MP4 stream files. I tried many 
command-switches with FFmpeg in MP4 files for fixing. FFmpeg always 
saved full-size of MP4 video. Output file formnat doesn't matter, it's 
can be a MKV (but without re-encoding). But result all same.

How can remove gaps ("00" hex codes) in MP4 stream video files with FFmpeg?

P.S.: FFmpeg's report: http://pastebin.com/Pmem1HzJ
(ffmpeg.exe -i TorrentStreamFile.mp4 -loglevel verbose -c copy Output.mp4)

Best regards...


More information about the ffmpeg-user mailing list