blazeroot / videoshrimp

13 stars 11 forks source link

always getting "Video is still being encoded" in video show page #1

Closed thiyagarajan closed 8 years ago

thiyagarajan commented 8 years ago

Hi,

always getting "Video is still being encoded" in video show page

any idea, what is problem?

Thanks

blazeroot commented 8 years ago

Hi @thiyagarajan,

you should investigate if everything is fine on sidekiq side, if there's everything fine you should check pubnub logs both on frontend and backend.

blazeroot commented 8 years ago

@thiyagarajan, did you find what was the issue?

ruby232 commented 8 years ago

I have the same error,i was read pubnub log but not find nothing

pubnub.log log I, [2016-05-10T12:24:53.429199 #15907] INFO -- Pubnub::Client: Created new Pubnub::Client instance. Version: 4.0.0beta14 D, [2016-05-10T12:24:53.429998 #15907] DEBUG -- Pubnub::Event: Initialized Pubnub::Grant D, [2016-05-10T12:24:53.430172 #15907] DEBUG -- Pubnub::Event: Fired event Pubnub::Grant D, [2016-05-10T12:24:53.430202 #15907] DEBUG -- Pubnub::Client: Looking for requester for single_event D, [2016-05-10T12:24:53.430866 #15907] DEBUG -- Pubnub::Event: Requested URI: http://pubsub.pubnub.com/v1/auth/grant/sub-key/d62fd6a103d61f3650fa53248370fc13b304a6035378a3e61427e5763a118fe3a0f944f979acbc3a13346e17bb3c22a47e6fdde05b2639ef076de5af48464621?timestamp=1462897493&w=0&r=1&m=1&ttl=0&pnsdk=PubNub-Ruby/4.0.0beta14&uuid=b833c0b8-e7ca-42d2-9dc6-59e81e62a16b&channel=video.*&signature=oeB0e0MMm24vbmADjaednv1fD08XvJ_MiscUvUhiAP4= D, [2016-05-10T12:24:55.231819 #15907] DEBUG -- Pubnub::Event: Event#handle D, [2016-05-10T12:24:55.232050 #15907] DEBUG -- Pubnub::Event: Event#add_common_data_to_envelopes D, [2016-05-10T12:24:55.232169 #15907] DEBUG -- Pubnub::Event: Firing callbacks for Pubnub::Grant D, [2016-05-10T12:24:55.233171 #15907] DEBUG -- Pubnub::Event: Initialized Pubnub::Grant D, [2016-05-10T12:24:55.233675 #15907] DEBUG -- Pubnub::Event: Fired event Pubnub::Grant D, [2016-05-10T12:24:55.233706 #15907] DEBUG -- Pubnub::Client: Looking for requester for single_event D, [2016-05-10T12:24:55.233868 #15907] DEBUG -- Pubnub::Event: Requested URI: http://pubsub.pubnub.com/v1/auth/grant/sub-key/d62fd6a103d61f3650fa53248370fc13b304a6035378a3e61427e5763a118fe3a0f944f979acbc3a13346e17bb3c22a47e6fdde05b2639ef076de5af48464621?timestamp=1462897495&w=1&r=1&m=1&ttl=0&pnsdk=PubNub-Ruby/4.0.0beta14&auth=88a9fdefbfea097b0b5d766604008a470940ccda62016e6adb48a3458cfd0aa4aafc2a8f87128a061d427bb87e94aab1568bba8eeb8e1d6e5dd6556202fd739f&uuid=b833c0b8-e7ca-42d2-9dc6-59e81e62a16b&channel=video.*&signature=Q2iElMpzBJr5XQCVYIpyMNJbZcNYhfosm-uDRVVudUA= D, [2016-05-10T12:24:55.602887 #15907] DEBUG -- Pubnub::Event: Event#handle D, [2016-05-10T12:24:55.603110 #15907] DEBUG -- Pubnub::Event: Event#add_common_data_to_envelopes D, [2016-05-10T12:24:55.603223 #15907] DEBUG -- Pubnub::Event: Firing callbacks for Pubnub::Grant D, [2016-05-10T12:24:55.604159 #15907] DEBUG -- Pubnub::Event: Initialized Pubnub::Grant D, [2016-05-10T12:24:55.604574 #15907] DEBUG -- Pubnub::Event: Fired event Pubnub::Grant D, [2016-05-10T12:24:55.604601 #15907] DEBUG -- Pubnub::Client: Looking for requester for single_event D, [2016-05-10T12:24:55.604774 #15907] DEBUG -- Pubnub::Event: Requested URI: http://pubsub.pubnub.com/v1/auth/grant/sub-key/d62fd6a103d61f3650fa53248370fc13b304a6035378a3e61427e5763a118fe3a0f944f979acbc3a13346e17bb3c22a47e6fdde05b2639ef076de5af48464621?timestamp=1462897495&w=1&r=1&m=1&ttl=0&pnsdk=PubNub-Ruby/4.0.0beta14&auth=88a9fdefbfea097b0b5d766604008a470940ccda62016e6adb48a3458cfd0aa4aafc2a8f87128a061d427bb87e94aab1568bba8eeb8e1d6e5dd6556202fd739f&uuid=b833c0b8-e7ca-42d2-9dc6-59e81e62a16b&channel=notifications.*&signature=p1czMeU4Qhd6QeiWGxOOhQWpfVpzsgXcoDsawgUlKBQ= D, [2016-05-10T12:24:55.966824 #15907] DEBUG -- Pubnub::Event: Event#handle D, [2016-05-10T12:24:55.967031 #15907] DEBUG -- Pubnub::Event: Event#add_common_data_to_envelopes D, [2016-05-10T12:24:55.967143 #15907] DEBUG -- Pubnub::Event: Firing callbacks for Pubnub::Grant ``

blazeroot commented 8 years ago

@ruby232 I'll check this out and let you know about my findings shortly.

blazeroot commented 8 years ago

So, I've cloned this repo (to have fresh copy) and publisher had minor problem and it's fixed (notice migration update in last commit) but encoder worked fine. Are you sure redis server and sidekiq are up and running? If video is never getting encoded there's probably problem in sidekiq job, take a look at sidekiq logs and let me know if you find there anything (or just share them here).

ruby232 commented 8 years ago

Thanks for your help , the problem was sidekiq are not up start, I execute "bundle exec sidekiq" and first convert all video uploads, same time run rails server and transcode video successful.

Sorry for my english.

blazeroot commented 8 years ago

Great to hear that! No problem :-)

dejawooh commented 7 years ago

I am new to rails. I am doing exactly per https://www.pubnub.com/blog/2015-12-08-building-video-sharing-app-server-messaging-ruby/. On top of this I am running reds -server and bundle exec sidekiq but I get message "Video is still being encoded." Checked in database and my videos are getting inserted. Here's the log for Redis and sidekiq


Redis-- $ redis-server [64544] 11 Oct 07:36:14.426 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf [64544] 11 Oct 07:36:14.427 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 8160. [64544] 11 Oct 07:36:14.427 # Creating Server TCP listening socket *:6379: bind: Address already in use


sidekiq

$ redis-server [64544] 11 Oct 07:36:14.426 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf [64544] 11 Oct 07:36:14.427 # Unable to set the max number of files limit to 10032 (Operation not permitted), setting the max clients configuration to 8160. [64544] 11 Oct 07:36:14.427 # Creating Server TCP listening socket *:6379: bind: Address already in use


dejawooh commented 7 years ago

Sorry below is sidekiq log 2016-10-12T04:21:00.251Z 73605 TID-l83gw INFO: [Sidetiq] Enqueue: VideoPublisher (at: 1476246120.0) (last: 1476246060.0) 2016-10-12T04:21:16.178Z 73605 TID-oxkz28srs VideoPublisher JID-19a982e30a3c181f8f757b50 INFO: start 2016-10-12T04:21:16.180Z 73605 TID-oxkz28srs VideoPublisher JID-19a982e30a3c181f8f757b50 INFO: done: 0.002 sec 2016-10-12T04:22:00.271Z 73605 TID-ou3i0 INFO: [Sidetiq] Enqueue: VideoPublisher (at: 1476246180.0) (last: 1476246120.0) 2016-10-12T04:22:16.146Z 73605 TID-v65wg VideoPublisher JID-e0c8138c9c3bdbcef3711c76 INFO: start 2016-10-12T04:22:16.149Z 73605 TID-v65wg VideoPublisher JID-e0c8138c9c3bdbcef3711c76 INFO: done: 0.003 sec 2016-10-12T04:22:31.984Z 73605 TID-y7u04 ThumbnailCutter JID-da2c68736611327a846e7df6 INFO: start sidekiq 4.2.2 VideoShrimp [0 of 25 busy]: No such file or directory - ffmpeg 2016-10-12T04:22:31.991Z 73605 TID-y7u04 ThumbnailCutter JID-da2c68736611327a846e7df6 INFO: fail: 0.007 sec 2016-10-12T04:22:31.991Z 73605 TID-y7u04 WARN: {"class":"ThumbnailCutter","args":[7],"retry":true,"queue":"default","jid":"da2c68736611327a846e7df6","created_at":1476245384.080985,"enqueued_at":1476246151.9836948,"error_message":"exception class/object expected","error_class":"TypeError","failed_at":1476245384.2300832,"retry_count":5,"retried_at":1476246151.9909208} 2016-10-12T04:22:31.991Z 73605 TID-y7u04 WARN: TypeError: exception class/object expected 2016-10-12T04:22:31.991Z 73605 TID-y7u04 WARN: /home/ubuntu/ruby_projects/VideoShrimp/app/workers/thumbnail_cutter.rb:13:in raise' /home/ubuntu/ruby_projects/VideoShrimp/app/workers/thumbnail_cutter.rb:13:inperform' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/processor.rb:155:in execute_job' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/processor.rb:136:inblock (3 levels) in process' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/chain.rb:128:in block in invoke' /usr/local/rvm/gems/ruby-2.2.1/bundler/gems/sidetiq-7bec4084165f/lib/sidetiq/middleware/history.rb:8:incall' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/chain.rb:130:in block in invoke' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/server/active_record.rb:6:incall' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/chain.rb:130:in block in invoke' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/server/retry_jobs.rb:74:incall' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/chain.rb:130:in block in invoke' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/server/logging.rb:11:inblock in call' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/logging.rb:32:in with_context' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/server/logging.rb:7:incall' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/chain.rb:130:in block in invoke' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/chain.rb:133:incall' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/middleware/chain.rb:133:in invoke' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/processor.rb:131:inblock (2 levels) in process' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/processor.rb:171:in stats' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/processor.rb:130:inblock in process' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq.rb:35:in call' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq.rb:35:inblock in module:Sidekiq' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/processor.rb:122:in call' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/processor.rb:122:inprocess' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/processor.rb:81:in process_one' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/processor.rb:69:inrun' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/util.rb:17:in watchdog' /usr/local/rvm/gems/ruby-2.2.1/gems/sidekiq-4.2.2/lib/sidekiq/util.rb:25:inblock in safe_thread' 2016-10-12T04:23:00.332Z 73605 TID-l83gw INFO: [Sidetiq] Enqueue: VideoPublisher (at: 1476246240.0) (last: 1476246180.0) 2016-10-12T04:23:03.189Z 73605 TID-nzbss VideoPublisher JID-3868cff6ecf16611b931cab4 INFO: start 2016-10-12T04:23:03.202Z 73605 TID-nzbss VideoPublisher JID-3868cff6ecf16611b931cab4 INFO: done: 0.013 sec 2016-10-12T04:24:00.354Z 73605 TID-ou3i0 INFO: [Sidetiq] Enqueue: VideoPublisher (at: 1476246300.0) (last: 1476246240.0) 2016-10-12T04:24:01.846Z 73605 TID-vgq5w VideoPublisher JID-267f4344c307579fa8ba2a52 INFO: start 2016-10-12T04:24:01.848Z 73605 TID-vgq5w VideoPublisher JID-267f4344c307579fa8ba2a52 INFO: done: 0.002 sec

blazeroot commented 7 years ago

@dejawooh You have got error No such file or directory - ffmpeg. You have to install ffmpeg on your system to encode video files.

EDIT: looks like you have instance of redis running in background because of: [64544] 11 Oct 07:36:14.427 # Creating Server TCP listening socket *:6379: bind: Address already in use