Moderator: moderators
nlandas@gmail.com wrote:ffmpeg -i shows......
Video: h264 (Main), yuv420p, 720x480
Audio: aac, 48000 Hz, 5.1, s16, 221 kb/s
ffmpeg -v 0 -ss %o -async 1 -i %s -f flv -b %bk -s %wx%h -acodec copy -
ffmpeg -v 0 -ss %o -async 1 -i %s -f flv -b %bk -s %wx%h -acodec mp3 -ab 128k -ac 2 -ar 44100 -mintsoft wrote:Hi,
I think you'll probably have 2 problems, the codec and the number of channels.
I've not tested this with subsonic, but try the following:
- Code: Select all
ffmpeg -v 0 -ss %o -async 1 -i %s -f flv -b %bk -s %wx%h -acodec mp3 -ab 128k -ac 2 -ar 44100 -
This should work if your FFMpeg can encode to mp3; if not, you can try -acodec libmp3lame.
-Rob
nlandas@gmail.com wrote:Thanks Rob, Really cool of you to help. I tried the line with both the -acodec mp3 or libmp3lame and I'm getting an access denied or file not found error now. I'll keep playing until I work that out and then just try adding those -acodec parameters you mention.
Any ideas as to what might be causing the access denied or file not found error?
mintsoft wrote:nlandas@gmail.com wrote:Thanks Rob, Really cool of you to help. I tried the line with both the -acodec mp3 or libmp3lame and I'm getting an access denied or file not found error now. I'll keep playing until I work that out and then just try adding those -acodec parameters you mention.
Any ideas as to what might be causing the access denied or file not found error?
Hmm, the only thing that springs to mind is that you may have removed the "-" from the end of the line? It may look like a mistake but you need that to indicate that the output should go to stdout rather than replacing the input video.
Alternatively it could be that the ffmpeg doesn't have the capability to transcode to mp3, so you could try -acodec mp2 or use:
ffmpeg -formats or ffmpeg -codecs depending on your version to list available codecs.
nlandas@gmail.com wrote:Interesting, I did leave in the '-', I figured it had something to do. (stdout makes sense.)
Can you give me your default transcode line for MP4->FLV? I believe I have the default back in there now and I can't even get the videos to play without audio now. This is without the -acodec line.
ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -nlandas@gmail.com wrote:I just checked and MP3 is supported by my ffmpeg build but not for encoding. If I can get the video to display again from MP4->FLV then I'll start adding the acodec lines to play. I can play other videos like avi without problem. It's just the MP4->FLV that gives the access denied error.
Here is my line 'ffmpeg -ss %o -i %s -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -'
mintsoft wrote:From your codec list, you should be able to use libmp3lame, (EA libmp3lame libmp3lame MP3 (MPEG audio layer 3) ). Have you tried using mp2 or one of the uncompressed audio codecs to see if you can transcode audio at all.
I'll have a play on my install when I get home and see if I can get it to work.
nlandas@gmail.com wrote:I have added the lame_enc.dll 3.98.4 alongside lame in the transcode directory. I'm not sure what I'm missing to make Windows be able to use the libmp3lame library to encode this to mp3.
[15/05/11 16:07:21 BST] DEBUG InputStreamReaderThread (/var/subsonic/transcode/ffmpeg) Resampling with input channels greater than 2 unsupported.
[15/05/11 16:07:21 BST] DEBUG InputStreamReaderThread (/var/subsonic/transcode/ffmpeg) Can not resample 6 channels @ 48000 Hz to 2 channels @ 44100 Hz
mintsoft wrote:Just to urinate on that particular bonfire, ffmpeg has libmp3lame compiled in if it reports that it is supported. So you shouldn't need to worry about the correct location of the dll files etc.
I've just set my subsonic to attempt to transcode audio and I'm getting the same error (Video not found or access denied).
In my subsonic log (On the about page) I'm getting:
- Code: Select all
[15/05/11 16:07:21 BST] DEBUG InputStreamReaderThread (/var/subsonic/transcode/ffmpeg) Resampling with input channels greater than 2 unsupported.
[15/05/11 16:07:21 BST] DEBUG InputStreamReaderThread (/var/subsonic/transcode/ffmpeg) Can not resample 6 channels @ 48000 Hz to 2 channels @ 44100 Hz
Does that tally with your experience?
I'll keep playing but I think I may have lead you astray. Transcoding video and sound from multiple channels down to 2 in one statement isn't quite as straight forward as I thought!
ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ac 2 -acodec libmp3lame -v 0 -f flv -
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0(eng): Video: flv, yuv420p, 656x360 [PAR 40:33 DAR 656:297], q=2-31, 1000 kb/s, 1k tbn, 23.98 tbc
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Metadata:
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) creation_time : 2010-12-24 16:08:01
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.1(eng): Audio: libmp3lame, 48000 Hz, 2 channels, s16, 64 kb/s
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Metadata:
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) creation_time : 2010-12-24 16:08:01
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream mapping:
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.0 -> #0.0
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Stream #0.1 -> #0.1
[5/15/11 12:47:30 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Could not write header for output file #0 (incorrect codec parameters ?)
[5/15/11 12:55:51 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Resampling with input channels greater than 2 unsupported.
[5/15/11 3:24:14 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Can not resample 6 channels @ 48000 Hz to 2 channels @ 44100 Hz
nlandas@gmail.com wrote:I managed to get where you are with the
- Code: Select all
DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Resampling with input channels greater than 2 unsupported.
[5/15/11 3:24:14 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Can not resample 6 channels @ 48000 Hz to 2 channels @ 44100 Hz
But if I tell it the -ar 48000 that error goes away but then I think the flv can't handle 48000hz only 44100. I am getting so confused here.
nlandas@gmail.com wrote:nlandas@gmail.com wrote:I managed to get where you are with the
- Code: Select all
DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Resampling with input channels greater than 2 unsupported.
[5/15/11 3:24:14 PM EDT] DEBUG InputStreamReaderThread (c:\subsonic\transcode\ffmpeg) Can not resample 6 channels @ 48000 Hz to 2 channels @ 44100 Hz
But if I tell it the -ar 48000 that error goes away but then I think the flv can't handle 48000hz only 44100. I am getting so confused here.
I don't think it's possible to do on ffmpeg. This works in the browser and will play video on my Captivate with Android 2.2 but not audio. I'm thinking I'd need to use another transcoder.
I wonder if mencoder or some other one would support MP4(aac 5.1) to flv(mp3, 2 channel). Off I go on another quest.
Thanks for all the help.
ffmpeg -v 0 -ss %o -async 1 -i %s -f flv -b %bk -s %wx%h -acodec copy -
Users browsing this forum: No registered users and 6 guests