You are not logged in.

#1 2009-09-17 22:37:00

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

ffmpeg troubles

root 14 > ffmpeg -i *ON*01*720* -ab 320 -ar 44100 -b 512kbps -r 30fps -g 100 -acodec libmp3lame -ac 1 -y -s 600x450 -vcodec flv /srv/vhosts/saikonet/http/wp-content/videos/14/kon/01.flv
FFmpeg version SVN-r19905, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --prefix=/usr --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libx264 --enable-libtheora --enable-postproc --enable-shared --enable-pthreads --enable-x11grab --arch=i686
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.35. 0 / 52.35. 0
  libavformat   52.38. 0 / 52.38. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Sep 17 2009 18:35:31, gcc: 4.4.1
[matroska @ 0x955b420]max_analyze_duration reached

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (46370/967) -> 23.98 (24000/1001)
Input #0, matroska, from '[The14thSubs]K-ON!_01_[720p]_[5F66FDE7].mkv':
  Duration: 00:24:12.47, start: 0.000000, bitrate: N/A
    Stream #0.0(jpn): Video: h264, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 23.98 tbr, 1k tbn, 47.95 tbc
    Stream #0.1(jpn): Audio: aac, 24000 Hz, 1 channels, s16
    Stream #0.2(por): Subtitle: 0x0000
    Stream #0.3: Attachment: 0x0000
    Stream #0.4: Attachment: 0x0000
    Stream #0.5: Attachment: 0x0000
    Stream #0.6: Attachment: 0x0000
    Stream #0.7: Attachment: 0x0000
    Stream #0.8: Attachment: 0x0000
    Stream #0.9: Attachment: 0x0000
    Stream #0.10: Attachment: 0x0000
    Stream #0.11: Attachment: 0x0000
    Stream #0.12: Attachment: 0x0000
  Metadata
    title           : K-ON!- Episódio 1
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Output #0, flv, to '/srv/vhosts/saikonet/http/wp-content/videos/14/kon/01.flv':
    Stream #0.0(jpn): Video: flv, yuv420p, 600x450 [PAR 4:3 DAR 16:9], q=2-31, 512 kb/s, 1k tbn, 30 tbc
    Stream #0.1(jpn): Audio: libmp3lame, 44100 Hz, 1 channels, s16, 0 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[aac @ 0x95e6fb0]SBR not implemented. Update your FFmpeg version to the newest one from SVN. If the problem still occurs, it means that your file has a feature which has not been implemented.

any ideas?


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#2 2009-09-18 00:41:33

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: ffmpeg troubles

Just use 'k' for the bitrate. You need this for both the audio and the video:

-ab 320k -b 512k

With that being said, that's a very low video bitrate for an audio bitrate that high. Not that it won't work, it's just very high quality audio for fairly low quality video. Also, a 320k mono audio stream?

Offline

#3 2009-09-18 07:24:53

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: ffmpeg troubles

thanks for the tips. still no ideas on what's causing the 'SBR not implemented' though? =/


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#4 2009-09-19 14:36:56

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: ffmpeg troubles

FFmpeg doesn't have internal SBR capabilities for AAC yet either for decoding (this case) or encoding. Is your copy of FFmpeg compiled with FAAD2? If not, and this is a problem, you need to install and enable it.

Offline

#5 2009-09-19 17:51:39

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: ffmpeg troubles

well, I do see libfaad on the -formats output, but it just says unknown encoder when I try and use it.


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#6 2009-09-19 18:13:10

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: ffmpeg troubles

Whoops. I forgot to read the configure line in your output. It clearly shows that FAAD2 is installed and configured. Anyway, it's a decoder, not an encoder.

Your input audio is apparently a SBR (Spectral Band Replication) encoded AAC stream. SBR was designed to get better quality out of stuff like voice for AAC. Essentially it's purpose is to replace codecs like speex, or get higher quality with lower bitrates for stuff like audio books. It's not very good for full spectrum encoding for movies, music, and the like.

FFmpeg's complaint in your output is telling you that it's using it's own internal AAC decoder and that it can't handle SBR. I haven't tried any SBR encoded files lately and can't remember how gracefully they are handled.

Enough with the educational babbling!

I have a feeling that your mkv file started life as a flash video, and you want it returned to that. Have you considered just dumping the contents back into a flv container? H264 and AAC are part of the flash specification.

Offline

#7 2009-09-22 07:00:45

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: ffmpeg troubles

am I not already doing that? I'm trying to convert it into an flv


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#8 2009-09-22 07:07:22

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: ffmpeg troubles

Converting and dumping into a container are different, as I understand. You'd need skottish to explain how to do it though, doubt its as simple as a rename. I think there's a -copy option in ffmpeg somewhere...


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#9 2009-09-22 08:15:12

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: ffmpeg troubles

oh another question...is there anyway to set a least a minimum bitrate in ffmpeg? when I just use the -b option, it seriously jumps ALL over the place, and -minrate doesn't even seem to do anything


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#10 2009-09-22 18:02:00

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: ffmpeg troubles

ngoonee wrote:

Converting and dumping into a container are different, as I understand. You'd need skottish to explain how to do it though, doubt its as simple as a rename. I think there's a -copy option in ffmpeg somewhere...

Try this:

ffmpeg -i inputfile.mkv -vcodec copy -acodec copy outputfile.flv

I think it will work, but it may choke on the subtitle and attachment streams.

Also, why do you want this in flv?

Last edited by DrZaius (2009-09-22 18:02:49)

Offline

#11 2009-09-22 18:37:29

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: ffmpeg troubles

I get this now:

[NULL @ 0x913ec00]error, non monotone timestamps 125 >= 83
av_interleaved_write_frame(): Error while opening file


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#12 2009-09-23 18:18:42

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: ffmpeg troubles

Stythys wrote:

I get this now:

[NULL @ 0x913ec00]error, non monotone timestamps 125 >= 83
av_interleaved_write_frame(): Error while opening file

Curses!  Well, I was useful.  The rubber-stamp response for odd/unknown errors is to ask: are you using the latest FFmpeg from SVN?

Offline

#13 2009-09-24 08:54:43

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: ffmpeg troubles

yes I am.

also, ffmpeg isn't converting over the subtitles. does it even support this? I think I heard mencoder does. what would be the equivalent mencoder command to do this?


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#14 2009-09-25 02:15:00

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: ffmpeg troubles

If you want to keep the subtitles the same, use -scodec copy. FFmpeg's subtitle support isn't as robust as Mplayer's, so it'll work on less types. In this case I don't think that these subtitles are supported (0x0000):

Stream #0.2(por): Subtitle: 0x0000

As far as the nonmonotone timestamps error, those are very tricky. FFmpeg is telling you one of a few things: either your input file was put together by a crappy muxer, one of the streams is broken, or FFmpeg itself is getting confused. The output from the video section is consistent with Flash files. That may be a problem:

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (46370/967) -> 23.98 (24000/1001)

Between that and the unsupported subtitles, I'd recommend looking into Mencoder. I think that you may have better luck there.

Offline

#15 2009-09-25 02:21:45

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: ffmpeg troubles

yeah I tried -scodec copy to no avail. tryin' to find a good tutorial or something for mencoder...


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

Board footer

Powered by FluxBB