Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 29. Mar 2024, 02:31

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Video upload with FFmpeg
PostPosted: 11. Feb 2010, 21:06 
Offline

Joined: 11. Feb 2010, 20:46
Posts: 15
Hi,
I'm getting an error when I upload a video ( using TFU ), the error on the user side says:


Upload failed. 1 file(s) of 1 could not be uploaded.

The file is a .MOV and there are no errors in the TWG debug log ( file is blank in fact ). Here's what I see in the apache error log:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Cutting the Cake 5.MOV':
Output #0, flv, to 'Cutting the Cake 5.flv':

No other errors related to cause of the problem. The converted .flv is fine and creating a matching .jpg ( one is not automatically generated, cause of error message? ) allows me to view the video with the flash player. I have the following set in my additional settings:

$video_player='AUTO';
$video_autostart=true;
$video_show_dl_link=false;
$video_flash_site='youtube url removed';
$linktowvx=false;
$loop_mp3=false;
$mixed_video_image_content=false;
$use_ffmpeg=true;
$ffmpeg_extensions=array('flv','avi','divx','mpg','mpeg','wmv','mov','mp4', 'MOV', 'AVI','MPG','MP4');
$ffmpeg_time=1;
$ffmpeg_path='ffmpeg';
$ffmpeg_convert_command='-y -i "%s" -f flv -ar 22050 -ab 64 -ac 1 "%s"';
$ffmpeg_delete_src_after_convert=false;
$ffmpeg_generate_thumbs_at_upload=true;
$autogenerate_video_php_at_upload=true;
$video_php_autodetect_type=true;
$video_php_autodetect_size=true;
$video_php_x_default=400;
$video_php_y_default=320;
$show_videos=true;
$video_autodetect = true;
$video_size_x=400;
$video_player='AUTO';
$video_autostart=true;
$video_flash_site='youtube url removed';
$video_autostart_parameter='&autoplay=1';
$linktowvx=false;
$loop_mp3=false;
$mixed_video_image_content=false;

Running the "Generate Previews" function via the Admin interface generates the matching .jpg fine. I would assume this is the same thumb generation process used during upload.

I've checked the other FFmpeg related posts in the forums and I can't find anything related. Let me know if there is something else I should try to resolve the issue.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: 12. Feb 2010, 00:57 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Are you already using TWG 1.8? Because there I have included the latest version of TFU.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 12. Feb 2010, 01:07 
Offline

Joined: 11. Feb 2010, 20:46
Posts: 15
Yes, I upgraded to v1.8 RC4 to resolve something else...


Top
 Profile  
 
 Post subject:
PostPosted: 12. Feb 2010, 01:17 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
can you enable the upload debug in admin/upload/tfu_config.php


Top
 Profile  
 
 Post subject:
PostPosted: 12. Feb 2010, 01:53 
Offline

Joined: 11. Feb 2010, 20:46
Posts: 15
Ok, didn't know that was an option here's the output after TFU debug was enabled:

02.11.2010 18:48:08 - 1. Config loaded
02.11.2010 18:48:08 - 2. Authenification sucessfull
02.11.2010 18:48:08 - 3. Directory read: __/__/pictures/2010 Wedding Day
02.11.2010 18:48:08 - 4. Check valid extension: Cutting the Cake 5.MOV
02.11.2010 18:48:08 - 4a. Extension valid.
02.11.2010 18:48:08 - 5. Before move_uploaded_file : /var/www/virtual/mikeandting.com/phptmp/phpnZnWHx -_ __/__/pictures/2010 Wedding Day/Cutting the Cake 5.MOV
02.11.2010 18:48:08 - 5a. after move_uploaded_file.
02.11.2010 18:48:08 - 6. Uploaded.
02.11.2010 18:48:08 - 7. Internal processing done.
02.11.2010 18:48:08 - 8. Execute plugin: twg_plugin.php

The file was uploaded properly, and the .FLV was created properly but I'm still getting an error in the flash uploader and no thumb image was created.


Top
 Profile  
 
 Post subject:
PostPosted: 12. Feb 2010, 10:16 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I have to make this setup. The twg_plugin seems to fail because it does not return. The steps 9 and 10 are missing.

I check this on the weekend.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 12. Feb 2010, 12:47 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
There was an error in my twg plugin and after the conversion the generation of the thumbs failed.

I have updated the download in the forum. Please use the provided patch.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 15. Feb 2010, 18:49 
Offline

Joined: 11. Feb 2010, 20:46
Posts: 15
Ok, the file is uploaded successfully now without errors in the TFU. I'm not getting a .JPG generated though. This means the video is not available until I manually run the "Generate Previews". I have FFmpeg set to generate a thumb with :

$ffmpeg_generate_thumbs_at_upload=true;

And I see the following the TWG debug log now:

02.15.2010 11:40:29 - 1. Config loaded
02.15.2010 11:40:29 - 2. Authenification sucessfull
02.15.2010 11:40:29 - 3. Directory read: __/__/pictures/2010 Wedding Day
02.15.2010 11:40:29 - 4. Check valid extension: Cutting the Cake 5.MOV
02.15.2010 11:40:29 - 4a. Extension valid.
02.15.2010 11:40:29 - 5. Before move_uploaded_file : /var/www/virtual/mikeandting.com/phptmp/phpLpGlgg -_ __/__/pictures/2010 Wedding Day/Cutting the Cake 5.MOV
02.15.2010 11:40:29 - 5a. after move_uploaded_file.
02.15.2010 11:40:29 - 6. Uploaded.
02.15.2010 11:40:29 - 7. Internal processing done.
02.15.2010 11:40:29 - 8. Execute plugin: twg_plugin.php
02.15.2010 11:40:37 - 8a. End plugins
02.15.2010 11:40:37 - 9. End upload
02.15.2010 11:40:37 - 10. End store session

Any idea why the .jpg is not being auto generated at upload?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: 15. Feb 2010, 18:56 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
This works for me for my mov file.
Maybe ffmpag is not able to create the thumbnail out of the mov - later on the flv is used to generate the thumbnail.

During my testing I had 2 mov where ffmpeg could not convert.

How big is the mov? can you provide me a dl link?

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 15. Feb 2010, 21:11 
Offline

Joined: 11. Feb 2010, 20:46
Posts: 15
Sure, you should be able to down it here:

http://mikeandting.com/pictures/2010%20 ... ke%205.MOV

I'm wondering if its filename dependent... I already had some issues with the capital ".MOV".

Let me know if you can see the issue, I'll try with another file when I get home.


Top
 Profile  
 
 Post subject:
PostPosted: 16. Feb 2010, 21:47 
Offline

Joined: 11. Feb 2010, 20:46
Posts: 15
Ok, I think I have this working... There are following issues that should probably resolved for future at some point:

1/ ".MOV" files don't work properly for FFmpeg encoding or thumbnail creation. The solution is fixed by renaming to ".mov" ( lowercase ).

2/ ".mp4" files cannot be uploaded by default and probably should be.

3/ Large video files seem to either crash TFU or cause memory issues on the host machine. Looks like the entire video is loaded into Memory. On my Mac a 1GB video crashes Firefox and causes a 1GB memory spike in Chrome and Safari. This is probably not a practical for large video file uploads...


Top
 Profile  
 
 Post subject:
PostPosted: 16. Feb 2010, 21:57 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Hi,

I have fixed this with large capitals.
You have to redownload TWG 1.8

.mp4 would have to be added to the allowed file lists.

About the big files. ffmpeg is called by command line. So no php memory is used here. Seems ffmpeg simply crashes. You can try different parameters in the config to convert videos: $ffmpeg_convert_command

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy