Note that there are some explanatory texts on larger screens.

plurals
  1. POFiles created with a direct stream copy using FFmpeg's libavformat API play back too fast at 3600 fps
    text
    copied!<p>I am working on a libavformat API wrapper that converts MP4 files with H.264 and AAC to MPEG-TS segments suitable for streaming. I am just doing a simple stream copy without re-encoding, but the files I produce play the video back at <strong>3600 fps</strong> instead of 24 fps.</p> <p>Here are some outputs from ffprobe <a href="https://gist.github.com/chrisballinger/6733678" rel="nofollow noreferrer">https://gist.github.com/chrisballinger/6733678</a>, the broken file is below:</p> <pre><code>r_frame_rate=1/1 avg_frame_rate=0/0 time_base=1/90000 start_pts=0 start_time=0.000000 duration_ts=2999 duration=0.033322 </code></pre> <p>The same input file manually sent through ffmpeg has proper timestamp information:</p> <pre><code>r_frame_rate=24/1 avg_frame_rate=0/0 time_base=1/90000 start_pts=126000 start_time=1.400000 duration_ts=449850 duration=4.998333 </code></pre> <p>I believe the problem lies somewhere in my setup of libavformat here: <a href="https://github.com/OpenWatch/FFmpegWrapper/blob/master/FFmpegWrapper/FFmpegWrapper.m#L349" rel="nofollow noreferrer">https://github.com/OpenWatch/FFmpegWrapper/blob/master/FFmpegWrapper/FFmpegWrapper.m#L349</a> where I repurposed a bunch of code from ffmpeg.c that was required for the direct stream copy.</p> <p>Since 3600 seems like a "magic number" (60*60), it could be as simple as me not setting the time scale properly, but I can't figure out where my code diverges from ffmpeg/avconv itself.</p> <p>Similar question here, but I don't think they got as far as I did: <a href="https://stackoverflow.com/questions/15239124/muxing-a-h-264-annex-b-aac-stream-using-libavformat-with-vcopy-acopy">Muxing a H.264 Annex B &amp; AAC stream using libavformat with vcopy/acopy</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload