{"action":"closed","issue":{"url":"https://api.github.com/repos/acowley/ffmpeg-light/issues/18","labels_url":"https://api.github.com/repos/acowley/ffmpeg-light/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/acowley/ffmpeg-light/issues/18/comments","events_url":"https://api.github.com/repos/acowley/ffmpeg-light/issues/18/events","html_url":"https://github.com/acowley/ffmpeg-light/issues/18","id":124013114,"number":18,"title":"First frame of video is not at time zero, resulting in initial \"black frame\"","user":{"login":"jtdaugherty","id":427221,"avatar_url":"https://avatars.githubusercontent.com/u/427221?v=3","gravatar_id":"","url":"https://api.github.com/users/jtdaugherty","html_url":"https://github.com/jtdaugherty","followers_url":"https://api.github.com/users/jtdaugherty/followers","following_url":"https://api.github.com/users/jtdaugherty/following{/other_user}","gists_url":"https://api.github.com/users/jtdaugherty/gists{/gist_id}","starred_url":"https://api.github.com/users/jtdaugherty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtdaugherty/subscriptions","organizations_url":"https://api.github.com/users/jtdaugherty/orgs","repos_url":"https://api.github.com/users/jtdaugherty/repos","events_url":"https://api.github.com/users/jtdaugherty/events{/privacy}","received_events_url":"https://api.github.com/users/jtdaugherty/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-28T03:44:18Z","updated_at":"2015-12-28T18:38:21Z","closed_at":"2015-12-28T18:38:21Z","body":"I'm creating movie files by emitting frames using `imageWriter` in `ffmpeg-light`version `0.9`, `ffmpeg` version `2.8.1_1` installed via Homebrew, and GHC `7.10.2`.  When I play movies generated this way, the first frame appears to be black.  Digging in a bit more using the approach suggested at http://superuser.com/a/559205, I ran `ffprobe -show_frames` on the video and I see this for the first frame:\r\n```\r\n[FRAME]\r\nmedia_type=video\r\nstream_index=0\r\nkey_frame=1\r\npkt_pts=507\r\npkt_pts_time=0.033008\r\npkt_dts=507\r\npkt_dts_time=0.033008\r\nbest_effort_timestamp=507\r\nbest_effort_timestamp_time=0.033008\r\n...\r\n```\r\nThis seems to suggest the reason for the apparent \"black frame\" is because the first frame I output gets put at time `0.033008` rather than `0.0` (which is what I see when I inspect a few videos I have from other sources that don't suffer from this problem).\r\n\r\nI'm using `defaultParams` to set up `imageWriter`.  Here's some info on my installation:\r\n```\r\n$ ffmpeg\r\nffmpeg version 2.8.1 Copyright (c) 2000-2015 the FFmpeg developers\r\n  built with Apple LLVM version 7.0.0 (clang-700.0.72)\r\n  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.1_1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda\r\n  libavutil      54. 31.100 / 54. 31.100\r\n  libavcodec     56. 60.100 / 56. 60.100\r\n  libavformat    56. 40.101 / 56. 40.101\r\n  libavdevice    56.  4.100 / 56.  4.100\r\n  libavfilter     5. 40.101 /  5. 40.101\r\n  libavresample   2.  1.  0 /  2.  1.  0\r\n  libswscale      3.  1.101 /  3.  1.101\r\n  libswresample   1.  2.101 /  1.  2.101\r\n  libpostproc    53.  3.100 / 53.  3.100\r\n```"}}