burek021 at gmail.com
Sun Dec 29 02:05:01 CET 2013
[02:56] <kgp705> hi:)
[02:57] <kgp705> i need some help
[11:07] <Zeranoe> if a file has a 720x480 resolution, and a 16:9dar,what is the actual dimension of the video playback
[11:26] <viric> it depends on the sar
[11:26] <viric> ah no
[11:27] <viric> well, 16/9 = 720/480 * sar
[11:56] <Floris497> good morning
[11:57] <Floris497> i want to run ffserver on a server but is it https only and i cant get to the /status.html
[12:04] <Floris497> can someone help me?
[12:09] <AndrzejL> guys any "official" THE BEST howto of ripping dvd movie chapters to single avi files?
[12:09] <AndrzejL> coz googling gets many hits but I dont need many I need one - THE ONE ;D
[12:12] <AleXoundOS> AndrzejL, maybe using ffmpeg concat demuxer/protocol https://trac.ffmpeg.org/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files
[12:12] <AndrzejL> Will check it out AleXoundOS thanks
[12:42] <Floris497> does anyone know anything about ffserver? (am i on the richt place?)
[12:44] <ShorTie> i would think your in the right place and some peeps know about ffserver, but it might be they are all asleep right now
[12:47] <Floris497> ShorTie: ah oke, will try later then
[13:10] <theholyduck> Floris497, good rule of thumb for irc
[13:10] <theholyduck> if you have a question. ask it propperly.
[13:10] <theholyduck> and completely
[13:10] <theholyduck> and then wait :P
[13:11] <theholyduck> often sumarized as, dont ask to ask, just ask
[13:11] <Floris497> theholyduck: ah, but the problem is i don't really know what the problem is :S
[13:12] <theholyduck> well then, you hae a problem guess
[13:12] <Floris497> i have ffserver running on an remote server but i cant connect to the /status.html
[13:13] <Floris497> think it's becoase it behind a firewall, the server is from my school
[13:23] <lkiesow> Floris497: I guess you either have to configure the firewall or tunnel http over an available acces method
[13:23] <lkiesow> i.e. SSH
[13:23] <Floris497> i can ssh, but i cant open streams or status.html, and i have no sudo rights (school server)
[13:28] <iive> sshd have the ability to forward ports, ssh even supports socks4/5 in order to work as tunneling proxy. Usually this is disabled on the sshd, but...
[13:28] <iive> you can at least try it.
[13:30] <Floris497> iive: oke, i have no knowledge of how that works, will look into that, i'm going to ask the systemadmin if he can do something for me.
[13:32] <jacob___> what is ffserver?
[13:32] <jacob___> never heard of it, i will google
[13:34] <Floris497> jacob___: server stream tool for redistributing streams
[13:35] <jacob___> mmm,.., why isnt a url to a flat file (mp4) sufficient ?
[13:36] <jacob___> oh its for live streaming)))
[13:36] <iive> Floris497: btw, you may try tcptraceroute to figure out if the port is open.
[13:36] <iive> or just nmap -p 80
[13:36] <jacob___> ffserver sounds awesome,,.., like your own private broadcasting,..., can you do subtitles
[13:37] <Floris497> i have it running on an other port, but the server is realy big cant just use port 80
[13:38] <iive> well, i gave 80 as it is the default http port... `man nmap`
[13:46] <jacob___> can someone point me to a broadcast that uses ffmpeg?
[13:46] <jacob___> i just want to see it working from the client side
[13:46] <jacob___> what kind of client is needed? web? or an audio/video player?
[14:09] <lkiesow> Floris497: If ffserver serves on port 8080 try something like:
[14:09] <lkiesow> ssh -L 8080:localhost:8080 -o ServerAliveInterval=15 user at server.com
[14:10] <lkiesow> This will listen to the port 8080 and, transmit te request to the remote host and forward it there to localhost:8080
[14:10] <Floris497> lkiesow: what does that do
[14:10] <Floris497> so i can acces it by localhost on my computer
[14:10] <lkiesow> So you can access it locally via http://localhost:8080
[14:10] <Floris497> *localhost:8080
[14:10] <lkiesow> jep
[14:11] <Floris497> lkiesow: ah thanks going to try that :)
[14:12] <lkiesow> A more general approach is to creat a ssh socks proxy using ssh -D PORT REMOTEADDR
[14:12] <Floris497> first trying this :)
[14:12] <lkiesow> With that you can use your remote host as a general proxy for your rowser
[14:15] <Floris497> lkiesow: ssh -l works, how do i break it? closing the ssh?
[14:16] <Floris497> lkiesow: this is cool thanks, now it probably wil work :) many thanks
[14:18] <Floris497> lkiesow: very happy right now, didn't know this was even posible
[14:26] <lkiesow> Having access via ssh basically means that you can access all services in the internal network. It is quite convinient :)
[14:36] <Floris497> so many ssh windows..
[15:18] <Broomhandle> The .avi video files produced from DOSbox when recording seem to be damaged. When I try to heal them with ffmpeg, I get all sorts of errors. Usually, all files can be healed/converted in ffmpeg.
[15:22] <AleXoundOS> I'm copying video from HLS stream to twitch.tv using flv rtmp output. http://www.twitch.tv/snipealot1
[15:22] <AleXoundOS> but image gets distorted once a second or 2
[15:23] <AleXoundOS> if I restart stream sometimes it gets better
[15:25] <AleXoundOS> better check twitch.tv/snipealot4
[15:25] <AleXoundOS> maybe I need to specify some muxer parameters or something is wrong with output container?
[16:09] <Rasi> ffmpeg -r 25 -f x11grab -s 2560x1440 -quality good -cpu-used 0 -b:v 5000k -qmin 10 -qmax 42 -bufsize 1000k -threads 4 now.webm
[16:09] <Rasi> can anyone tell me whats wrong with this command?
[16:09] <Rasi> it complains that x11grab is not a valid option. same thing for the filename (now.webm)
[16:19] <Rasi> ok, got it
[16:19] <Floris497> what was wrong?
[16:20] <Floris497> ffmpeg: error while loading shared libraries: libx264.so.140: cannot open shared object file: No such file or directory
[16:21] <Floris497> what do i do?
[16:21] <AleXoundOS> Floris497, install x264 dependency
[16:21] <Floris497> AleXoundOS: how?
[16:21] <AleXoundOS> Floris497, what distribution do you use?
[16:21] <Floris497> debian armhf
[16:22] <Floris497> just recompiled ffmpeg with x264 (3 hours)
[16:22] <Floris497> now it does nothing
[16:23] <AleXoundOS> Floris497, not sure if debian arm has already x264 package with .140 version
[16:23] <AleXoundOS> Floris497, do you compile ffmpeg manually?
[16:23] <Floris497> yep
[16:24] <Rasi> Floris497: missing -i $DISPLAY+0,0
[16:24] <AleXoundOS> then I think you'll have to compile recent x264 package too
[16:24] <Floris497> i did
[16:24] <AleXoundOS> Floris497, "ls -l /usr/lib/libx264*"
[16:25] <Floris497> ls: cannot access /usr/lib/libx264*: No such file or directory
[16:25] <Floris497> sudo find / -iname 'libx264.so.*'
[16:25] <AleXoundOS> found something?
[16:26] <Floris497> cant post?
[16:26] <Floris497> :s
[16:26] <Floris497> got: /usr/local/lib/libx264.so.140 /usr/lib/arm-linux-gnueabihf/libx264.so.123 /usr/src/x264/libx264.so.140
[16:27] <Floris497> AleXoundOS: do i need to link thinks?
[16:27] <Floris497> *things
[16:27] <AleXoundOS> hm, maybe ffmpeg cannot find the library in /usr/local/
[16:27] <AleXoundOS> /lib/
[16:27] <AleXoundOS> Floris497, I think it will work if you link it manually
[16:28] <AleXoundOS> Floris497, but it's not considered to be a good way
[16:28] <Floris497> you know how i link?
[16:28] <Floris497> not very clean
[16:28] <AleXoundOS> Floris497, probably you had to specify installation output directory when doing "make install" for x264
[16:29] <Floris497> do i need to install x264 again?
[16:29] <Floris497> of ffmpeg?
[16:29] <AleXoundOS> as you wish
[16:29] <Floris497> *or
[16:29] <AleXoundOS> no, ffmpeg is fine I think
[16:29] <AleXoundOS> Floris497, ln -s /usr/local/lib/libx264.so.140 /usr/lib/libx264.so.140
[16:29] <Floris497> ffmpeg: error while loading shared libraries: libfaac.so.0: cannot open shared object file: No such file or directory
[16:30] <Floris497> think i followed the wron tutorial..
[16:30] <AleXoundOS> go with same algorithm, find libraries, link them to /usr/lib/ if you want to make it work quickly
[16:31] <AleXoundOS> or add /usr/local/lib path to "PATH" environment variable
[16:31] <AleXoundOS> env|grep /usr/lib| grep PATH
[16:31] <klaxa> PATH? not in your /etc/ld.so.conf.d/some_config.conf?
[16:32] <Floris497> AleXoundOS: that does not output anything
[16:32] <klaxa> or is archlinux being bleeding edge again?
[16:32] <AleXoundOS> klaxa, he uses Debian ARM
[16:32] <klaxa> oh
[16:32] <klaxa> ah
[16:33] <klaxa> isn't it LD_LIBRARY_PATH anyway?
[16:33] <AleXoundOS> maybe
[16:33] <AleXoundOS> I'm not a Debian user, I dunno
[16:35] <AleXoundOS> Floris497, so figure out how to add /usr/local/lib path as a library path in your distribution
[16:35] <Floris497> AleXoundOS: oke thaks for the help
[16:35] <Floris497> *thanks
[16:35] <Floris497> was very usefull
[16:35] <AleXoundOS> ))
[17:03] <jacob___> hi
[17:03] <jacob___> I have a question about \Roaming\Bitcoin\blocks
[17:03] <jacob___> i see 2 kinds of file
[17:03] <jacob___> rev00xxx.dat
[17:03] <jacob___> and blk000xx.dat
[17:04] <jacob___> whats that?
[17:06] <jacob___> oh shit
[17:06] <jacob___> wrong channel sorry
[17:10] <clever> been there, done that
[19:08] <Malinux> trying to split a mkv-video. I used this command: "ffmpeg -acodec copy -vcodec copy -ss 00:06:52 -t 02:19:18 -i The\ Testamente\ of\ Dr\ Mabuse\ 1933\ 576p.mkv The\ Testamente\ of\ Dr\ Mabuse\ 1933\ 576pp.mkv" I got this error-message: "[matroska @ 0x22ff560] pts < dts in stream 0
[19:08] <Malinux> av_interleaved_write_frame(): Invalid argument"
[19:24] <AleXoundOS> try to put "-i <VIDEO_FILE>" between -ss and -t options
[19:25] <PowerCC> Hi, I'd like to upscale a video from 720x400, how would I apply variable bitrate?
[19:26] <PowerCC> currently I am using -coder ac -level 41 -s hd720 -vb 5000k is that too high?
[19:26] <Malinux> AleXoundOS: ok
[19:27] <Malinux> AleXoundOS: That results in the same error message
[19:35] <Malinux> AleXoundOS: I have done this earlier and it works. So I don't know why it does not work anymore
[20:00] <Floris497> do i need a lot of power for a 720p stream?
[20:01] <Floris497> i cant get a nice stream, it lags few seconds and then continues on superspeed
[20:01] <Floris497> using ffmpeg and ffserver
[20:03] <relaxed> Malinux: use mkvmerge
[20:03] <Floris497> that is?
[20:04] <relaxed> a tool for dealing with matroska files
[20:04] <relaxed> PowerCC: which codec?
[20:05] <relaxed> Floris497: yes to you your streaming question.
[20:05] <Floris497> relaxed: can you help me?
[20:06] <relaxed> perhaps, but I don't have much experience with ffserver.
[20:11] <Floris497> relaxed: then ik go back to google :p
[20:19] <Malinux> relaxed: ok
[20:20] <relaxed> Malinux: look at --split in the mkvmerge man page
[20:24] <Malinux> relaxed: aha :) I see, I checked out the gui and couldn't find split :) I check out the cli-version instead :)
[20:24] <relaxed> man mkvmerge|less +/' --split'
[20:25] <Malinux> is it in the mkvtoolnix package?
[20:25] <relaxed> yes
[20:25] <Malinux> ok :)
[20:28] <PowerCC> libx264
[20:30] <relaxed> PowerCC: https://trac.ffmpeg.org/wiki/x264EncodingGuide
[20:31] <PowerCC> should be the same for avconv?
[20:31] <JEEB> generally yes
[20:32] <PowerCC> hey JEEB
[20:33] <PowerCC> -x264opts not working with avconf
[20:33] <JEEB> most of the stuff you set with x264opts has its own settings, and I'm pretty sure nowadays ffmpeg's ffmpeg has the same features
[20:34] <JEEB> (since that stuff mostly if not completely gets merged)
[20:34] <PowerCC> k
[20:34] <JEEB> as for setting specific settings I wonder if it was x264-params
[20:34] <JEEB> but really, first thing you should do is check if those settings you're setting have a separate setting :P
[20:34] <PowerCC> to overwrite defaults
[20:35] <PowerCC> i am mostly interested in hardware compatibility.
[20:35] <PowerCC> so i should be ok with defaults.
[20:35] <JEEB> then you're mostly interested in -refs
[20:35] <JEEB> which sets the amount of ref frames, so that you can be sure that x264 doesn't try to set more of them than your level lets you use
[20:35] <JEEB> x264's cli encoder auto-limits refs when you use --level
[20:35] <JEEB> but libx264 doesn't
[20:35] <JEEB> -level just sets the flag
[20:36] <PowerCC> i used to just put -coder ac -level 41
[20:36] <PowerCC> forces 4.1 profile
[20:36] <JEEB> that just sets the flag
[20:36] <PowerCC> i see
[20:36] <JEEB> as for -coder ac I have no idea
[20:37] <PowerCC> no one can know it all ;)
[20:37] <JEEB> but I have a feeling you're possibly doing something wrong
[20:38] <Malinux> relaxed: I tried, but it splits the film into several files. What I want is to shave away the first 6 minutes and 52 seconds and leave the rest into a single file
[20:39] <PowerCC> all my output plays just fine now, i am just trying to have a better understanding what each function does and that my output is set for size&quality ratio.
[20:39] <PowerCC> i also noticed subtitles filter -vf subtitle no longer works with avconf but c:s does
[20:40] <JEEB> yes, that filter is not in libav
[20:40] <PowerCC> libass
[20:40] <JEEB> I recommend you poke them if you want them to add it
[20:40] <PowerCC> will do.
[20:40] <JEEB> also, well, first of all you're leaving out something that you would have to have in order to have the stream be compliant with all presets for that level
[20:41] <JEEB> second of all please find out what exactly -coder ac does
[20:41] <JEEB> and thus you can find out if you're doing something immensely stupid or not
[20:41] <PowerCC> all i know about -coder ac is that it displays high profile 4.1 vs 3.1 (default)
[20:41] <PowerCC> but my output plays back just fine without -coder as well.
[20:42] <JEEB> that's one crappy way of having a setting set
[20:42] <JEEB> please actually find out what it does, and then we can continue the discussion
[20:44] <PowerCC> it appears to only set a flag for 4.1 high profile.
[20:44] <JEEB> no
[20:45] <JEEB> cause versus effect
[20:46] <relaxed> -coder ac enables cabac
[20:46] <PowerCC> according to help ac=arithmetic coder
[20:46] <relaxed> you should be using a preset instead of setting it, though
[20:46] <PowerCC> can also set variable length with -coder
[20:47] <PowerCC> that's just it, i am reading the link relax sent to see which profile will provide that
[20:47] <PowerCC> i am pretty much down to only that extra -coder ac -level 41
[20:47] <PowerCC> the rest is all preset
[20:51] <PowerCC> i'll use -profile:v high -level 4.1 from now on
[20:51] <PowerCC> i will test high10 on my Roamio as it should work
[20:54] <PowerCC> i am not finding any preset that will use best -vb for hd720
[20:54] <PowerCC> i have to indicate -vb bitrate?
[20:54] <PowerCC> default values seem too low
[20:55] <ffmpegger> Dept. Of Silly Questions: I know what padding is in ffmpeg but what is a "pad" ?
[20:56] <ffmpegger> Many error messages reference it....
[21:03] <PowerCC> relaxed: -profile:v high -level 4.1 does not work, what am i doing wrong?
[21:03] <PowerCC> leaving -level 4.1 sets flag to level 3.1
[21:04] <JEEB> <relaxed> -coder ac enables cabac <- ugh, you need to be using a very, very high-speed preset to have CABAC disabled :/
[21:05] <PowerCC> so here is what i have so far without having to provide -vb #
[21:05] <JEEB> PowerCC, having a lower level set is never a bad thing, though. Neither is profile. It just means that you're not using the features that would make it select a higher profile/level.
[21:05] <PowerCC> -threads 4 -c:a copy -c:v libx264 -profile:v high -tune film -s hd720
[21:06] <JEEB> do you want your output be of specific size (not caring about the quality), or do you want to have "constant quality" and not care about having an exact file size
[21:06] <JEEB> because when picking the rate control mode you pick one of those two
[21:07] <PowerCC> i care more about quality, i'd say quality-60% size-40%
[21:07] <ffmpegger> Anybody?
[21:07] <JEEB> compression capabilities are the same with CRF and 2pass ABR, so if it goes over it means that the source needs more rate :P
[21:07] <JEEB> (for that "rate factor")
[21:08] <JEEB> in other words, your use case sounds like you'd want to use CRF
[21:08] <JEEB> which is -crf
[21:08] <JEEB> default is 23
[21:08] <PowerCC> size not a major concern for me but of course i don't want to get over 5gb for under 2 hours worth of video.
[21:08] <JEEB> basically encode tests with 4000-5000 frames of content
[21:08] <JEEB> and pick the highest crf value that still looks good
[21:09] <PowerCC> got it
[21:09] <JEEB> so start at 23 (the default), and then go up if it looks good, and down if it looks bad
[21:09] <PowerCC> i'll use default and check for now...
[21:09] <PowerCC> thx
[21:09] <JEEB> basically looking at your pasted settings
[21:10] <PowerCC> i'd probably yank -tune film out
[21:12] <JEEB> video related stuff would go: -c:v libx264 -crf 23 -preset medium -level 41 -refs XX -vf scale=trunc(iw*sar/(ih/oh)/hsub)*hsub:720
[21:12] <PowerCC> 23 looks just fine
[21:12] <JEEB> set refs according to your resolution
[21:12] <JEEB> (and level)
[21:13] <JEEB> at this point I'm really wanting to put level limiting for refs into the libx264 wrapper... but I'll still probably end up being too lazy
[21:13] <JEEB> Because hardcoding the amount of refs isn't exactly the best idea, either. Esp. with faster presets (where the default amount might be lower than the level limit)
[21:13] <PowerCC> -preset medium is default but you must include due to inserting level 41?
[21:14] <JEEB> no
[21:14] <JEEB> I'm just keeping it there to remind you that if you want better compression you can start poking that switch
[21:14] <PowerCC> i see
[21:14] <PowerCC> for scaling i just use -s
[21:15] <PowerCC> ex: -s hd720
[21:15] <PowerCC> my hardware is not overly picky about size
[21:15] <JEEB> well, what I wrote down should actually make it be 1:1 SAR and have a 720 height
[21:15] <PowerCC> i see
[21:15] <PowerCC> i'll try it now...
[21:16] <JEEB> (input width * sar) makes it the original original width with aspect ratio applied
[21:16] <JEEB> then I take (input height / output height)
[21:16] <JEEB> to see how much bigger or smaller we're making the picture
[21:17] <PowerCC> thanks for the forumla
[21:17] <JEEB> then I divide the aspect ratio applied input width by that
[21:17] <JEEB> and then divide by horizontal subsampling, and truncate that
[21:17] <PowerCC> can you give me an example of padding to 720p?
[21:17] <JEEB> then I again multiply by horizontal subsampling
[21:17] <PowerCC> my iPhone app requires padding
[21:17] <PowerCC> meaning it won't resize properly.
[21:18] <JEEB> add a pad filter after scale that has the final resolution as the first two parameters and then just look at the example that makes the picture be in the middle of the output picture? :)
[21:19] <PowerCC> i c
[21:19] <JEEB> the documentation in both libav and ffmpeg should have those examples
[21:20] <PowerCC> i seen it before, just thought i had to be a math wiz to use them.
[21:25] <JEEB> ffmpegger, don't pm me unless you have something to say to me that is of utmost importance and actually related to me :P
[21:25] <JEEB> it's very bad manners
[21:25] <PowerCC> so JEEB your almost always here?
[21:26] <ffmpegger> Sorry
[21:26] <JEEB> and no, I have no idea of what this "pad" thing is you're talking about :P
[21:26] <JEEB> PowerCC, enough to actually be surprised I'm still sane :P
[21:26] <ffmpegger> ok
[21:27] <ffmpegger> makes 2 of us
[21:27] <PowerCC> that's very unconditional of you.
[21:27] <PowerCC> true giver!
[21:28] <ChocolateArmpits> Can ffmpeg rebuild index similarly to VirtualDub ?
[21:28] <PowerCC> -bash: syntax error near unexpected token `('
[21:29] <JEEB> PowerCC, time to escape some characters? :)
[21:29] <JEEB> ChocolateArmpits, not that I know of (in the same file). You will most probably be able to get a similar result by remuxing with ffmpeg though
[21:29] <PowerCC> hell... i am starting to get a headache ;)
[21:29] <JEEB> you should see my lavfi monstrocities :P
[21:30] <PowerCC> ha
[21:31] <ChocolateArmpits> JEEB, thanks for the info. The few times I tried, ffmpeg failed to deliver a good result. VirtualDub with direct stream copy for both video and audio did it without a problem, so I'll just use that
[21:31] <JEEB> ChocolateArmpits, yeah -- vdub is rather lovely for AVI :)
[21:32] <ffmpegger> JEEB From the ffmpeg docs "A filter with no input pads is called a "source", a filter with no output pads is called a "sink"." Whats a pad ??
[21:32] <JEEB> ffmpegger, I have no idea~ something to do with filter chains without implicit things most probably :)
[21:33] <JEEB> PowerCC, this is with the mpv player's syntax but what I have currently (not perfect, seems to do something wrong at times):
[21:33] <JEEB> "--vf=sub" "--vf-add=lavfi=[scale=trunc(if(gte(a\,873/480)\,720\,873/a)/hsub)*hsub:trunc(if(gte(a\,873/480)\,480/(a/(873/480))\,480)/vsub)*vsub]" "--vf-add=lavfi=[pad=720:480:(ow-iw)/2:(oh-ih)/2]" "--vf-add=lavfi=[setsar=40/33]"
[21:33] <ffmpegger> I hate ambiguity....
[21:33] <JEEB> now guess what that does :D
[21:35] <PowerCC> still thinking...
[21:35] <PowerCC> well -vf filter adds padding to 480p
[21:35] <PowerCC> but setsar i am lost
[21:35] <JEEB> just as a hint, gte is a very short way of saying "greater than or equal"
[21:36] <JEEB> the setsar one is probably the simplest
[21:36] <JEEB> it just forces the sample aspect ratio to a certain value
[21:36] <PowerCC> this is what you use for most vids?
[21:37] <JEEB> nah
[21:37] <JEEB> I was just making a script for PSP encoding automation
[21:37] <PowerCC> i see you included subtitles
[21:37] <JEEB> that's just mpv's filter, I'm telling it to render subtitles at that point
[21:38] <PowerCC> so it will auto detect
[21:38] <PowerCC> what if its not uft8?
[21:38] <PowerCC> i assume all your stuff is ready to go
[21:38] <JEEB> depends, this isn't really ffmpeg although I'm using lavfi filtering
[21:38] <PowerCC> be awesome if i can do something like that
[21:39] <PowerCC> tell pytivo, ffmpeg_pram to render subs if they are there.
[21:39] <PowerCC> only worked for me if the sub is in the same path
[21:39] <PowerCC> not sure why it wouldn't work.
[21:39] <PowerCC> someone actually wrote a python script but it also only works if the sub are in the same path.
[21:40] <JEEB> basically the scale tries to scale the picture into a 720x480 box in a way that by applying 40:33 SAR you get the correct picture ratio for the picture
[21:40] <JEEB> then I pad the box so that the picture becomes 720x480
[21:40] <JEEB> and then I force that SAR
[21:40] <PowerCC> and all that does not hurt your head? ;)
[21:40] <JEEB> it's incorrect, at least I got one sample that doesn't work correctly with it :D
[21:42] <PowerCC> so i am trying just -crf 2300
[21:42] <JEEB> lol
[21:42] <PowerCC> oops take them 00
[21:43] <JEEB> and no, it doesn't hurt -- you just end up having to think some over how to get a certain kind of result, esp. if you want the filter chain to work with a lot of stuff :)
[21:44] <PowerCC> i'll stick to -s hd720 ;)
[21:44] <PowerCC> for when i need to upscale
[21:45] <JEEB> well, my first example should work for "resize stuff to XXXx720
[21:45] <JEEB> so that the result will have a 1:1 SAR
[21:45] <JEEB> as in, no aspect ratio compensation needed
[21:45] <PowerCC> no i was getting escape issues
[21:45] <ChocolateArmpits> Another one, how should 2 pass encoding for mpeg2 encoder be carried out?Another one, how should 2 pass encoding for mpeg2 encoder be carried out?
[21:45] <PowerCC> i also tried
[21:45] <JEEB> well it only had ( and )
[21:46] <JEEB> basically prepend \ to them?
[21:46] <PowerCC> -vf "scale=iw*min(405/iw\,320/ih):ih*min(405/iw\,320/ih),pad=405:320:(405-iw)/2:(320-ih)/2
[21:46] <JEEB> uhh
[21:46] <ChocolateArmpits> sorry for double paste
[21:46] <PowerCC> but i am sure i fudge the math
[21:47] <ChocolateArmpits> But JEEB, 720p's SAR, when PAR is 1:1, is 16:9, which yields DAR of 16:9
[21:47] <JEEB> ChocolateArmpits, mpeg2 encoder has no presets so good luck and have fun actually getting all out of the encoder, but 2pass encoding would just be -pass 1 with the first pass and -pass 2 with the second
[21:47] <JEEB> ChocolateArmpits, oh goddamnit are you one of those who have read wikipedia's article on aspect ratios?
[21:47] <JEEB> they made up their own SAR
[21:48] <ChocolateArmpits> JEEB, I know that, but I was thinking if I have to have any bitrate settings set when encoding for the first pass
[21:48] <ChocolateArmpits> I have read more than Wiki
[21:48] <JEEB> well, you seem to be talking as if SAR and PAR are different things
[21:48] <ChocolateArmpits> And they are, Storage Aspect Ratio, Pixel Aspect Ratio
[21:48] <JEEB> no, not as long as you go by specifications
[21:49] <ChocolateArmpits> What specifications are you talking about?
[21:49] <JEEB> PAR is pixel aspect ratio (hi there MPEG-4 container and MPEG-4 Visual), and SAR is sample aspect ratio (hi there MPEG-2 Video and MPEG-4 AVC as well as MPEG-H HEVC)
[21:49] <JEEB> also lavfi uses sar as sample aspect ratio
[21:50] <JEEB> in reality they both mean the same thing, just that "sample" is more general than "pixel", which is why the latter specifications have used that word
[21:50] <ChocolateArmpits> What does your SAR describe?
[21:50] <JEEB> I am using the official lingo that ISO/IEC and ITU-T specifications use :P
[21:51] <JEEB> although just as I now noted, ISO/IEC decided it was fun to use PAR instead of SAR with some MPEG-4 specifications
[21:51] <JEEB> (and then AVC (H.264) and HEVC (H.265) use SAR again)
[21:51] <ChocolateArmpits> Okay, but what "Sample Aspect Ratio" describe, as opposed to "Storage Aspect Ratio" ?
[21:51] <ChocolateArmpits> does*
[21:52] <JEEB> the aspect ratio of a single sample (usually a pixel)
[21:52] <ChocolateArmpits> So it's the PAR of the SAR-PAR-DAR world?
[21:52] <JEEB> there is no such world as far as I know where all of the three mean different things
[21:53] <JEEB> I've only seen it on wikipedia and facepalmed
[21:53] <JEEB> because it makes things even worse
[21:53] <JEEB> although I partially blame ISO/IEC for using PAR in MPEG-4 Visual and the MPEG-4 container to begin with
[21:54] <JEEB> SAR and PAR in usual technical video speak mean the same thing, as far as specifications are concerned
[21:54] <ChocolateArmpits> I can understand SAR-PAR-DAR having little relevance in a world where 1:1 pixel aspect ratio is dominant; but that would mean that only display aspect ratio has any use
[21:55] <JEEB> DAR is generally not specified anywhere (I think?) but is a generally used video-related term about the aspect ratio of the whole picture after aspect ratio correction has been applied
[21:55] <ChocolateArmpits> Well, from the SAR-PAR-DAR, SAR is storage aspect ratio (for instance 5:4 for 720:480) while PAR means pixel aspect ratio (for instance 0,(90):1 )
[21:56] <ChocolateArmpits> DAR then describes the final picture aspect ratio
[21:56] <JEEB> yes, I know what the definitions by wikipedia are. And I'm not gonna take that because SAR most definitely is not that according to the specifications
[21:56] <JEEB> yes, I KNOW
[21:56] <ChocolateArmpits> okay
[21:56] <PowerCC> thanks a bunch JEEB, off to lunch... see you later on!
[21:56] <ChocolateArmpits> But about that 2pass encoding, does the 1pass encoding use any of the settings to determine what to pump into the passlogfile ?
[21:57] <JEEB> in general you should use the same rate control and if possible the same settings as with the second pass
[21:57] <ChocolateArmpits> I've seen suggestions to stick in higher bitrate than will be used for 1st pass, then lower for the actual 2nd pass
[21:58] <JEEB> Anyways, I just am gonna say that you should not use SAR in that way as you are trying to because as soon as you hit someone who has read some video format specifications you are going to end up using a word that actually has a completely different meaning.
[21:58] <JEEB> and many settings in various applications including ffmpeg use the Sample Aspect Ratio
[21:59] <JEEB> I've not seen a single one that uses SAR to mean the aspect ratio of the picture without any aspect ratio correction
[22:00] <ChocolateArmpits> I'm also sceptical if pass encoding works as intended at all: even though minrate and maxrate are set above the target bitrate the encoder takes no use of them when it would seem to be needed
[22:00] <JEEB> you should only be using maxrate and bufsize in general
[22:01] <JEEB> also not all encoders are good enough to keep to your VBV limits
[22:01] <ChocolateArmpits> the console output usually starts off a little higher than set target bitrate, then overtime evens out
[22:01] <ChocolateArmpits> Can the console output be trusted? Doing encodes with HCEnc it seems to use the suggested maximum bitrate as well as go below to even out for average bitrate
[22:02] <JEEB> esp. without a log (as in, without the first pass being done first)
[22:02] <JEEB> anyways, maxrate and bufsize should be doing what you need, if they aren't the encoder fails at life :P
[22:02] <ChocolateArmpits> I've always done 1pass when doing multipass encodes
[22:02] <ChocolateArmpits> It just seems strange to report bitrates that are not near maximum set
[22:02] <JEEB> but you can't use the cli output to get a 100% correct look at if the encoder followed your VBV limits
[22:03] <ChocolateArmpits> >cli output
[22:03] <ChocolateArmpits> care to explain?
[22:03] <JEEB> x264 is nice enough that it actually yells if it couldn't follow your VBV limits, but unfortunately other encoders probably aren't as nice
[22:03] <JEEB> command line interface output
[22:04] <ChocolateArmpits> few previous times mpeg2video didn't encode or spew out red messages
[22:04] <ChocolateArmpits> regarding buffer size or something
[22:04] <ChocolateArmpits> But that was before I set proper settings
[22:04] <ChocolateArmpits> Or at least did something else to solve them
[22:05] <JEEB> anyways, if you set maxrate and bufsize (VBV) the only way to make sure your stream follows the set stuff is to use an app that can actually do the VBV calculations
[22:05] <ChocolateArmpits> The mediainfo for the rendered m2v file reports a maximum bitrate at the maxrate set in the command line, but that I guess is just a straight write, not something that was measured all through encoding process?
[22:05] <JEEB> you can't trust mediainfo at all for proper VBV analysis :P
[22:06] <JEEB> (there's a perl script written by pengvado for raw AVC/H.264 streams, but I have no idea about MPEG-2)
[22:07] <ChocolateArmpits> I suppose I could the file through VLC and check realtime statistics, would that suffice?
[22:07] <JEEB> no
[22:07] <ChocolateArmpits> run the file*
[22:07] <JEEB> you actually have to have the app calculate VBV
[22:07] <JEEB> basically the app can't do it automatically in most cases :P You have to tell it the VBV values you set (maxrate/bufsize and buffer fill at the beginning)
[22:08] <JEEB> the buffer fill generally is 90%, at least in x264 it's set to that
[22:08] <JEEB> also I'd really recommend dropping minrate unless the encoder fails at life otherwise, set only maxrate and bufsize -- those are the two variables you care about
[00:00] --- Sun Dec 29 2013
More information about the Ffmpeg-devel-irc