[Ffmpeg-devel-irc] ffmpeg.log.20131229
burek
burek021 at gmail.com
Mon Dec 30 02:05:01 CET 2013
[01:36] <nodie> hello
[01:36] <nodie> someone in #mplayer told me that ffmpeg does not support files with multiple streams?
[01:36] <nodie> I'm trying to reproduce a realplayer video file from the late 90's
[01:36] <nodie> and, while it works with realplayer, no free player seems to be able to reproduce it
[01:37] <nodie> the file is this
[01:37] <nodie> ftp://ftp.aduni.org/videos/06_lect_01.rm
[01:38] <nodie> could someone here, with more knowledge than I've, try to reproduce it and tell me what's wrong with it?
[01:39] <jnvsor> He lied. Use the -map option for multiple streams.
[01:41] <llogan> jnvsor: i think he means that ffmpeg is unable to decode any of the streams
[01:41] <jnvsor> Ah
[01:41] <llogan> nodie: does realplayer give any indication of the formats of the streams?
[01:42] <nodie> llogan, I've been playing with GUI (horrible thing btw) and were not able to find where the heck is the format info
[01:43] <jnvsor> The stream type has 5 hits on google. Total. Good luck, looks like that format's dead and buried. I'd just screengrab it if I were you.
[01:43] <nodie> Unsupported codec with id 0 for input stream 0
[01:43] <nodie> Unsupported codec with id 0 for input stream 1
[01:44] <nodie> jnvsor, yeah I just want to know if it's a lost cause
[01:44] <nodie> and it's better to just go to sleep instead :)
[01:44] <jnvsor> "Unsupported stream type 4d4c5449" - 4d4c5449 has 5 hits on google. Lost cause. I'd play the video and screengrab it in your position
[01:45] <llogan> 0:0 is probably audio (just guessing from the stream size), and 0:1 is the video
[01:45] <nodie> oki doki
[01:45] <llogan> filing a bug report could be useful
[01:45] <nodie> btw, realplayer allows you to convert the video to "iphone/android format" (aka mp4/3gp)
[01:46] <jnvsor> There is one - https://trac.ffmpeg.org/ticket/2152
[01:46] <jnvsor> Ah then do that
[01:46] <nodie> and just extracts the audio, even Realplayer doesn't want to mess with the video
[01:46] <jnvsor> Ew hah - screencast is the way to go then :)
[01:46] <nodie> ook
[01:47] <nodie> ok
[01:47] <llogan> ah, yeah, searching for bug reports first is even more useful
[01:47] <nodie> I didn't know that the "4d4c5449" was the codec id
[01:47] <nodie> next time I will search for the id returned (if this thing ever happened to me again)
[01:48] <jnvsor> Wierd thing is this format is so backwards it uses the same id for both audio and video streams (-_-)
[01:48] <nodie> any suggestion on how to create a nice screencast? or just any screen cast software is good enough
[01:48] <jnvsor> Are you on windows or linux?
[01:48] <nodie> linux if possible
[01:48] <llogan> http://ubuntuforums.org/showthread.php?p=8746719#post8746719
[01:48] <jnvsor> can you play the video on linux?
[01:48] <nodie> yeap
[01:48] <nodie> realplayer on wine ;)
[01:48] <jnvsor> then let me build you a line
[01:49] <jnvsor> know the framerate of the video btw?
[01:49] <nodie> hey didn't know that you could use ffmpeg for screencasting :D
[01:49] <nodie> jnvsor, nope
[01:49] <nodie> but it's fine, with llogan link I've enough for starting
[01:49] <jnvsor> I wrote a script to automate it
[01:50] <nodie> is it in github or somewhere else?
[01:50] <jnvsor> https://github.com/jnvsor/screencap
[01:50] <nodie> many thanks, you have helped me a lot :)
[01:51] <nodie> now I can got to sleep
[01:51] <nodie> bye!
[01:51] <jnvsor> `screencap --mute -i window out.avi` will get you the realplayer video, then use it's built in audio converting
[01:51] <nodie> cheers jnvsor
[01:53] <llogan> jnvsor: heh. "Avconv has several bugs including incomplete x11grab support"
[01:54] <jnvsor> Yeah, best you can do for screencasting on avconv is `-r` but then you get av desync so that's no use :)
[01:55] <llogan> so you're using -framerate instead?
[01:55] <jnvsor> Yep
[01:55] <jnvsor> It's in avconv, it just doesn't work xD
[01:55] <llogan> that's YAAB
[01:55] <llogan> yet another avconv bug
[01:56] <jnvsor> I googled it before you said that and was confused :P
[01:57] <llogan> i wonder if -s and -video_size are the same? i didn't look into it.
[01:59] <llogan> do you want screencap on http://ffmpeg.org/projects.html ?
[01:59] <jnvsor> Huh, don't know if it's big enough for that :)
[02:00] <jnvsor> I mean it works great but it's not a big accomplishment xD
[02:01] <jnvsor> But yeah I'd guess -video_size is implemented inside x11grab device and -s is outside
[02:02] <jnvsor> For size I doubt there's any practical difference, but with framerate it can cause issues
[02:03] <llogan> as in ticket 3045
[02:03] <jnvsor> Yep
[02:05] <jnvsor> Easy way to demonstrate the difference is to sigstop ffmpeg while recording
[02:05] <jnvsor> with `-r` the video will skip the time it was paused, with `-framerate` it will freeze but won't skip the time
[02:05] <llogan> i see
[05:15] <b1oodline> i noticed seeking is slower on .flv than .mp4, is this normal
[05:15] <klaxa> are the same streams in the files?
[05:16] <b1oodline> what do you mean
[05:17] <klaxa> are both files the same video or different ones?
[05:18] <b1oodline> different
[05:18] <klaxa> maybe one file has a higher bitrate in that case you can't pin it down on the container
[05:20] <b1oodline> no that's not it
[05:21] <klaxa> streamcopy an flv to mp4 (ffmpeg -i file.flv -c copy file.mp4) and then benchmark
[05:22] <b1oodline> it's faster
[05:24] <klaxa> then it's normal
[05:25] <klaxa> and flv is a bad container and you should not use it :)
[05:25] <klaxa> or use it, it doesn't really matter
[05:25] <b1oodline> how is it bad
[05:25] <klaxa> it's slower in seeking, isn't it?
[05:26] <klaxa> it's also weirdly restricted
[05:26] <b1oodline> yes
[05:26] <b1oodline> how so
[05:26] <klaxa> audio has to be 44.1khz
[05:26] <b1oodline> wow, really
[05:26] <b1oodline> it cannot be 48khz?
[05:26] <klaxa> nope
[05:27] <klaxa> ran into that quite some times
[05:27] <b1oodline> i am looking at 32khz flv right now
[05:27] <klaxa> hmm...
[05:27] <klaxa> let me do a quick check, last time at least it didn't support 48khz
[05:28] <klaxa> hmm... it does it now...
[05:28] <klaxa> maybe i'm mistaken
[05:30] <b1oodline> hmm flv support sorenson video but mp4 does not
[05:30] <klaxa> maybe it was only for mp3 audio?
[05:30] <klaxa> >[flv @ 0x2188380] FLV does not support sample rate 48000, choose from (44100, 22050, 11025)
[05:30] <klaxa> in general as a container i think matroska is the one mostly recommended
[05:31] <klaxa> because it's so versatile and sophisticated
[05:31] <b1oodline> but mkv has one really strange bug
[05:31] <klaxa> oh? which one?
[05:31] <b1oodline> mkv with aac does not show bitrate of aac audio
[05:31] <b1oodline> mkv with mp3/ac3 shows fine
[05:32] <b1oodline> and mp4 with aac shows fine too
[05:32] <b1oodline> i never understood that
[05:32] <klaxa> you are right
[05:33] <klaxa> maybe that was just overlooked during development?
[05:33] <klaxa> i doubt it's a matroska bug, but rather an unimplemented feature in ffmpeg
[05:33] <b1oodline> only aac + mkv combination has that problem
[05:33] <klaxa> maybe file a bugreport?
[05:34] <b1oodline> to who
[05:34] <klaxa> http://trac.ffmpeg.org/
[05:34] <b1oodline> how can such a known issue go undetected for a long time
[05:34] <klaxa> wait..
[05:34] <klaxa> what the...
[05:35] <b1oodline> mkv with mp3/ac3/vorbis shows fine
[05:35] <klaxa> mediainfo and mkvinfo don't show aac bitrates in mkv either
[05:35] <klaxa> mediainfo shows bitrate in mp4 though
[05:35] <b1oodline> exactly
[05:36] <klaxa> that's weird
[05:36] <b1oodline> check for mp3/ac3/vorbis mkv, it will show fine
[05:36] <b1oodline> so whose fault is this?
[05:36] <b1oodline> aac or mkv or ffmpeg
[05:37] <klaxa> apparently matroska
[05:38] <klaxa> i think i noticed that too once, but never bothered
[05:47] <b1oodline> i talked to people in matroska and they don't think this is mkv bug
[07:26] <Voting> OK, I'm an idiot... never used ffmpeg... I want to crunch down some tech videos so I can watch them on my phone (android) using h264 at a pretty high res but low bit rate and I want to jack up the audio volume so I can hear the stuff over the subway. Can someone right out the command line for me? Tx!!!
[10:24] <Zeranoe> To use inverse telecine in FFmpeg, how could I find the frame types for the top and bottom fields? Basically, how could I find the correct settings for my media to use in this example http://ffmpeg.org/ffmpeg-filters.html#Examples-8
[10:44] <Guest74627> hi ! ... excuse me ... is possible to generate images from canvas json object in server side ?
[13:54] <calcifea> how to run commands like 'x264 --fullhelp' that on the wiki?
[13:58] <saste> you type "x264 --fullhelp" in a terminal and press return
[14:13] <calcifea> it doesn't exist saste :)
[16:24] <edocod> Hi everyone! I'm trying to encode some videos for uploading to Youtube. I have a very powerful pc but a slow connection. What are the best settings to encode?
[16:24] <edocod> I'd like to encode in h264, 720p widescreen
[16:25] <edocod> using the more cpu/gpu i can, to have a small file but high quality
[16:28] <edocod> Reposting question for the just logged users
[16:28] <edocod> Hi everyone! I'm trying to encode some videos for uploading to Youtube. I have a very powerful pc but a slow connection. What are the best settings to encode?
[16:28] <edocod> I'd like to encode in h264, 720p widescreen
[16:28] <edocod> using the more cpu/gpu i can, to have a small file but high quality
[16:28] <klaxa> i'm no expert, but use x264 with preset veryslow and crf maybe 21 or 22 since youtube messes with that anyway
[16:29] <klaxa> that's what i would do at least, also encoding on gpu is not very sophisticated yet i think
[16:29] <edocod> thanks klaxa
[16:29] <edocod> i'll encode on cpu then, i have enough power
[16:31] <edocod> klaxa, also, what about qt-faststart? can i move meta files at the start of the file directly with ffmpeg?
[16:31] <klaxa> no idea, never done that, sorry
[16:32] <edocod> klaxa, encoding right now, thanks for everything
[16:36] <saste> edocod, yes, see the -faststart option of the mp4/mov muxer
[16:37] <edocod> saste, Unrecognized option 'faststart'
[16:37] <JEEB> -movflags faststart
[16:37] <JEEB> IIRC
[16:38] <edocod> perfect! :D
[16:39] <edocod> i'm using
[16:39] <edocod> avconv -i input.mp4 -c:v libx264 -preset veryslow -crf 21 -movflags faststart -tune animation -c:a copy -pix_fmt yuv420p output.mp4
[16:39] <edocod> and i get Could not write header for output file #0 (incorrect codec parameters ?)
[16:39] <edocod> what am i doing wrong?
[16:39] <JEEB> see what's before that
[16:39] <edocod> [mp4 muxer @ 0x388f8c0] [Eval @ 0x7fff42c655f0] Undefined constant or missing '(' in 'faststart'
[16:39] <edocod> [mp4 muxer @ 0x388f8c0] Unable to parse option value "faststart"
[16:39] <edocod> [mp4 muxer @ 0x388f8c0] Error setting option movflags to value faststart.
[16:40] <JEEB> ok, so you don't have that option :)
[16:40] <edocod> ok, i will use qt-faststart post encoding then
[16:40] <JEEB> <klaxa> that's what i would do at least, also encoding on gpu is not very sophisticated yet i think <- GPUs as such will never become useful for general purpose encoding, which is why everyone and their dog are putting ASICs on their hardware instead
[16:41] <edocod> IMHO gpu conversion could be interesting if you want to do multiple streams
[16:41] <edocod> like youtube does
[16:42] <JEEB> no
[16:42] <edocod> if you want to convert 1080p, 720p, 480p, 360p and 240p at the same time i don't think you can with a cpu
[16:42] <JEEB> GPUs are only useful for stuff where they're good at
[16:42] <edocod> games?
[16:42] <edocod> 3d rendering?
[16:42] <klaxa> floating point math
[16:42] <klaxa> hrhr
[16:42] <JEEB> think about stuff where you can throw thousands of threads that don't depend on each other onto the driver
[16:42] <JEEB> general purpose video encoding is not like this :)
[16:43] <JEEB> and yes, floating point math, although lately some GPUs have become better with integers
[16:43] <edocod> what numbers do you need to encode?
[16:44] <JEEB> most general purpose formats are bit exact so integer-based
[16:44] <JEEB> and even more important is the fact that the whole process is intertwined
[16:44] <edocod> wow 20mb for 1minute of video @ 720p
[16:45] <saste> in general we only support ffmpeg here
[16:45] <saste> i don't think avconv supports that option
[16:45] <JEEB> basically when you calculate a lot and lot of hashes you don't care if the other thread has finished already or not
[16:45] <edocod> isn't ffmpeg == avconv?
[16:45] <JEEB> they aren't related to each other
[16:46] <JEEB> a fork of ffmpeg (project) rewrote parts of ffmpeg (app) and called it avconv
[16:46] <JEEB> libav at the moment only has avconv, and ffmpeg only has ffmpeg
[16:46] <JEEB> they're similar but not exactly the same
[16:46] <edocod> so, apt-get remove avconv
[16:46] <edocod> apt-get install ffmpeg?
[16:46] <JEEB> not really, your distro uses libav
[16:46] <JEEB> so you're better off using avconv
[16:46] <JEEB> than the old ffmpeg that you might still have there
[16:46] <saste> edocod, follow the link, it will clarify
[16:47] <JEEB> because libav left the old ffmpeg binary to wither for a while
[16:47] <JEEB> without the changes
[16:49] <edocod> ok i read all the link
[16:49] <edocod> interesting, but that message is only confusing :\
[16:49] <JEEB> it only means that ffmpeg (binary) shouldn't be used within the libav project
[16:49] <JEEB> and it was then subsequently removed with the next libav release after 0.8
[16:50] <edocod> yeah, but at a first glance i thought ffmpeg was dead, and someone made a fork of it to not discontinue the project
[16:50] <JEEB> yeah, I don't disagree that the message could be better worded
[16:52] <edocod> Thank you for all the help, now i can upload videos in HD :D
[16:52] <edocod> 130mb to 25mb is a big difference to me
[16:52] <JEEB> do note that since youtube will re-encode your stuff no matter what, you will want to upload the best stuff you can there
[16:52] <JEEB> (and youtube does at times re-encode things with newer settings/whatever)
[16:52] <JEEB> so lossless is best
[16:52] <JEEB> if you can't handle lossless x264, then lossy of course :/
[16:53] <edocod> i'll try to convert with lossless, if the file size is still manageable i will convert with that
[16:55] <saste> edocod, also see: https://trac.ffmpeg.org/wiki/EncodeforYouTube
[16:55] <edocod> oh god, with lossless i get a higher size than the input file
[16:55] <edocod> saste, i'm editing the first command
[16:55] <JEEB> lossless is -crf 0 with libx264 basically
[16:55] <edocod> ffmpeg -i input.mp4 -c:v libx264 -preset veryslow -crf 0 -tune animation -c:a copy -pix_fmt yuv420p outputlossless.mp4
[16:55] <JEEB> you can remove the tune with lossless :)
[16:56] <JEEB> and yes, if your input wasn't lossless then you most probably are not gonna get a better file size from lossless
[16:56] <edocod> the input is a mp4 file from kdenlive
[16:56] <edocod> bitrate 8000
[16:56] <edocod> h264
[16:56] <JEEB> yeah
[16:57] <edocod> i'll encode from avi to mp4 in the future, i'm just testing now
[16:57] <JEEB> lossy - > lossless in general won't become smaller unless you've got some really simple stuff
[16:57] <edocod> i have animations
[16:58] <edocod> 32 animations, so many colors and shadows
[16:58] <edocod> *3d
[17:00] <DelphiWorld> hi all
[17:01] <edocod> hi!
[17:01] <DelphiWorld> hi saste !
[17:01] <DelphiWorld> Hey edocod
[17:02] <edocod> hi DelphiWorld
[17:04] <DelphiWorld> what's the best codec? aac or aacplus?
[17:04] <edocod> x264 now supports OpenCL encoding acceleration. How much acceleration you get will depend on your graphics card's performance, on my GTS 450 I get none and with slower cards it actually slows down encoding. Better cards may help. All you need to do is add --opencl to the x264 command line. I believe handbrake makes use of the same x264 libraries and does offer the same OpenCL acceleration in newer builds.
[17:04] <edocod> what's this?
[17:07] <JEEB> DelphiWorld, if you mean 'the best encoder for AAC that I can use via ffmpeg' that would fdk-aac
[17:07] <JEEB> edocod, it's ME lookahead
[17:07] <DelphiWorld> JEEB: no no, i mean the diference bethwan AAC and AAC+
[17:07] <JEEB> you mean HE-AAC and friends most probably
[17:08] <JEEB> the stuff that you get from HE-AAC and friends are meant to make low bit rate stuff sound better, but most definitely are not for actually keeping quality
[17:08] <JEEB> so if you are using enough bit rate that the encoder uses LC-AAC, you probably want to use it
[17:08] <JEEB> if you are using low enough bit rates you probably want HE-AAC or HE-AACv2
[17:09] <Mavrik> "low enough" being < 96kbps or so :)
[17:09] <DelphiWorld> lol JEEB
[17:09] <Plorkyeran> AAC+ is HE-AAC
[17:09] <DelphiWorld> JEEB: do you know libaacplus
[17:09] <JEEB> DelphiWorld, yes -- and it's a HE-AAC(v2) implementation
[17:09] <DelphiWorld> then why there is libaacplus if libfdk_aac support it?
[17:09] <edocod> ok, youtube just decided to mess my video
[17:09] <JEEB> because someone took the reference code for HE-AAC(v2)?
[17:09] <JEEB> and decided to implement an API for it?
[17:09] <DelphiWorld> lol
[17:10] <JEEB> do people really need reasons for their actions?
[17:10] <DelphiWorld> JEEB: multi lib confuse me, that's all
[17:10] <DelphiWorld> anyway see JEEB what i'm trying to do
[17:10] <JEEB> anyways, it used to be the only thing capable of HE-AAC(v2)
[17:10] <JEEB> now fdk-aac can do both LC and HE
[17:10] <DelphiWorld> what i want to do.
[17:10] <DelphiWorld> 1. fetch a RTMP stream from a RTMP Server.
[17:10] <JEEB> and fdk-aac is not based on reference code so it is of better quality
[17:10] <edocod> damn how it looks bad O_O
[17:11] <DelphiWorld> 2. transcode it to AAC (removing the VIDEO *H.264*)
[17:11] <JEEB> (or well, I lied -- it _is_ based on reference code, but so are most other things too. The fact is that it will give you a better result :P )
[17:11] <DelphiWorld> 3. push it to another RTMP Server, and fetching it out using hls from the same server
[17:11] <DelphiWorld> :P
[17:11] <DelphiWorld> so
[17:11] <DelphiWorld> the current issue is:
[17:11] <DelphiWorld> all all all working pretty well and neat and stable
[17:12] <DelphiWorld> except of the -vn is not removing my video, i still see H.264 stream using ffprobe
[17:12] <DelphiWorld> anyone know how to completly remove the video stream?
[17:12] <JEEB> -map 0:a ? Where zero is the input number
[17:12] <JEEB> that should only map the audio from that intput
[17:13] <DelphiWorld> let me ffprobe
[17:13] <JEEB> also you should see the log that ffmpeg gives
[17:13] <JEEB> if you are not outputting H.264 but you are seeing H.264 from somewhere else then that something else is either adding it or doing something else weird with metadata :P
[17:15] <DelphiWorld> JEEB: here's my cmdline:
[17:15] <DelphiWorld> nohup ffmpeg -re -i rtmp://radio.gmo.ps/live/livestream -vn -c:a libfdk_aac -profile:a aac_he_v2 -b:a 64k -ac 2-f flv rtmp://172.16.10.100:1935/myapp/alray &
[17:16] <saste> the command seems correct to me
[17:18] <DelphiWorld> saste: and h264 still exist
[17:19] <DelphiWorld> and with this: ffmpeg died
[17:19] <DelphiWorld> nohup ffmpeg -re -i rtmp://radio.gmo.ps/live/livestream -vn -c:a libfdk_aac -profile:a aac_he_v2 -b:a 64k -ac 2 -map 1:a -f flv rtmp://172.16.10.100:1935/myapp/alray &
[17:19] <JEEB> you only have one input
[17:19] <JEEB> it begins from 0
[17:19] <DelphiWorld> JEEB: isnt stream 1 is audio in my case?
[17:20] <DelphiWorld> mmmmmmmmmmmmm
[17:20] <DelphiWorld> i think i understand now
[17:20] <JEEB> -map INPUT:STREAM
[17:20] <JEEB> or stream type
[17:20] <JEEB> you could of course do -map 0:a:0
[17:20] <JEEB> that would only map the first of first input's audio tracks
[17:20] <JEEB> IIRC
[17:20] <DelphiWorld> in rtmp, am i obligated to use flv? no other container like mpeg4?
[17:21] <saste> DelphiWorld, don't think so
[17:21] <saste> but your map looks wrong
[17:21] <DelphiWorld> -f mp4 will be mpeg4, right?
[17:21] <saste> post a pastebin
[17:24] <JEEB> rtmp is flv
[17:25] <DelphiWorld> saste, pastebin: (Original Stream: http://paste.debian.net/73044/ )
[17:27] <matthias_> hi, how can i record only ingame sound with ffmpeg? I am runnign ArchLinux 64-bit.
[17:28] <klaxa> what audio... stuff are you using?
[17:28] <klaxa> alsa, pulse, jack?
[17:28] <saste> DelphiWorld, the *ffmpeg* command&output
[17:28] <klaxa> with pulse it's easy and i know how, the rest is... uhhh
[17:28] <klaxa> dunno
[17:30] <DelphiWorld> saste, ffmpeg output: http://paste.debian.net/73046/
[17:33] <saste> Stream #0:1 -> #0:0 (mp3 -> libfdk_aac)
[17:33] <saste> looks correct
[17:34] <DelphiWorld> yes, but if i do ffprobe on my stream, i still see a h264 stream
[17:34] <JEEB> that's not ffmpeg's doing then :P
[17:34] <JEEB> unless ffmpeg tells you you're outputting video
[17:35] <JEEB> and yeah, ffmpeg is only muxing aac :P
[17:35] <DelphiWorld> JEEB: lol... then my server is mad?
[17:35] <DelphiWorld> JEEB: ok, i'm going to be mad too... wait a sec
[17:35] <JEEB> I have no idea if it's mad or trying to do something in a simple way (always note a video track possible)
[17:36] <JEEB> but in any case, it's not ffmpeg
[17:37] <DelphiWorld> Ok guys, its my server
[17:37] <DelphiWorld> JEEB: ffmpeg -re -i rtmp://radio.gmo.ps/live/livestream -vn -c:a libfdk_aac -profile:a aac_he_v2 -b:a 64k -ac 2 -map 0:a -f flv /dev/shm/test.flv
[17:37] <DelphiWorld> this one output only audio to the file... my server is so mad:P
[17:40] <saste> DelphiWorld, what (RTMP?) server are you using?
[17:40] <DelphiWorld> saste: nginx rtmp module
[17:40] <DelphiWorld> no other reliable open source one exist...
[17:40] <saste> is red5 since the royal PITA it was a few years ago?
[17:40] <saste> *still
[17:41] <DelphiWorld> soryyyyyyyyyyyyyyy, kill java.
[17:46] <matthias_> klaxa: i have pulse over alsa and i want to record ingame sound from for example minecraft or l4d2
[17:46] <matthias_> klaxa: could you explain me how please?
[17:47] <klaxa> do you have anything else running that produces sound while playing?
[17:47] <klaxa> or could there be something that produces sound during gameplay? like instant messaging?
[17:48] <klaxa> you can isolate the game-sound or just record the monitor of your output
[17:48] <matthias_> klaxa: yes, i have a skype call while playing coop games for example
[17:48] <matthias_> klaxa: my mic and skype output
[17:48] <klaxa> in that case you need a loopback module to isolate the game-sound
[17:48] <klaxa> i'm not too sure about latency now that i think abou tit
[17:48] <klaxa> *about it
[17:48] Action: DelphiWorld express vm to saste
[17:49] <klaxa> let me try to draw what you will do
[17:49] <matthias_> klaxa: will i have to create this loopback module for every game or only once?
[17:49] <matthias_> klaxa: yes drawing is always good :D
[17:49] <klaxa> you will have to set that up every time you want to record something
[17:50] <matthias_> klaxa: ok, but maybe i can put it into my recording script
[17:50] <klaxa> oh definitly scriptable
[17:52] <matthias_> klaxa: if your painting is ready, can you show me how to create this modules please?
[17:53] <klaxa> http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/ read null and loopback modules
[17:55] <matthias_> klaxa: i also have the pavucontrol, but won't be needed if i will do it by a script
[17:56] <matthias_> klaxa: i read null module and loopback module
[18:00] <klaxa> matthias_: http://klaxa.eu/record%20game%20audio.svg
[18:01] <matthias_> klaxa: i understand...
[18:02] <klaxa> you can do all that with pavucontrol
[18:02] <klaxa> except the module loading
[18:02] <klaxa> once you figured it out and got it working with pavucontrol, you can script it
[18:02] <klaxa> like i said, i'm not too sure about audio delay with the loopback module
[18:03] <matthias_> klaxa: we can check and see if it is noticeable
[18:06] <matthias_> klaxa: correct me pls if i am wrong. i did pacmd and then list-sink-inputs
[18:06] <matthias_> klaxa: then i search the input index
[18:08] <klaxa> sounds about right
[18:08] <matthias_> klaxa: so minecraft/java has index number 3
[18:08] <klaxa> mmmhh i wouldn't bet on that
[18:08] <klaxa> right now it has, but those numbers are dynamic
[18:08] <matthias_> klaxa: but they will only change if i restart?
[18:09] <matthias_> klaxa: or from time to time?
[18:09] <klaxa> yeah if the audio stream is established it keeps its index
[18:09] <klaxa> but if you quit minecraft and like... start a mediaplayer and then start minecraft again the index might be different already
[18:10] <matthias_> klaxa: yes i understand
[18:10] <matthias_> klaxa: after that create the null-sink with name game: pactl load-module module-null-sink sink_name=game
[18:11] <matthias_> klaxa: will the sink be deleted if the index changes or when?
[18:11] <klaxa> oh i've never looked that far into it
[18:11] <klaxa> what i did was way uglier with grep and sed
[18:11] <klaxa> just read help pages and test :)
[18:14] <matthias_> klaxa: if i do pactl move-sink-input 3 game i get bad parameter
[18:17] <klaxa> matthias_, sorry no idea, that should be correct :/
[18:19] <matthias_> klaxa: have you got a working example for me, because i am a little confused
[18:21] <klaxa> well this is what i do to record the monitor of my output and an external usb soundcard: https://gist.github.com/klaxa/8172532
[18:32] <matthias_> klaxa: how do i get my source in set-default-source?
[18:32] <matthias_> klaxa: when i do pacmd set-default-source alsa_output.pci-0000_00_1b.0.analog-stereo it says source does not exist
[18:36] <matthias_> klaxa: ok the sound is now redirected into the null sink, but i can't hear it
[18:50] <PowerCC> hey JEEB
[18:56] <PowerCC> my hardware is only happy with -vb 5000k I have tried every combo.
[18:57] <matthias_> klaxa: i want to hear the ingame sound
[19:00] <klaxa> that's what the loopback module is there for
[19:00] <JEEB> PowerCC, what are its official limitations in specs?
[19:00] <matthias_> klaxa: i created one, but nothing
[19:00] <JEEB> also what kind of media are you reading the stream off of?
[19:00] <klaxa> did you set the correct sources and sinks?
[19:00] <klaxa> souce is the game, sink is your default output
[19:00] <JEEB> also, for control of bit rate you should use VBV
[19:00] <JEEB> which is -maxrate and -bufsize
[19:00] <JEEB> because -b:v/vb only sets the average rate over the WHOLE video
[19:00] <JEEB> which really doesn't help if the spikes are the problem
[19:00] <matthias_> klaxa: maybe i have a wrong source, how can i get the name of the gamesource?
[19:00] <PowerCC> the minute the rate goes below 5000k the tivo won't play.
[19:01] <PowerCC> it's possible due to a really old project being used (stream baby)
[19:01] <klaxa> in pavucontrol you can select the sink of the game in the applications tab
[19:01] <klaxa> the monitor of that sink is your source for the loopback module
[19:01] <PowerCC> so it's possible this is more of a software limit vs hardware
[19:01] <JEEB> what... how would the minimum rate have anything to do with it o_O
[19:02] <PowerCC> JEEB: so -vbv 5000k -maxrate 5000k and -bufsize ?
[19:02] <JEEB> no, maxrate and bufsize control the bit rate, so it keeps within the set limitations
[19:02] <JEEB> those are VBV settings
[19:03] <PowerCC> i see
[19:03] <JEEB> but you should really set the limits accordingly to your hardware's specifications
[19:03] <JEEB> and/or the limitations of your media
[19:03] <PowerCC> -vb 5000k has worked flawleslly
[19:03] <JEEB> be it network or discs or whatever
[19:03] <JEEB> that doesn't make sense!
[19:03] <PowerCC> -vbv will take more space?
[19:03] <PowerCC> i agree... that's why i am here ;)
[19:03] <JEEB> -vbv is not an option, maxrate and bufsize are VBV settings!
[19:04] <JEEB> they are called vbv-maxrate and vbv-bufsize in x264, ffmpeg calls them -maxrate and -bufsize
[19:04] <PowerCC> JEEB: this might give you an idea: https://code.google.com/p/streambaby/wiki/video_compatibility
[19:04] <JEEB> anyways, now please tell me if the difference between working/non-working is ONLY the overall average bit rate set versus CRF rate control?
[19:04] <PowerCC> however it used to work with older ffmpeg
[19:05] <PowerCC> default CRF or any other CRF settings do not work AT ALL
[19:05] <JEEB> goddamnit
[19:06] <JEEB> answer my question
[19:06] <JEEB> also no, that page tells you absolutely nothing
[19:07] <PowerCC> working = average nitrate must be 5000k
[19:07] <JEEB> NO
[19:07] <JEEB> also answer my goddamn question already
[19:07] <PowerCC> CRF rate control did not work for me
[19:07] <PowerCC> not even if i got close to 5000k avg.
[19:08] <JEEB> don't fucking squeal around, answer the goddamn question
[19:08] <PowerCC> not sure what your asking...
[19:08] <JEEB> was the only difference between working and non-working the rate control set?
[19:08] <PowerCC> YES
[19:08] <JEEB> thank you
[19:08] <JEEB> now post both command lines
[19:08] Action: PowerCC sending JEEB coffee!
[19:09] <JEEB> now, your general note seems to be rather false at least according to "NOTE: In the above you can adjust video bit rate (-b 5000k) to be higher or lower depending on quality desired, for example using -b 2000k for SD sources." On the other hand, it might be a VBV violation or whatever, CRF is after all free'er to do random stuff with the rate without any limitations.
[19:09] <PowerCC> ok first command just defaults ffmpeg -i -c:a copy -c:v libx264
[19:10] <matthias_> klaxa: my sink input index is 95 and the module null sink index is 7. why is pacmd move-sink-input 95 7
[19:10] <matthias_> klaxa: failing?
[19:10] <PowerCC> so i also tried -crf 20 and 18
[19:10] <PowerCC> i tried -vb 4500k no go
[19:11] <PowerCC> only -vb 5000k with the defaults commands... ffmpeg -i c:a copy c:v libx264 -vb 5000k
[19:11] <JEEB> is this all with the same input file?
[19:11] <PowerCC> yes
[19:11] <PowerCC> but i have tried others
[19:11] <JEEB> anyways, what kind of output are you doing?
[19:12] <PowerCC> it's movies
[19:12] <PowerCC> 720p mostly.
[19:12] <JEEB> file format...
[19:12] <JEEB> container
[19:12] <JEEB> :V
[19:12] <PowerCC> .mp4
[19:12] <JEEB> ok
[19:12] <JEEB> that article notes that you will want to have the index in the beginning, so you will want to have -movflags faststart
[19:13] <JEEB> (although if it actually worked already it sounds like bullshit, but still)
[19:14] <PowerCC> i included the flags no go
[19:14] <JEEB> anyways, you should really find out proper specs for the decoder :P
[19:14] <JEEB> to know what VBV parameters you need
[19:14] <PowerCC> it's a waste of space, but i'd live with it... just wanted to know why but then again it's all software/hardware crap
[19:15] <PowerCC> it's a broadcom decoder... let me look for it.
[19:15] <PowerCC> -copyts did not help either (timestamp)
[19:16] <JEEB> stop throwing random stuff on the wall
[19:16] <PowerCC> it's based on that silly page
[19:16] <JEEB> forget about it
[19:17] <JEEB> heck, it uses bit rate rate control and sets sameq at the same time (latter is not what you think it might mean)
[19:17] <PowerCC> i will tell you this, if i manually transfer the videos to my tivo's hdd anything i throw at it but .avi (xvid) playback perfectly.
[19:17] <JEEB> it's completely obvious that it was written by people who have absolutely no idea about things
[19:17] <PowerCC> so i strongly believe it's the stream baby HME app that's screwing it up and wanting 5000k
[19:17] <PowerCC> eggs-actly!
[19:18] <PowerCC> so the page i sent you was written by the same java lover app
[19:18] <PowerCC> the pytivo project ALOT more mature and will actually use ffmpeg to transcode only the audio to ac3 and -copy vid from .mkv and such
[19:19] <PowerCC> however it requires the content to be copied, stream baby uses my tivo 30 minutes pause buffer
[19:19] <PowerCC> yuck, think i just put salt in my coffee
[19:19] <PowerCC> also it's near miracle it's even working my my Mac with Java completely abandon.
[19:20] <matthias_> klaxa: i can move my firefox youtube, but not my minecraft, why?
[19:20] <PowerCC> the weird thing it's not picky about picture size
[19:20] <PowerCC> just odd
[19:20] <JEEB> anyways, 1) I can have no idea about what the hell the custom software layer is doing and 2) all you generally should care about are levels and VBV
[19:21] <JEEB> in other words, refs and VBV
[19:21] <JEEB> find actual information, apply actual thought, handle it
[19:21] <matthias_> klaxa: the two i can move have s16le 2ch 44100Hz but minecraft has float32le 2ch 44100Hz
[19:21] <JEEB> :V
[19:21] <PowerCC> defaults refs is 3
[19:22] <JEEB> that depends on the preset if it's x264's default that you mean
[19:22] <PowerCC> well 9 and 4 is for 720p and 1080p respectively
[19:23] <JEEB> so basically you have to calculate the maximum amount of usable refs from the resolution (amount of macroblocks) and the level you are trying to abide to
[19:23] <PowerCC> both work as long as stupid bitrate is 5000k
[19:23] <JEEB> the resolution should have nothing to do with what x264 selects
[19:23] <PowerCC> specs, the maximum refs for 720p and 1080p video are 9 and 4 respectively.
[19:23] <PowerCC> if adhering to 4.1
[19:24] <JEEB> ok, so you were talking about that
[19:24] <JEEB> yup
[19:24] <JEEB> so just make sure that calculation was correct, and limit the refs to those values when encoding
[19:24] <PowerCC> going to try -vbv 5000k
[19:24] <PowerCC> instead of -vb
[19:25] <JEEB> <JEEB> -vbv is not an option, maxrate and bufsize are VBV settings!
[19:25] <JEEB> <JEEB> they are called vbv-maxrate and vbv-bufsize in x264, ffmpeg calls them -maxrate and -bufsize
[19:27] <PowerCC> -vb 5000k -maxrate 5000k -minrate 2000k -bf 2 -bufsize 1835008 foobar.mp4
[19:27] <PowerCC> like that
[19:27] <JEEB> don't set minrate
[19:27] <JEEB> seriously
[19:28] <PowerCC> oh
[19:28] <JEEB> maxrate and bufsize
[19:28] <JEEB> bf shouldn't matter
[19:28] <PowerCC> i'll take bf out
[19:28] <PowerCC> lets see
[19:28] <JEEB> also your stuff still hurts my eyes so please go find out where the weird bandwidth limitations come from
[19:28] <JEEB> and please don't just put random VBV variables in
[19:29] <PowerCC> you referring to stream baby reference page? ;)
[19:29] <JEEB> I'm not referring to anything
[19:29] <PowerCC> does my -bufsize calculation ok?
[19:30] <JEEB> those are random numbers as far as I can see
[19:30] <JEEB> both for maxrate and bufsize
[19:30] <JEEB> I'm not being a dick, I'm just saying that you should find correct things to base your settings on top of instead of random slapping of things on the wall and hoping something sticks
[19:31] <PowerCC> what's a good bufsize for 720p source?
[19:31] <JEEB> and if the weird bandwidth limitations or whatever are coming from the third party app, you should start poking it -- or seeing if there's an alternative
[19:32] <JEEB> there is no "good VBV variable", except maybe for level limitations. So far your values are based on random stuff and I'd like you to instead actually learn the actual limitations
[19:32] <JEEB> even if it means to read the source code of the third party applications or whatever
[19:33] <PowerCC> ok, i thought my needs were very basic - it's starting to hurt my head.
[19:33] <PowerCC> was trying to avoid handbrake
[19:34] <JEEB> well basically you have some unknown variables there and instead of just setting something random and hoping it works it'd be better to actually find the limitations and if they can be modified if it's a software thing
[19:34] <PowerCC> i'd be a happy man if this freaking tivo/streambaby would simply play default -crf values
[19:34] <PowerCC> i don't need anything fency.
[19:35] <JEEB> well at the very least you have to abide to the levels
[19:35] <JEEB> with VBV and refs
[19:35] <JEEB> and then possible extra limitations of the decoder chip, if such exist
[19:35] <PowerCC> by setting a -maxrate 5000k it will actually not use 5000k throughout the video, right?
[19:35] <JEEB> PLUS whatever limitations the software you're using might be imposing
[19:35] <JEEB> maxrate and bufsize work as a combination, not by themselves
[19:35] <PowerCC> ok, i'll have to use my random value then.
[19:35] <PowerCC> testing now...
[19:36] <JEEB> basically, it will never go over average rate of maxrate over bufsize
[19:36] <PowerCC> it sure putting a toll on the processing time
[19:36] <JEEB> it shouldn't :P
[19:36] <PowerCC> i was getting 70+ fps now only 40
[19:36] <JEEB> then there's something else doing things around
[19:37] <JEEB> VBV itself shouldn't slow stuff down like that
[19:37] <PowerCC> my random bufsize probably not helping
[19:37] <JEEB> anyways, if you want to set some random VBV limitations, use the level's :|
[19:37] <JEEB> after all, the specification contains it all
[19:37] <PowerCC> ffmpeg spit out Use -pix_fmt yuv420p for compatibility with outdated media players.
[19:38] <JEEB> ok, so that's the reason why it's going slower
[19:38] <JEEB> you're encoding non-4:2:0 content now
[19:38] <PowerCC> i c
[19:38] <PowerCC> and this
[19:38] <PowerCC> [mp4 @ 0x102800000] track 1: codec frame size is not set
[19:38] <JEEB> -pix_fmt yuv420p on the encoding settings' side will make ffmpeg convert the stuff into 4:2:0
[19:38] <JEEB> I have no idea about that :P
[19:38] <PowerCC> ha
[19:39] <JEEB> also just single lines don't really help
[19:39] <PowerCC> the funny thing is the video played back just fine on tivo now
[19:39] <PowerCC> i am just puzzled with this streamBaby
[19:39] <PowerCC> vid is around 4400k
[19:40] <JEEB> have fun looking how it's built and what it's based on :P
[19:40] <PowerCC> yeah
[19:40] <JEEB> that's your Last Boss :P
[19:40] <PowerCC> i agree
[19:40] <Zeranoe> To use inverse telecine in FFmpeg, how could I find the frame types for the top and bottom fields? Basically, how could I find the correct settings for my media to use in this example http://ffmpeg.org/ffmpeg-filters.html#Examples-8
[19:40] <PowerCC> at least you recommendation is saving me a few megabytes here and htere
[19:40] <PowerCC> thanks
[19:41] <JEEB> Zeranoe, I think it could grab the order automagically with another setting?
[19:41] <JEEB> otherwise it seems like the yadif after fieldmatch just deints only interlaced pictures, and then there's decimation
[19:43] <Zeranoe> Well I have no idea if my source is interlaced or inverse telecine, so I'm not sure which to apply
[19:44] <JEEB> time to pick a moving scene, output field by field and then go through it? first look at every second field and look if you have a different picture 1-2-3-4-5 or 1-2-3-4-4 (latter has one duplicate), and then you start checking every field, and see if you have two fields comprising of one picture, or if every field is its own picture
[19:45] <JEEB> the latter check checks if you want to deint or fieldmatch, and then the first check tells you if you need to decimate (remove the duplicate)
[19:45] <matthias_> How can i know record a null module with ffmpeg?
[19:45] <clever> that reminds me, i'm getting seriously out of order frames from the omx decoder
[19:45] <clever> JEEB: would interlacing cause it to skip back several frames and repeat frames silently?
[19:46] <Zeranoe> JEEB: how do i output field by field?
[19:46] <JEEB> unfortunately you will have to figure out what way is the simplest for you for that. I'm too used to avisynth for that, I guess vapoursynth makes it possible as well
[19:47] <JEEB> possibly mplayer/mplayer2/mpv? I just have no idea
[19:47] <JEEB> yadif also has a mode to output every field as its own picture, so you could check with that, although it will apply deint so it's not like you're looking at the fields as-is from the source...
[19:50] <matthias_> klaxa: i figured it out now, but i need some help with the scripting
[19:56] <JEEB> Zeranoe, basically ffmpeg is great for fully automated stuff, while if you start wanting to do stuff properly you kind of end up needing something else to check out various things :) Esp. when you start having to do commercial/ad cutting and actually picking the right way to make interlaced stuff progressive :)
[19:57] <JEEB> although the fieldmatch/decimate filters have kind of partially removed some of the need (as in, you can do it -- but if you really have something like a TV airing with both interlaced and telecined content... and ads and the show itself... oh boy)
[00:00] --- Mon Dec 30 2013
More information about the Ffmpeg-devel-irc
mailing list