[FFmpeg-user] Raw files differs

m.kamalasubha m.kamalasubha m.kamalasubha at gmail.com
Sun Sep 17 14:11:36 EEST 2017

Hello guys,
  I converted a video file from MP4 format to TS format using the following
ffmpeg command.
   * ffmpeg -i <input.mp4> -c copy -bsf h264_mp4toannexb <output.ts>*
    => simply copies the A/V data from .mp4 to .ts

  I used the below command to fetch raw video data  for first 30 seconds
from both input.mp4 and output.ts
   * ffmpeg -ss 00:00:00 -i <input.mp4> -t 00:00:30 -vcodec rawvideo
-pix_fmt rgb24 -f rawvideo -an <mp4_video_rawfile>*

*    ffmpeg -ss 00:00:00 -i <output.ts> -t 00:00:30 -vcodec rawvideo
-pix_fmt rgb24 -f rawvideo -an <ts_video_rawfile>*

  I expect the raw video data to be same between both <input.mp4> and
<output.ts> since <output.ts> is generated using simple stream copy from
<input.mp4>. But I find that *<mp4_video_rawfile> and <ts_video_rawfile>
differs* (though both file size being same) and that first few frames were
found missing in <ts_video_rawfile> when compared with <mp4_video_rawfile>.

Can you please explain why raw files differs?

More information about the ffmpeg-user mailing list