{"action":"created","issue":{"url":"https://api.github.com/repos/PHP-FFMpeg/PHP-FFMpeg/issues/369","repository_url":"https://api.github.com/repos/PHP-FFMpeg/PHP-FFMpeg","labels_url":"https://api.github.com/repos/PHP-FFMpeg/PHP-FFMpeg/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/PHP-FFMpeg/PHP-FFMpeg/issues/369/comments","events_url":"https://api.github.com/repos/PHP-FFMpeg/PHP-FFMpeg/issues/369/events","html_url":"https://github.com/PHP-FFMpeg/PHP-FFMpeg/issues/369","id":236741236,"number":369,"title":"Unable to edit MP4, and re-save as MP4?","user":{"login":"user851416","id":29523938,"avatar_url":"https://avatars0.githubusercontent.com/u/29523938?v=3","gravatar_id":"","url":"https://api.github.com/users/user851416","html_url":"https://github.com/user851416","followers_url":"https://api.github.com/users/user851416/followers","following_url":"https://api.github.com/users/user851416/following{/other_user}","gists_url":"https://api.github.com/users/user851416/gists{/gist_id}","starred_url":"https://api.github.com/users/user851416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/user851416/subscriptions","organizations_url":"https://api.github.com/users/user851416/orgs","repos_url":"https://api.github.com/users/user851416/repos","events_url":"https://api.github.com/users/user851416/events{/privacy}","received_events_url":"https://api.github.com/users/user851416/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-06-18T19:45:01Z","updated_at":"2017-06-23T06:28:21Z","closed_at":null,"body":"| Q              | A\r\n| -------------- | ---\r\n| Bug?           | Possibly?\r\n| New Feature?   | no\r\n| Version Used   | 0.9.3\r\n| FFmpeg Version | FFmpeg 3.2.2\r\n| OS             | ubuntu\r\n\r\nI'm trying to edit an MP4 file that I have saved on my server, remove its audio, and then re-save it again as an MP4.\r\n\r\nHere's my code:\r\n\r\n```\r\n$ffmpeg = FFMpeg::create();\r\n\r\n$video = $ffmpeg->open($pathToMP4)\r\n    ->addFilter(new SimpleFilter(array('-an')));\r\n\r\n$streams = $video->getFFProbe()->streams($pathToMP4);\r\n\r\n$format = new X264();\r\n$video->save($format, $pathToMP4);\r\n\r\n// Used later in the code, irrelevant\r\n$dimensions = $streams->videos()\r\n    ->first()\r\n    ->getDimensions();\r\n```\r\n\r\nHowever, when the new file is saved, it only saves like < 1 second, even though the video is well over 5 seconds long.\r\n\r\nWhat am I doing wrong?"},"comment":{"url":"https://api.github.com/repos/PHP-FFMpeg/PHP-FFMpeg/issues/comments/310583391","html_url":"https://github.com/PHP-FFMpeg/PHP-FFMpeg/issues/369#issuecomment-310583391","issue_url":"https://api.github.com/repos/PHP-FFMpeg/PHP-FFMpeg/issues/369","id":310583391,"user":{"login":"user851416","id":29523938,"avatar_url":"https://avatars0.githubusercontent.com/u/29523938?v=3","gravatar_id":"","url":"https://api.github.com/users/user851416","html_url":"https://github.com/user851416","followers_url":"https://api.github.com/users/user851416/followers","following_url":"https://api.github.com/users/user851416/following{/other_user}","gists_url":"https://api.github.com/users/user851416/gists{/gist_id}","starred_url":"https://api.github.com/users/user851416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/user851416/subscriptions","organizations_url":"https://api.github.com/users/user851416/orgs","repos_url":"https://api.github.com/users/user851416/repos","events_url":"https://api.github.com/users/user851416/events{/privacy}","received_events_url":"https://api.github.com/users/user851416/received_events","type":"User","site_admin":false},"created_at":"2017-06-23T06:28:21Z","updated_at":"2017-06-23T06:28:21Z","body":"@jens1o \r\n\r\nAs a related question, how can I open an MP4, remove its audio, and re-save it as an MP4, without assigning it a new format.\r\n\r\nCurrently, what I do is this:\r\n\r\n```\r\n$ffmpeg = FFMpeg::create();\r\n\r\n$video = $ffmpeg->open($path . '/file.mp4)\r\n    ->addFilter(new SimpleFilter(array('-an'))); // Remove the audio\r\n\r\n$format = new X264();\r\n$video->save($format, $path . '/new.mp4');\r\n```\r\n\r\nBut this takes over 30 seconds to finish.\r\n\r\nHowever, if I simply run this command:\r\n\r\n```\r\nffmpeg -i file.mp4 -c copy -an new.mp4\r\n```\r\n\r\nIt finishes in under 1 second.\r\n\r\nHow can I replicate this command in PHP-FFMpeg? It looks like the problem in my code is most likely assigning a format (`new X264()`). "}}
{"actor":{"display_login":"user851416"}}