[Ffmpeg-devel-irc] ffmpeg.log.20150101
burek
burek021 at gmail.com
Fri Jan 2 02:05:01 CET 2015
[02:04] <BlackBishop> I'm using ffmpeg -ss 00:56:13 -i file -vf "ass=..." ... but the subtitle doesn't seem to start from the right offset ..
[02:04] <BlackBishop> the video is ok ... but the subtitle is from the start :/
[02:04] <BlackBishop> any ideas on what I'm doing wrong ?
[02:24] <c_14> put the -ss as an output option
[02:56] <justinX> The easiest way to quickly remove a sound channel and replace a subtitle, without changing the mp4 in any other way, would be with ffmpeg right?
[02:59] <c_14> easiest way I know of
[02:59] <c_14> you can probably also use something like mp4box
[02:59] <c_14> or l-smash
[03:01] <c_14> wait, remove a channel or a stream?
[03:03] <c_14> If you want to remove a channel, use ffmpeg. Don't think those other 2 can do that.
[03:06] <justinX> a stream is correct name I guess
[03:07] <c_14> If it's a stream you can probably do it with ffmpeg, mp4box or l-smash. Whichever you prefer.
[03:07] <justinX> the file have two audio language, and I want to remove the first one to give my poor TV less of a problem when playing it. (becuas I want the second language)
[03:08] <justinX> and I also want to remove the subtitle and replace it with my own (translated one).
[03:08] <c_14> yep, I'd just use ffmpeg with 2 inputs -c copy and some maps
[03:10] <justinX> ok... I try see if I find out how to write :-) I'm not sure how I remove an audio channel though.
[03:10] <c_14> it's (probably) just a stream, just don't map it
[03:12] <justinX> is it possible to get man file for ffmpeg somewhere btw? I guess it will be same thing as "ffmpeg -h full" or something but....
[03:13] <c_14> https://ffmpeg.org/ffmpeg.html
[03:13] <c_14> They're all there under documentation
[03:13] <c_14> Though you'll probably only need that one.
[03:14] <justinX> ok. yeah the web pages is easier to use anyway :-)
[03:14] <justinX> if I only would add a subtitle I would have written ffmpeg -i file.mp4 -i file.srt outfile.mp4 right?
[03:15] <c_14> add -c copy -map 0 -map 1
[03:15] <c_14> The copy will keep the quality from deteriorating, the maps will make sure it takes all streams
[03:15] <c_14> (ffmpeg only copies 1 video, 1 audio, and I think 1 subtitle stream by default)
[03:16] <justinX> oh
[03:17] <justinX> in this case I would actually want it to only have 1 video,1 audio (the second in the input file),1 subtitle (the srt I provide)
[03:17] <c_14> -map 0:v -map 0:a:1 -map 1
[03:18] <c_14> assuming the first file is the video+audio file, the second is the subtitle file and that you want the second audio stream
[03:18] <justinX> ok. wonderful :-)
[03:19] <justinX> but I must read more about the -map things, I never used them before. tomorow.
[04:16] <shevy> guys I need confirmation... -t means duration, so -t 30 means a duration of "+30 seconds"?
[04:16] <c_14> yep
[04:17] <c_14> duration of "30 seconds" that is. Not sure what that plus is specifying since negative time wouldn't make much sense in this context.
[04:17] <shevy> ah, it was meant in the context of setting a position in a file. like I set, let's say, at 153 seconds and then wonder if I would have to use -t 30, or rather -t 183 if you see what I mean
[04:18] <c_14> yes, -t 30
[04:18] <shevy> from your answer I deduce it is -t 30, which helps clear my confusion - thanks :)
[05:40] <justinX> btw, it looks like I have to specify another subtitle codec to match mp4 (and original encoding) so the command in the end went ffmpeg -i in.mp4 -sub_charenc LATIN1 -i in.srt -c copy -map 0:v -map 0:a:1 -map 1 -scodec mov_text out.mp4
[08:29] <scragglez> Is there a way to take mplayer output as input in ffmpeg?
[12:00] <rue_more> how can I list codecs, I been searching thru the help for 15 mins now and cant find it...
[15:38] <shevy> hey guys, I am studying https://trac.ffmpeg.org/wiki/FilteringGuide
[15:39] <shevy> The first example shows "Resize a 640x480 input to a 320x240 output."
[15:39] <shevy> ffmpeg -i input -vf scale=iw/2:-1 output
[15:40] <shevy> essentially, the iw/2 just means a reduction towards 50% right?
[15:40] <JEEB> input width divided by two
[15:41] <JEEB> and the -1 is a shortcut to say "matching value according to the aspect ratio"
[15:41] <JEEB> that said, that isn't always enough due to subsampling (usually of chroma)
[15:42] <JEEB> the wiki should have an example of making sure the width and height meet the minimum requirements of subsampled planes
[15:43] <shevy> yeah, the mention of the pixel confused me for just a moment there
[15:44] <shevy> much easier to understand in percentage for me :)
[16:13] <shevy> JEEB, do you perhaps happen to know if this here may work?
[16:13] <shevy> -vf scale=iw*0.5
[16:13] <shevy> I think it would technically be the same as iw/2 ?
[16:13] <shevy> I'll be trying on a video file, ffmpeg seems to accept the syntax
[16:14] <JEEB> it will probably work :)
[16:14] <JEEB> also, I will still have to note that the comment on subsampling is a worthwhile one and you should make sure that is applied accordingly to your things
[16:15] <JEEB> otherwise your command line might work in some cases, and not in other
[16:16] <shevy> yeah I mostly just started, slowly working my way through the examples of the filters. Been a little bit difficult to get into ffmpeg, I always forget what -y -i and so forth stand for
[16:33] <shevy> hmm
[16:33] <shevy> I think it has worked
[19:34] <shevy> hmm
[19:34] <shevy> is there a way to tell ffmpeg to try and preserve as much quality as possible?
[19:35] <shevy> when I did the above -vf scale=iw*0.5, I noticed a big decrease in quality (of an .avi file... which is quite old and had bad pixels anyway, I guess I should try it on a better video file). I'd like to compare it to a variant where the original is preserved as much as possible
[19:35] <pzich> try setting a CRF value
[19:36] <pzich> if you're going to h264, that is: https://trac.ffmpeg.org/wiki/Encode/H.264
[19:36] <Mavrik> shevy, did you actually set the desired output video quality parameter? :P
[19:36] <shevy> Mavrik probably not
[19:36] <pzich> yeah, the default quality is generally not the best quality
[19:36] <Mavrik> yeah, default settings suck and look terrible
[19:37] <shevy> I guess the codec it uses is: "Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)"
[19:37] <Mavrik> eww.
[19:37] <Mavrik> please do paste your command line and the ffmpeg output so we can help you get your quality up ;_
[19:38] <shevy> nothing fancy: ffmpeg -i foo.avi -vf scale=iw*0.5:-1 bar.avi
[19:38] <Mavrik> ugh.
[19:38] <shevy> looks like a blur! hahaha
[19:38] <Mavrik> yeah, that will chose hideous defaults :D
[19:38] <Mavrik> shevy, where do you want to play your output?
[19:38] <shevy> I think I'll try on a better video to start with
[19:39] <Mavrik> try rather something in line of
[19:39] <shevy> Mavrik actually that is just a test altogether of ffmpeg filters... I am just considering to get this "ready" for one later day when I would try to modify smaller video chunks I think
[19:39] <Mavrik> ffmpeg -i foo.avi -vf scale=iw*0.5:-1 -c:v libx264 -c:a copy bar.mp4
[19:39] <shevy> so I guess it will be played just on a normal regular desktop computer
[19:39] <Mavrik> yeah, use H.264 then, the baseline profile MPEG4 your command line chooses is like 15 years obsolete :)
[19:40] <shevy> hehe
[19:40] <Mavrik> also, use -c:a copy to copy audio without reencoding it
[19:40] <Mavrik> throw in -crf 24 as a quality setting and tweak that for size/quality :)
[19:40] <Mavrik> and you're done.
[21:20] <wachpwnski> how do I get the bit rate info for a video stream? Like if I wanted to use the same compression settings from an existing mkv file?
[21:21] <BtbN> ffmpeg/ffplay should display the average bitrate when playing the stream. Buf if you want to use the very same settings, why transcode at all?
[21:21] <BtbN> There is a lot more that determines the quality than just the bitrate.
[21:21] <wachpwnski> no I have a compression setting from another video that I like, I want to use it on another source
[21:22] <Mavrik> wachpwnski, ugh... that's usually a terrible idea
[21:22] <Mavrik> wachpwnski, but ffprobe is meant for inspection and will output bitrate when able.
[21:22] <BtbN> You won't be able to get the exact settings that were used to encode an existing video.
[21:23] <wachpwnski> BtbN: Ok, so it's just trial an error then?
[21:23] <BtbN> No idea what you are trying to achive.
[21:23] <Mavrik> wachpwnski, usually when encoding you set visual quality with CRF if that's what you care about
[21:24] <Mavrik> wachpwnski, since bitrate for the same visual quality depends on what is pictured in the video
[22:33] <shevy> was there a predecessor to ffmpeg before it got started?
[22:40] <klaxa> i don't think so
[00:00] --- Fri Jan 2 2015
More information about the Ffmpeg-devel-irc
mailing list