{"action":"closed","issue":{"url":"https://api.github.com/repos/flyser/html5video/issues/1","labels_url":"https://api.github.com/repos/flyser/html5video/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/flyser/html5video/issues/1/comments","events_url":"https://api.github.com/repos/flyser/html5video/issues/1/events","html_url":"https://github.com/flyser/html5video/issues/1","id":104918584,"number":1,"title":"[[: not found Errors","user":{"login":"c3x","id":8462728,"avatar_url":"https://avatars.githubusercontent.com/u/8462728?v=3","gravatar_id":"","url":"https://api.github.com/users/c3x","html_url":"https://github.com/c3x","followers_url":"https://api.github.com/users/c3x/followers","following_url":"https://api.github.com/users/c3x/following{/other_user}","gists_url":"https://api.github.com/users/c3x/gists{/gist_id}","starred_url":"https://api.github.com/users/c3x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c3x/subscriptions","organizations_url":"https://api.github.com/users/c3x/orgs","repos_url":"https://api.github.com/users/c3x/repos","events_url":"https://api.github.com/users/c3x/events{/privacy}","received_events_url":"https://api.github.com/users/c3x/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-04T15:57:03Z","updated_at":"2015-10-13T07:49:38Z","closed_at":"2015-10-13T07:49:38Z","body":"Hello!\r\nNice script and that, I'm looking for since a long time.\r\n\r\nI try to use it, but I get errors, when I try to run this script.\r\n\r\nroot@dedi-fr-41137:# ./html5video.sh m287554.mp4\r\n./html5video.sh: 5: ./html5video.sh: [[: not found\r\n./html5video.sh: 11: ./html5video.sh: [[: not found\r\n./html5video.sh: 16: ./html5video.sh: [[: not found\r\nffmpeg version N-74791-g95010d4 Copyright (c) 2000-2015 the FFmpeg developers\r\n  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)\r\n  configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree\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  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\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from 'm287554.mp4':\r\n  Metadata:\r\n    major_brand     : mp42\r\n    minor_version   : 0\r\n    compatible_brands: mp42mp41\r\n    creation_time   : 2015-09-04 15:20:24\r\n  Duration: 00:00:24.06, start: 0.000000, bitrate: 10321 kb/s\r\n    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 10011 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)\r\n    Metadata:\r\n      creation_time   : 2015-09-04 15:20:24\r\n      handler_name    : Alias Data Handler\r\n      encoder         : AVC Coding\r\n    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)\r\n    Metadata:\r\n      creation_time   : 2015-09-04 15:20:24\r\n      handler_name    : Alias Data Handler\r\nOutput #0, image2, to 'poster-T9rWzxP3W.png':\r\n  Metadata:\r\n    major_brand     : mp42\r\n    minor_version   : 0\r\n    compatible_brands: mp42mp41\r\n    encoder         : Lavf56.40.101\r\n    Stream #0:0(eng): Video: png, rgb24, 1280x720, q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)\r\n    Metadata:\r\n      creation_time   : 2015-09-04 15:20:24\r\n      handler_name    : Alias Data Handler\r\n      encoder         : Lavc56.60.100 png\r\nStream mapping:\r\n  Stream #0:0 -> #0:0 (h264 (native) -> png (native))\r\nPress [q] to stop, [?] for help\r\nframe=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A\r\nvideo:785kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown\r\n./html5video.sh: 30: ./html5video.sh: [[: not found\r\n(Many times the same error message)\r\n./html5video.sh: 32: ./html5video.sh: [[: not found\r\n-e poster.jpeg: size=230400     quality=10      filesize=4\r\n./html5video.sh: 49: ./html5video.sh: [[: not found\r\n./html5video.sh: 52: ./html5video.sh: Bad substitution\r\n\r\nFFMPEG is working fine. When I start the commands\r\n\r\n\r\nrm -f ffmpeg2pass*\r\nffmpeg -y  -i \"286971.mp4\" -threads 0 -c:v libx264 -pix_fmt yuv420p -profile:v \"baseline\" -preset veryslow -b:v \"384k\" -pass 1 -c:a libfdk_aac -b:a \"96k\" -vf \"scale=trunc(426/2)*2:trunc(240/2)*2\" -f mp4  /dev/null\r\nffmpeg     -i \"286971.mp4\" -threads 0 -movflags +faststart -c:v libx264 -pix_fmt yuv420p -profile:v \"baseline\" -preset veryslow -b:v \"384k\" -pass 2 -c:a libfdk_aac -b:a \"96k\" -vf \"scale=trunc(426/2)*2:trunc(240/2)*2\" \"286971_240p.mp4\"\r\nrm -f ffmpeg2pass*\r\nffmpeg -y  -i \"286971.mp4\" -threads 0 -c:v libx264 -pix_fmt yuv420p -profile:v \"baseline\" -preset veryslow -b:v \"768k\" -pass 1 -c:a libfdk_aac -b:a \"128k\" -vf \"scale=trunc(640/2)*2:trunc(360/2)*2\" -f mp4  /dev/null\r\nffmpeg     -i \"286971.mp4\" -threads 0 -movflags +faststart -c:v libx264 -pix_fmt yuv420p -profile:v \"baseline\" -preset veryslow -b:v \"768k\" -pass 2 -c:a libfdk_aac -b:a \"128k\" -vf \"scale=trunc(640/2)*2:trunc(360/2)*2\" \"286971_360p.mp4\"\r\nrm -f ffmpeg2pass*\r\nffmpeg -y  -i \"286971.mp4\" -threads 0 -c:v libx264 -pix_fmt yuv420p -profile:v \"main\" -preset veryslow -b:v \"1536k\" -pass 1 -c:a libfdk_aac -b:a \"128k\" -vf \"scale=trunc(854/2)*2:trunc(480/2)*2\" -f mp4  /dev/null\r\nffmpeg     -i \"286971.mp4\" -threads 0 -movflags +faststart -c:v libx264 -pix_fmt yuv420p -profile:v \"main\" -preset veryslow -b:v \"1536k\" -pass 2 -c:a libfdk_aac -b:a \"128k\" -vf \"scale=trunc(854/2)*2:trunc(480/2)*2\" \"286971_480p.mp4\"\r\nrm -f ffmpeg2pass*\r\n\r\nffmpeg -i \"286971.mp4\" -threads 0 -c:v vp9 -c:a libopus -b:a \"96k\"  -vbr on -compression_level 10 -pix_fmt yuv420p -quality good -b:v \"384k\"  -crf 4 -vf \"scale=trunc(426/2)*2:trunc(240/2)*2\" -strict -2  \"286971_240p.webm\"\r\nffmpeg -i \"286971.mp4\" -threads 0 -c:v vp9 -c:a libopus -b:a \"128k\" -vbr on -compression_level 10 -pix_fmt yuv420p -quality good -b:v \"512k\"  -crf 4 -vf \"scale=trunc(360/2)*2:trunc(640/2)*2\" -strict -2  \"286971_360p.webm\"\r\nffmpeg -i \"286971.mp4\" -threads 0 -c:v vp9 -c:a libopus -b:a \"128k\" -vbr on -compression_level 10 -pix_fmt yuv420p -quality good -b:v \"1280k\" -crf 4 -vf \"scale=trunc(480/2)*2:trunc(854/2)*2\" -strict -2  \"286971_480p.webm\"\r\n\r\nffmpeg -i \"286971.mp4\" -vframes 1 -map 0:v:0 \"286971.png\"\r\n\r\nconvert 286971.png -quality 60 286971.jpg\r\n\r\n\r\ndirect into the shell, everything will be converted fine.\r\n\r\nAny ideas?\r\n\r\nRegards\r\nTorsten\r\n"}}