title: FFMPEG conversion from .H264 to MP4 playing too fast
body: <p>I accidentally deleted a video file but managed to save it with a recovery tool. The video was however corrupted, but I managed to repair that and now have a .h264 file.</p>
  
  <p>The file plays ok in the VLC player. There are a few glitches but on the whole its 98% perfect. However I now need to convert that into a more useable format (mp4 say).</p>
  
  <p>Ive downloaded the FFMPEG tool and have managed to pretty easily copy into mp4 with the following command line instruction:</p>
  
  <pre><code>ffmpeg -i repairedVid.h264 -c copy repairedVid.mp4
  </code></pre>
  
  <p>The problem is that the video is playing much too fast. I've done some research tried some tweaks that seem to have worked for other people (like forcing frame rate and changing the -vsync):</p>
  
  <pre><code>ffmpeg -i repairedVid.h264 -c copy repairedVid.mp4 -vsync 2 -r 23.976
  </code></pre>
  
  <p>Ive also tried the crude approach of slowing the video down like this, but this was more of a long shot and I don't think is the right way to go about it</p>
  
  <pre><code>ffmpeg -i repairedVid.mp4 -filter:v "setpts=1.5*PTS" repairedVid.mp4
  </code></pre>
  
  <p>This is the output when the video copies to MP4. Looks like it might have a clue to the problem (the video should be much longer than 4:40 minutes):</p>
  
  <p>frame=13459 fps=1118 q=-1.0 size= 4102773kB time=00:04:40.65 bitrate=119756.4kbiframe=13459 fps=1117 q=-1.0 Lsize= 4102928kB time=00:04:40.65 bitrate=119761.0kbits/s speed=23.3x<br>
  video:4102773kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.003784%</p>
  
  <p>I'm totally new to FFMPEG and not having much luck. Any advice would be great. </p>
  
  <p>Thanks in advance</p>