Help with FFMPEG and MIME types for TRanscode module

SUBERIP

Joined: 2008-03-03
Posts: 23
Posted: Sat, 2008-11-08 15:04

I think the Video bitrate (kb/s) is autocheched at "Native" and not at default option (saved at transcode module).

is there any way to press a button and transcode all the video in the gallery with the default values?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2008-11-08 15:31
Quote:
I think the Video bitrate (kb/s) is autocheched at "Native"

I think I still have to enable some of the defaults with onUpload, but in itemEdit they are effective.

Quote:
is there any way to press a button and transcode all the video in the gallery with the default values?

No, that would be crazy

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
mstorman

Joined: 2006-05-08
Posts: 20
Posted: Sun, 2008-11-09 06:36
SUBERIP wrote:
I think the Video bitrate (kb/s) is autocheched at "Native" and not at default option (saved at transcode module).

is there any way to press a button and transcode all the video in the gallery with the default values?

I found that same issue. Also, I think it would be a good idea to add a feature that would allow someone to transcode all of their movies as well. You can never have too many options ;). Im sure everyone here understands that doing so would cause an exessive server load.

Also, is there a way to read the the date of the video that was uploaded and add that date to the video date?

Thanks again for taking the time to develop this. :)

 
TomPouce25

Joined: 2009-01-28
Posts: 13
Posted: Wed, 2009-01-28 15:34

Hi All,

I am new to Gallery2. Thanks to this thread, I am now able to transcode my (already uploaded) videos to flv in Gallery 2.3.

What is not working right now is the automatic transcoding upon upload ("Transcode now" option in the "Add items" menu) or upon first view ("Transcode later" option in the "Add items" menu).

I have however authorized it ("Enable automatic video conversion on upload?" checkbox in the "Transcode" options menu) and used the latest version of transcode I found (Nov.08.08):
http://www.flashyourweb.com/filemgmt/index.php?id=20

Does this look like a configuration problem from my side or is this functionality not fully implemented right now?

If I use "Transcode now", I end up with some default image appearing instead of the video. If I use "Transcode latter", I end up with the flash video player trying to load forever. However, as I mentioned earlier, using "Don't transcode now, I can do it manually later" and actually transcoding through the "Transcode" tab works just fine.

Thanks for you help,
Tom

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-01-29 00:05

Did you set any defaults in gallery admin -> transcode?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
TomPouce25

Joined: 2009-01-28
Posts: 13
Posted: Thu, 2009-01-29 09:51

Hi Suprsidr,

Thanks for the prompt reply. I initially set some size limits in "admin -> transcode". I then tried to removed them (set size limits larger than the movies I upload) but the result is the same.

FYI, I have put what I now have in "admin -> transcode" and "admin -> ffmpeg". Since I don't care about sound, I didn't focus on the "Missing required audio codec" message. Could that be related?

Also I realized that my "admin -> transcode" page doesn' look exactly like:
http://www.flashyourweb.com/staticpages/index.php?page=TranscodeModule
I don't have the "Lock transcode to MIME" option and my "Output MIME Type" option box displays things like "video/x-flv" rather than "Flash (flv)". Is there a newer version of transcode that the one I am using (Nov.08.08)?

Regards,
Tom

"admin -> transcode"
====================
Transcode defaults
Output MIME Type video/x-flv
Max Width 800
Max Height 800
Default Video bitrate Same as source
Default Audio Channels Mute
Default Audio Sample Rate (Hz) 11025
Transcode these mimetypes: video/mp4
video/mpeg
video/quicktime
video/x-flv
video/x-ms-asf
video/x-ms-wmv
video/x-msvideo
Item Upload
Enable automatic video conversion on upload? checked

"admin -> ffmpeg"
================
Supported MIME Types

The FFMPEG module can decode files of the following MIME types

video/x-ms-asf
video/x-msvideo
video/x-flv
video/quicktime
video/mp4
video/mpeg
video/x-ms-wmv

The FFMPEG module can encode files to the following MIME types

video/x-ms-asf
video/x-msvideo
video/x-flv
Missing required audio codec, encoded videos will not contain sound.
video/quicktime
video/mp4
video/mpeg
Version Information

FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
libavutil version: 49.6.0
libavcodec version: 51.50.0
libavformat version: 52.7.0
libavdevice version: 52.0.0
built on Oct 3 2008 22:40:31, gcc: 4.3.2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-01-29 13:26

I just uploaded my latest working copy. Not sure which of these issues I may have addressed. I only work on it when I have time.
I will say... my ffmpeg claims to be able to transcode to other formats, but flv seems to be the only one that works.
I'm probably going to backout support for transcoding to other formats except maybe mp4.

It does looks like you are missing the mp3 lib (--enable-libmp3lame)

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
TomPouce25

Joined: 2009-01-28
Posts: 13
Posted: Thu, 2009-01-29 14:08

Thanks! Unfortunately, this new version doesn't fix my issue. There are slight differences though:
1) "Transcode now" and "Transcode later" provide the same result, i.e. a default broken image icon appearing
2) Going to "Edit Movie" and launching the transcoding manually still works but now has a progress bar

Could the mp3 lib be important if I do not need sound?

Tom

 
TomPouce25

Joined: 2009-01-28
Posts: 13
Posted: Thu, 2009-01-29 14:42

Also, I don't know if this might be of importance. The ffmpeg module I initially had with my G2 installation reports version 1.0.13 whereas the one that come from http://www.flashyourweb.com/filemgmt/index.php?id=20 reports version 1.0.12.
Tom

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-01-29 15:16

Trancode has been in the works for a long time. 1.0.12 was the current version back then. Many of the changes in 1.0.13 were to prepare for transcode.
But my version has all of that.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
TomPouce25

Joined: 2009-01-28
Posts: 13
Posted: Fri, 2009-01-30 13:08

Ok, thanks for the support. I'll stay tuned to see if future versions of transcode fix my transcode upon upload issue. In the meantime, if I find a workaround, I'll post it here.
Cheers,
Tom

 
fuzzybee

Joined: 2007-06-15
Posts: 8
Posted: Mon, 2009-03-30 00:07

I'd like to resurrect this thread, if possible.

I'm trying out your transcode, and have downloaded the module and the ffmpeg from your website. I'm running Gentoo, and FFmpeg reports:

FFmpeg version SVN-r15615, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-debug --disable-network --disable-optimizations --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libdc1394 --disable-demuxer=v4l --disable-demuxer=v4l2 --enable-x11grab --enable-pthreads --enable-libfaad --disable-ssse3 --disable-altivec --cpu=opteron --disable-vhook --enable-gpl --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-swscale --disable-stripping
libavutil 49.11. 0 / 49.11. 0
libavcodec 52. 0. 0 / 52. 0. 0
libavformat 52.22. 1 / 52.22. 1
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 1. 0 / 0. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 29 2009 18:43:04, gcc: 4.1.2 (Gentoo 4.1.2 p1.0.2)

but when I try to transcode an AVI file from my camera, it reports:

Audio Channels 1 Audio support not available, video will be silent.
Audio Sample Rate (Hz) 44100 Audio support not available, video will be silent.
Audio Bitrate (kb/s) n/a Audio support not available, video will be silent.

Any idea why I can't get audio?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2009-03-30 00:19

deactivate/uninstall transcode, ffmpeg, thumbnail modules.
reinstall/test/activate ffmpeg first so it registers its new capabilities.
then reinstall the other two.

-s

FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
fuzzybee

Joined: 2007-06-15
Posts: 8
Posted: Mon, 2009-03-30 02:42

Hmmm - just did all that, and I still get the "Audio support not available, video will be silent." Very odd.

When I reinstalled ffmpeg, it went ahead and activated it. Is that OK?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2009-03-30 07:57

when you test your binary does it report the lack of an audio codec?
its looking for the mp3 codec which it looks like you have enabled - but regardless it is looking for mp3 in the returned encoderTypes.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
fuzzybee

Joined: 2007-06-15
Posts: 8
Posted: Mon, 2009-03-30 10:13

Dumb question: what command-line flags should I use to test the ffmpeg binary?

Thanks for all your help, btw.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2009-03-30 12:02

well, when you test/activate the module it will report then.
or path_to_your_ffmpeg - formats

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
fuzzybee

Joined: 2007-06-15
Posts: 8
Posted: Mon, 2009-03-30 12:10

Here's what the -formats reports:

ffmpeg -formats|grep mp3
FFmpeg version SVN-r15615, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-debug --disable-network --disable-optimizations --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libdc1394 --disable-demuxer=v4l --disable-demuxer=v4l2 --enable-x11grab --enable-pthreads --enable-libfaad --disable-ssse3 --disable-altivec --cpu=opteron --disable-vhook --enable-gpl --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-swscale --disable-stripping
libavutil 49.11. 0 / 49.11. 0
libavcodec 52. 0. 0 / 52. 0. 0
libavformat 52.22. 1 / 52.22. 1
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 1. 0 / 0. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 29 2009 18:43:04, gcc: 4.1.2 (Gentoo 4.1.2 p1.0.2)
DE mp3 MPEG audio layer 3
EA libmp3lame libmp3lame MP3 (MPEG audio layer 3)
D A mp3 MP3 (MPEG audio layer 3)
D A mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3)
D A mp3on4 MP3onMP4
text2movsub remove_extra noise mov2textsub mp3decomp mp3comp mjpegadump imxdump h264_mp4toannexb dump_extra

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2009-03-30 12:34

yeah, you stated that above. how about what gallery reports? in admin -> ffmpeg -> test
does it say missing audio codec?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
fuzzybee

Joined: 2007-06-15
Posts: 8
Posted: Mon, 2009-03-30 12:50

Yes, it does:

Supported MIME Types

The FFMPEG module can decode files of the following MIME types

video/x-ms-asf
video/x-msvideo
video/x-flv
video/quicktime
video/mp4
audio/mpeg
video/mpeg

The FFMPEG module can encode files to the following MIME types

video/x-ms-asf
video/x-msvideo
video/x-flv
Missing required audio codec, encoded videos will not contain sound.
video/quicktime
audio/mpeg
video/mp4
video/mpeg
Version Information

FFmpeg version SVN-r15615, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-debug --disable-network --disable-optimizations --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libdc1394 --disable-demuxer=v4l --disable-demuxer=v4l2 --enable-x11grab --enable-pthreads --enable-libfaad --disable-ssse3 --disable-altivec --cpu=opteron --disable-vhook --enable-gpl --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-swscale --disable-stripping
libavutil 49.11. 0 / 49.11. 0
libavcodec 52. 0. 0 / 52. 0. 0
libavformat 52.22. 1 / 52.22. 1
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 1. 0 / 0. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 29 2009 18:43:04, gcc: 4.1.2 (Gentoo 4.1.2 p1.0.2)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2009-03-30 13:57

I'm not sure why you get the error, it may be the newer ffmpeg build.
you can try to override the audio mute in modules/ffmpeg/classes/FfmpegToolkit.class line ~139

	    if (isset($context['audioChannels'])) {
		if ($context['audioChannels'] > 0) {
		    $audioChannelIndex = count($args);
		    $args[] = '-ac';
		    $args[] = $context['audioChannels'];
		} else {
		    $args[] = '-an';
		    $muted = true;
		}
		unset($context['audioChannels']);
	    }

to

		    $args[] = '-ac';
		    $args[] = 2;
		unset($context['audioChannels']);
	    

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
fuzzybee

Joined: 2007-06-15
Posts: 8
Posted: Tue, 2009-03-31 01:20

Hmm- Still didn't work, and now I've borked something else up. The progress bar will pop up for transcode, but then it errors out:

Error Detail -
Error (ERROR_BAD_PARAMETER)

* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (GalleryCoreApi::error)
* in modules/core/classes/GalleryCoreApi.class at line 2361 (GalleryEntityHelper_simple::loadEntitiesById)
* in modules/core/classes/helpers/GalleryDerivativeHelper_simple.class at line 38 (GalleryCoreApi::loadEntitiesById)
* in modules/core/classes/GalleryCoreApi.class at line 984 (GalleryDerivativeHelper_simple::rebuildCacheIfNotCurrent)
* in modules/transcode/ItemEditTranscode.inc at line 249 (GalleryCoreApi::rebuildDerivativeCacheIfNotCurrent)
* in modules/core/ItemEdit.inc at line 84 (ItemEditTranscode::handleRequest)
* in main.php at line 250 (ItemEditController::handleRequest)
* in main.php at line 104
* in main.php at line 88

System Information
Gallery version 2.3
PHP version 5.2.8-pl1-gentoo apache2handler
Webserver Apache
Database mysqlt 5.0.70
Toolkits ImageMagick, Thumbnail, Gd
Operating system Linux strongsad 2.6.23-gentoo-r3 #5 SMP Sun Mar 16 09:32:44 EDT 2008 x86_64
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2009-03-31 02:51

ok, backout that change, and let's disable the audio warnings instead.
modules/transcode/ItemEditTranscode.inc
line ~ 341, and 346:
$form['warn']['achans'] = true;
$form['warn']['asr'] = true;

set those to false.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
shpy

Joined: 2006-09-21
Posts: 6
Posted: Tue, 2009-08-25 05:00

Hey, i have the same error "missing audio.." althought flv and mp4 can play welll. But how to fix that error ? I see that i have
libmp3lame.so
libmp3lame.so.0
libmp3lame.so.0.0.0

in the usr/lib. Here is the infomation:

Supported MIME Types

The FFMPEG module can decode files of the following MIME types

video/x-ms-asf
video/x-msvideo
video/x-flv
video/quicktime
video/mp4
video/mpeg

The FFMPEG module can encode files to the following MIME types

video/x-flv
Missing required audio codec, encoded videos will not contain sound.
Version Information

FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --enable-libamr-nb --enable-libamr-wb --enable-libdirac --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-x11grab
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 24 2009 01:48:17, gcc: 4.1.2 20080704 (Red Hat 4.1.2-44)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2009-08-25 05:13
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2009-11-24 01:51

Thought you'd all like to know I've updated again, and think I have finally whipped the missing audio codec bug :)

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2