{"action":"created","issue":{"url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/502","labels_url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/502/labels{/name}","comments_url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/502/comments","events_url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/502/events","html_url":"https://github.com/simple-rtmp-server/srs/issues/502","id":111721807,"number":502,"title":"Support ffmpeg png output as stream for thumbnail creation?","user":{"login":"tmacneil","id":12697674,"avatar_url":"https://avatars.githubusercontent.com/u/12697674?v=3","gravatar_id":"","url":"https://api.github.com/users/tmacneil","html_url":"https://github.com/tmacneil","followers_url":"https://api.github.com/users/tmacneil/followers","following_url":"https://api.github.com/users/tmacneil/following{/other_user}","gists_url":"https://api.github.com/users/tmacneil/gists{/gist_id}","starred_url":"https://api.github.com/users/tmacneil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmacneil/subscriptions","organizations_url":"https://api.github.com/users/tmacneil/orgs","repos_url":"https://api.github.com/users/tmacneil/repos","events_url":"https://api.github.com/users/tmacneil/events{/privacy}","received_events_url":"https://api.github.com/users/tmacneil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/simple-rtmp-server/srs/labels/feature","name":"feature","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/simple-rtmp-server/srs/milestones/3","html_url":"https://github.com/simple-rtmp-server/srs/milestones/srs%203.0%20release","labels_url":"https://api.github.com/repos/simple-rtmp-server/srs/milestones/3/labels","id":1089159,"number":3,"title":"srs 3.0 release","description":"造就绝对优势，265直播，MPEG-DASH，HLS集群，音频合并，RTMP源站集群，Kafka对接，RAW API。","creator":{"login":"winlinvip","id":2777660,"avatar_url":"https://avatars.githubusercontent.com/u/2777660?v=3","gravatar_id":"","url":"https://api.github.com/users/winlinvip","html_url":"https://github.com/winlinvip","followers_url":"https://api.github.com/users/winlinvip/followers","following_url":"https://api.github.com/users/winlinvip/following{/other_user}","gists_url":"https://api.github.com/users/winlinvip/gists{/gist_id}","starred_url":"https://api.github.com/users/winlinvip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winlinvip/subscriptions","organizations_url":"https://api.github.com/users/winlinvip/orgs","repos_url":"https://api.github.com/users/winlinvip/repos","events_url":"https://api.github.com/users/winlinvip/events{/privacy}","received_events_url":"https://api.github.com/users/winlinvip/received_events","type":"User","site_admin":false},"open_issues":70,"closed_issues":15,"state":"open","created_at":"2015-04-29T12:33:04Z","updated_at":"2015-10-16T05:29:44Z","due_on":"2016-12-30T16:00:00Z","closed_at":null},"comments":3,"created_at":"2015-10-15T22:35:28Z","updated_at":"2015-10-19T01:26:57Z","closed_at":null,"body":"I was experimenting with the ffmpeg transcode engine in srs and noticed that only the libx264 vcodec was supported for output.  I was trying to setup a transcode configuration to create a thumbnail every 60 seconds but the only file output I could create was flv.  Do you have any plans to allow PNG output as well so that web browser compatible images could be created during the stream?"},"comment":{"url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/comments/149073321","html_url":"https://github.com/simple-rtmp-server/srs/issues/502#issuecomment-149073321","issue_url":"https://api.github.com/repos/simple-rtmp-server/srs/issues/502","id":149073321,"user":{"login":"winlinvip","id":2777660,"avatar_url":"https://avatars.githubusercontent.com/u/2777660?v=3","gravatar_id":"","url":"https://api.github.com/users/winlinvip","html_url":"https://github.com/winlinvip","followers_url":"https://api.github.com/users/winlinvip/followers","following_url":"https://api.github.com/users/winlinvip/following{/other_user}","gists_url":"https://api.github.com/users/winlinvip/gists{/gist_id}","starred_url":"https://api.github.com/users/winlinvip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winlinvip/subscriptions","organizations_url":"https://api.github.com/users/winlinvip/orgs","repos_url":"https://api.github.com/users/winlinvip/repos","events_url":"https://api.github.com/users/winlinvip/events{/privacy}","received_events_url":"https://api.github.com/users/winlinvip/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T01:26:57Z","updated_at":"2015-10-19T01:26:57Z","body":"I see, what about the following workflow for snapshot?\r\n\r\n1. Encoder, for instance, FMLE or FFMPEG start to publish RTMP stream to SRS.\r\n1. SRS start a transcoder specified by `transcode` of config, where the transcoder can be a `bash script`.\r\n1. The `bash script` exec the `ffmpeg` to snapshot, which is the command of your single frame snapshot `/usr/bin/ffmpeg -i rtmp://127.0.0.1:1935/live?vhost=dev/stream -vf fps=1/6\r\n-vcodec png -f image2 -an -y -vframes 1\r\n/tmp/thumb/live/single_frame.png`\r\n1. The `bash script` sleep a while, for instance, 10s when `ffmpeg` process gracefully exit.\r\n1. The `bash script` wakeup and snapshot again.\r\n\r\nThe `bash script` can also exec ffmpeg by your multiple frame commad `/usr/bin/ffmpeg -i rtmp://127.0.0.1:1935/live?vhost=dev/stream -vf fps=1/6\r\n-vcodec png -an -f image2 -y /tmp/thumb/live/stream_%06d.png`.\r\n\r\nIs this ok for you?"}}