[Ffmpeg-devel-irc] ffmpeg.log.20141208
burek
burek021 at gmail.com
Tue Dec 9 02:05:01 CET 2014
[00:07] <boltR> hello
[00:07] <boltR> i'm trying to convert a 24fps video to 12fps, without increasing duration
[00:08] <boltR> i tried different variations of this command
[00:08] <boltR> ffmpeg -i ref.mov -r 12 output.mov
[00:08] <boltR> ffmpeg -r 24 -i ref.mov -r 12 output.mov
[00:08] <boltR> etc
[00:08] <boltR> can't seem to keep the length of the video the same
[00:31] <sythe> ...
[00:31] <sythe> boltR: I don't think you understand how video works
[00:31] <sythe> If you're displaying fewer frames per second
[00:32] <sythe> It will take longer to display all the frames of a video
[00:32] <sythe> boltR: ^
[00:34] <pzich> boltR: the first one worked just fine for me. it created a video of the same duration but with half of the frames dropped, and at half the framerate
[00:34] <sythe> Oh, you want to drop the frames, eh?
[00:34] <sythe> Well, sure, it would work then
[00:34] <pzich> I'd assume that's what he wants, if he wants it to be the same duration but at a lower framerate
[00:36] <pzich> if you want to change the speed of the video (which would require either clipping the video or a different duration), see something like https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
[00:36] <boltR> sythe: yes i want to drop frames
[00:36] <pzich> if you look at the output from ffmpeg does it see the input video as 24 fps?
[00:36] <boltR> yes
[00:36] <pzich> and when you run that first command, what do you get as output?
[00:36] <boltR> i'll pastebin it one sec
[00:37] <pzich> I mean, is it too long, not 12 fps, what?
[00:38] <boltR> http://dpaste.com/250Y89V
[00:38] <boltR> it adds about a second to the output file
[00:39] <pzich> can you paste an ffprobe of the input file and output file?
[00:39] <boltR> sure
[00:40] <boltR> input: http://dpaste.com/0VN9NQD
[00:40] <boltR> output: http://dpaste.com/2HF8HQJ
[00:40] <pzich> also, it looks like the input file is already 00:00:02.82, and it has a starting offset of 0.238005, so 2.82+0.238=3.058
[00:41] <pzich> it may just be that whatever is showing you the timecode is now caluclated differently
[00:41] <boltR> ohh
[00:42] <pzich> it could also be that the length of the audio file is longer than the video file, but I'm not seeing its duration in the ffprobe output
[00:44] <boltR> is there a way for me to remove the audio track?
[00:44] <pzich> yep, -an
[00:44] <boltR> ok i'll try that
[00:45] <boltR> still same result.. btw my file browser shows the input file as 3 seconds
[00:45] <boltR> which I think matches what you said about the offset calculation
[00:45] <boltR> it's just that the output has another second added to it
[00:46] <pzich> a second of what? the last frame?
[00:46] <pzich> and can you ffprobe the just-video one?
[00:46] <boltR> ok
[00:47] <boltR> http://dpaste.com/04P71N8
[00:48] <pzich> hmm, even without the offset that's definitely still longer
[00:49] <pzich> I'd try stripping off the xmp packet (which I've not done before, but looks like it can be done with http://superuser.com/a/428039 ), beyond that, I'm not sure.
[00:50] <pzich> if it really is that it's just too long, you can try passing -t 2.82 to manually trim it
[00:50] <boltR> hmm okay, i'll give that superuser link a try
[00:50] <boltR> see what I get
[06:50] <MadTBone_> which encoder name corresponds to AV_SAMPLE_FMT_FLTP
[07:04] <pzich> "float, planar"? http://www.ffmpeg.org/doxygen/2.0/samplefmt_8h.html#af9a51ca15301871723577c730b5865c5
[07:11] <MadTBone_> pzich: sorry, I wasn't really clear. I want to encode planar float audio with ffmpeg (not the api). ie. using something like ffmpeg -i somefile -c:a fltp out.wav
[07:12] <MadTBone_> but ffmpeg -codecs doesn't seem to know about planar float, only the packed variants of f32 and f64
[09:02] <Naji> Hey there. I want to make a ffmpeg-run with the video-filter "croplog" on a whole video. After that i use a small tool, which parses the file and shows me, which crop-attribute was mostly told by ffmpeg
[09:02] <Naji> my only problem is, that this process takes as long as the video is long. so for a 40 minute video, the run needs 40 minutes
[09:02] <Naji> following is my call
[09:02] <Naji> ffmpeg -i input.mkv -vf cropdetect -an -sn -vcodec libxvid -f null - 2> croplog
[09:03] <Naji> is there any way how i could speed up this process?
[09:09] <pzich> crop detecting each frame is expensive when you have a lot of frames. you could see about running the detection on a smaller number of them, or get a faster computer
[09:11] <Naji> hm.. i thought it could possibly be the encoding to xvid, which slows down the process...
[09:12] <pzich> skipping the encode would certainly help
[09:12] <pzich> have you tried just -vcodec copy?
[09:13] <Naji> if i do so, i do not get any useful output
[09:13] <Naji> looks like ffmpeg would just make a copy and would ignore the video filters (even if they are read-only)
[09:14] <pzich> looks like this leaves off the codec altogether: share
[09:14] <pzich> er... http://stackoverflow.com/a/17266356
[09:17] <pzich> I just ran it on a 02:28 1080p24 video and it output all the crop data in 5s, so not bad
[09:18] <pzich> you could probably get away with doing a short segment of the video with the -t flag, like they do
[09:19] <Naji> that also samples the frames of 1 second, am i right?
[09:20] <pzich> nope, looks like it did all 24fps
[09:21] <Naji> yeah, i meant ALL frames of one second
[09:21] <pzich> http://pastebin.com/Z8E1XTWs
[09:22] <pzich> if you look at the t: for each crop line, you'll see it's +0.04167 up to 148.69
[09:23] <Naji> ah, okay you skipped the "-t" option
[09:24] <pzich> yeah, so 6s for the whole thing, or you could do a portion way faster
[09:24] <Naji> okay... worth a try! brb ;-)
[09:26] <Naji> okay, i'd say you have a far superior cpu
[09:26] <pzich> well, it is an 8 core 2.7 GHz i7
[09:29] <Naji> okay
[09:29] <Naji> FAR
[09:29] <Naji> ;-)
[09:29] <Naji> https://gist.github.com/rejinka/21f75fbc550414220deb
[09:30] <Naji> ultra low voltage 4 core 1.0 GHz i7
[09:31] <pzich> 10s is probably more than enough, if you're worried about the first few seconds of the video being black, you can use -ss to seek further into the video
[09:32] <pzich> there's also fast seeking and slow seeking, putting -ss before the -i is fast (but not very accurate), and -ss after for accurate: https://trac.ffmpeg.org/wiki/Seeking#Combinedseeking
[09:32] <Naji> yeah, i know
[09:32] <Naji> hm.. so no other way :-(
[09:33] <pzich> well, it would probably be faster to have ffmpeg spit out a single frame somewhere in the middle of the video, and use another tool to generate the crop info
[09:33] <Naji> i'll try it. thanks anyway for the help pzich :-)
[10:10] <Nopik> hi, when I'm starting ffmpeg with some http:// url to mp3 streaming source as an input, ffmpeg has a delay for few seconds, after that says that mp3 header is missing and start to play as expected. I guess that delay is for looking for header and/or measuring duration of the stream. Can I somehow get rid of that delay?
[10:11] <jstrom> hi, I'm writing some code which reads a HLS stream (video + 2ch aac audio), reencodes it from AV_SAMPLE_FMT_FLTP to AV_SAMPLE_FMT_S16 using swresample, and then I'm trying to write this out using CODEC_ID_PCM_S16LE. It semi-works, but the resulting audio is ~2x the speed. Any hints on what I'm doing wrong?
[10:38] <Mavrik> Nopik, try setting probesize or analyzeduration
[10:38] <Nopik> Mavrik: thanks
[10:45] <Nopik> Mavrik: it is something else, after adding those options the delay between starting ffmpeg and actually starting playout is still like 7 seconds. With small analyzeduration and probesize (set it to 1000), ffmpeg occasionally fails to detect the stream correctly, though (which is normal of course)
[10:55] <hay> is there a better way of restarting streaming when an http input stream fails due to network issues to use -shortest output option and have a cronjob constantly checking if ffmpeg is running and if it's not, restarting it? I want to have as stable as possible output streaming with network input...
[10:58] <Nopik> hay: I'm using supervisord actually, so at least the restart is quick
[10:58] <hay> or if I rephrase the question: how do you guys handle network issues when using some http:// url mp3 input streams?
[10:58] <hay> Nopik, thanks, going to check it out :)
[10:58] <BtbN> while true; do ffmpeg ...; done
[10:59] <Nopik> be sure to add timeout, I've seen situations when network reconfiguration on the other end caused connection to be dropped on a remote side, yet leaving ffmpeg waiting days for packets which will never come
[11:00] <hay> BtbN, seems to be a "brute-force" solution , but as long as it works... :)
[11:01] <BtbN> Well, it does exactly what an external daemon would do
[11:01] <BtbN> restarts it as soon as it quits
[11:01] <BtbN> Put that in a screen, and it just works
[11:01] <BtbN> maybe add a short sleep or something
[11:02] <hay> Nopik, I see... basically we are having an mp3 stream as a background-sound for uscreencapture as it seems to be a good solution for problem we are asked to solve... but due to network failures sooner or later ffmpeg was in some error due to missing audio input :)
[11:02] <Nopik> hay: that makes two of us
[11:02] <hay> BtbN, sounds great
[11:03] <hay> Nopik, it's good to know I am not the only one with such a head-ache :D
[11:03] <Nopik> same here ;)
[11:05] <BtbN> Might also be worth to just run a local PA server, then play the mp3 stream on a null device, and capture the monitor stream.
[11:05] <BtbN> That way the input stream can go down and up as much as it likes, without affecting the outgoing stream. It will just capture silence while it's down
[11:08] <hay> that seems to be a good advice as well....
[11:08] <hay> BtbN, thanks
[11:13] <Mavrik> hay, honestly, we don't use ffmpeg for such use-cases
[11:13] <Mavrik> since ffmpeg isn't really a tool made for streaming
[11:13] <BtbN> Well, there aren't that many alternatives
[11:14] <Mavrik> They're mostly rather expensive pieces of server software :)
[11:14] <BtbN> For servers there is nginx-rtmp
[11:14] <BtbN> But streaming sources..
[11:15] <wallbroken> how to rotate 90 a video?
[11:15] <Mavrik> wallbroken, use a video filter, transpose or whats it
[11:15] <wallbroken> i done it
[11:15] <wallbroken> but it does not work good
[11:16] <wallbroken> video comes slow
[11:16] <BtbN> You mean it takes long to re-encode the video?
[11:16] <hay> I need to stream out mpegts, is there any sw you could recommend? :)
[11:16] <BtbN> hay, you mean hls?
[11:16] <Mavrik> hay, from what source? :)
[11:17] <hay> http mp3 + uscreencapture to mpegts
[11:18] <BtbN> Why ts? Usualy you use something like rtmp(Which is basicaly flv)
[11:18] <wallbroken> BtbN, no
[11:18] <Mavrik> BtbN, because TS is industry standard container that's way more compatible and way less shitty than RTMP? :P
[11:18] <BtbN> On DVB networks, maybe
[11:18] <wallbroken> it is slow in playback
[11:19] <wallbroken> in other cases when i needed to rotate 180, i used hflip,vflip, and the video comes good
[11:19] <hay> BtbN, I am limited to mpegts out due to other equipment limitation
[11:19] <BtbN> The only place i where ts is used for streaming is hls/dash
[11:19] <Nopik> hay: ffserver would be ok for you?
[11:19] <Mavrik> BtbN, on all broadcast netwrosk, yes.
[11:19] <wallbroken> if i do it on the same video, it will be more slim than transpose
[11:19] <BtbN> +know
[11:19] <wallbroken> https://www.dropbox.com/s/v5m6fffo5tfch15/file.txt?dl=0
[11:19] <hay> Nopik, would be... can it handle my scenario?
[11:20] <Mavrik> BtbN, + all satellite, terrestial, cable and IP TV installations out there :P
[11:20] <wallbroken> here you can see a log
[11:20] <BtbN> Mavrik, they use ts because of the high fault tolerance it has
[11:20] <Mavrik> hay, hmm, the HTTP source is the crutch you have
[11:20] <BtbN> For network streaming, specialy over tcp, mpegts has a quite large overhead
[11:20] <Mavrik> BtbN, uh, no.
[11:20] <BtbN> uh, yes.
[11:20] <Mavrik> We prety much switched all our RTMP sources to MPEGTS
[11:21] <Mavrik> and have saved bunch of money on bandwidth
[11:21] <Nopik> hay: basically ffserver is just a video server ;) it is feeded by ffmpeg, so you launch ffserver, configure it to spit out output you want, then launch ffmpeg to fetch data, convert it and push to ffserver. then, if any clients connect to ffserver, it will stream the data
[11:21] <Mavrik> (not to mention player issues)
[11:21] <Nopik> hay: i'm not sure how it will perform under high load, though
[11:21] <BtbN> mpegts has a large overhead compared to flv.
[11:21] <BtbN> Just remove a ts file to flv, and look at the file size
[11:21] <BtbN> *remux
[11:22] <Mavrik> Nopik, ffserver still uses ffmpeg as it's encoder / injester process so he'll have the same issue he has now :/
[11:22] <Mavrik> BtbN, let's disagree here.
[11:22] <BtbN> mpegts was designed for terrestial and satelite transmissions, where quite a few bits get flipped because of bad signal.
[11:22] <Nopik> BtbN: mpegts adds 4 bytes of header for every 188-byte packet, i wouldnt say that it is big overhead
[11:23] <BtbN> Nopik, that's way more overhead than most other containers
[11:23] <Mavrik> it's (depending on muxer configuration) in range of 0.60% - 1.2% depending on stream :)
[11:23] <Nopik> Mavrik: yes, i wasn't talking about restarting ffmpeg, i thought that he want to stream video out easily with something than ffmpeg binary
[11:23] <hay> now that's a good debate I haven't seen here for a long time ;)
[11:24] <Mavrik> also we have streams that have 60% muxing overhead... but that's DVB :P
[11:24] <hay> so when having all the limitations in mind it seems staying with ffmpeg and restarting seems to be the most viable option at the moment ;)
[11:25] <Mavrik> hay, yeah, for HTTP source probably yes
[11:25] <Nopik> BtbN: well, indeed, though the crc part (used to fix the corrupted bits by reed-solomon algorithms) is optional, it would attach 16 bytes to each 188-byte packet, so the overhead would be more like 10%. In non-faulty environments you can skip it easily
[11:25] <BtbN> Every big streaming site uses rtmp(so, flv). That includes youtube, hitbox, ustream, twitch. Some use mpegts(via hls) as output, but they all use exclusively rtmp to ingest the streams.
[11:26] <BtbN> hls is primarily uses because it's easier to distribute in a cdn
[11:26] <BtbN> *d
[11:26] <Nopik> sadly, flv is mandatory due to popularity on browsers side, i still cant believe how dated this is
[11:26] <BtbN> flv is not that bad
[11:27] <Nopik> yeah, if only something else than flash plugin in browsers would play it ;)
[11:27] <BtbN> It only has limited format support, but the container format itself is quite nice
[11:27] <Mavrik> The problem with FLV (same as with MP4) is that it's a header-based container
[11:27] <BtbN> what? flv is fully streamable
[11:27] <Mavrik> and you need an active server that will intercept and fake SPS/PSS headers for each client
[11:27] <Nopik> BtbN: indeed, i've wrote some parsers for flv, ogg and mpeg, and flv turned out to be nice.
[11:28] <Mavrik> but yeah, it's still better than MP4 for example
[11:28] <BtbN> I'd like to see mkv beeing used for that
[11:28] <Mavrik> even though, we now deliver HLS to people with Flash and have totally dropped all FLV/RTMP stuff
[11:28] <Mavrik> way easier on infrastructure
[11:28] <Nopik> yeah, mandatory header at the beginning is annoying
[11:28] <hay> thanks guys for all the info, lunch time :)
[11:28] <Mavrik> delivering TS is just so much easier and it gives you chance to do some neat optimizations when doing seeking (CDN's and stuff :) )
[11:28] <BtbN> I never understood why mp4 got so popular, it's a horribly limited container.
[11:29] <Mavrik> Probably because it's part of MPEG standard :/
[11:29] <Mavrik> but yeah, getting MP4 to stream anywhere is such a pain in the butt
[11:29] <BtbN> even youtube no longer uses it
[11:29] <BtbN> The only big showstopper is firefox, which doesn't support streaming video.
[11:29] <BtbN> So it's the only browser which still needs flash for streaming.
[11:30] <Mavrik> Youtube heavily prefers VP8 in WebM container anyway as far as I've seen right now
[11:30] <BtbN> They prefer h264+aac via dash.
[11:30] <Nopik> BtbN: at least it can play streamed audio
[11:30] <Mavrik> I really don't get why desktop browsers don't support HLS though
[11:30] <Mavrik> It's a rather nicely designed protocol
[11:30] <BtbN> Nopik, nope. No MSE support. That's work-in-progress since over 2 years now, and still not working.
[11:30] <BtbN> Mavrik, they do.
[11:30] <BtbN> All of them, except firefox.
[11:30] <BtbN> That's how youtube delivers their videos.
[11:30] <Mavrik> Hmm, last I checked only Safari did
[11:31] <Mavrik> Everyone else needed flash with HLS plugin
[11:31] <Mavrik> Chrome supported the WebM streaming, not HLS
[11:31] <BtbN> It's called DASH, not HLS. But it's the exact same thing.
[11:31] <BtbN> Just changes a bit to avoid apple patent claims.
[11:31] <BtbN> *d
[11:32] <Mavrik> Yeah, just enough to mess up device compatiblity.
[11:32] <BtbN> The streaming is done via JavaScript
[11:32] <BtbN> The Browsers need to support the MSE api, so they can download and arrange the parts via JS
[11:33] <Nopik> BtbN: so, I'm actually building audio streaming website right now. I have firefox installed without flash, and it does play the streamed audio well
[11:33] <BtbN> All browsers, even IE, support MSE. Just Firefox can't get it implemented propperly.
[11:34] <Mavrik> Nopik, mhm, which container? mp3?
[11:35] <BtbN> btw., if you want to use html5 on twitch, append /hls to any stream page.
[11:35] <Nopik> Mavrik: iirc ogg and mp3 are played fine
[11:36] <Mavrik> Works on mobile?
[11:37] <Nopik> Mavrik: mobile ff? didn't tried that yet :) but generally i'm streaming in few formats, including hls and mp3, so the browser coverage is quite high
[11:37] <Mavrik> I've meant general mobile, people use only Safari/ANdroid WebKit anyway
[11:37] <Nopik> although in my case mobile support wasnt a priority
[11:37] <Nopik> yes, it generally works
[11:38] <Nopik> try radpog.com/radio if you want to test it yourself :)
[11:38] <edoardo> hello, i'm using ffmpeg to stream on icecast piping it to oggfwd
[11:38] <edoardo> however i can't dinamically change the meta tags
[11:39] <edoardo> any ideas? i was thinking about an external file with the meta that gets read by ffmpeg
[11:39] <edoardo> but i can't find anything in the documentation
[11:39] <edoardo> ffmpeg -i pipe:0 -acodec libopus -b:a 32k -vn -f ogg pipe:1 | oggfwd 127.0.0.1 8000 hackmee /theora.ogg
[12:54] <hay> using these params ffmpeg -threads 4 -vsync 0 -f dshow -i video="UScreenCapture" -i "http://mp3.rtvslo.si/val202" -acodec copy -vcodec mpeg2video -s 720x576 -qscale:v 2 -r 10 -shortest -f mpegts udp://192.168.1.150:1232 I get a bunch of those messages: http://pastebin.com/fWqPbH7N after the mp3 input becomes unavailable (I clear out the default gateway for NIC).. I would like ffmpeg to die in
[12:54] <hay> this case, how to force it? thx
[15:51] <sekon> Hello i am trying to develop a video filter and the filter's ip_get_video_buffer is being called
[15:51] <sekon> *is not being called
[15:52] <sekon> filter_frame, request_frame are all being called
[15:52] <sekon> What are all the relvanent code that needs to be pasted ( only the filter's c file ?)
[15:54] <sekon> I am writing a simple vide muxer filter
[15:54] <ubitux> sekon: #ffmpeg-devel :)
[15:55] <sekon> ubitux: oooh sorry thanks :)
[15:55] <ubitux> no worry
[15:56] <ubitux> you'll get more feedback there
[15:56] <ubitux> btw, doc/writing_filters.txt is your friend
[15:57] <ubitux> and you need to look at the sink filters i suppose
[17:08] <mac_nibblet> How do i run ffplay with a smooth filter on a mp4 file ?
[17:08] <mac_nibblet> ffplay -vf smooth test.mp4 fails with 'no such filter: smooth'
[17:17] <kepstin-laptop> what exactly is a "smooth" filter?
[17:17] <kepstin-laptop> mac_nibblet: you can go through http://www.ffmpeg.org/ffmpeg-filters.html and see if ffmpeg has a filter that does what you want.
[17:18] <mac_nibblet> kepstin-laptop: http://www.ffmpeg.org/ffmpeg-filters.html#smooth
[17:18] <mac_nibblet> sorry, i don't use ffmpeg very much, I normally use gstreamer but client requested ffmpeg
[17:18] <kepstin-laptop> mac_nibblet: oh, huh. That's an opencv filter, you you need an ffmpeg compiled with opencv enabled
[17:19] <mac_nibblet> yikes
[17:19] <mac_nibblet> thats going to be a pain in the ass >_<
[17:19] <mac_nibblet> And i don't even know if thats what i need
[17:19] <kepstin-laptop> I'm actually kind of surprised there's not a native ffmpeg blur filter
[17:19] <mac_nibblet> my problem is that i have download a rtmp stream to my computer and it gets all pixelated with big movements
[17:20] <kepstin-laptop> well, there are some blur filters...
[17:20] <kepstin-laptop> hmm. you want a deblocking filter then
[17:20] <mac_nibblet> The same stream performs perfectly in the web client/flash client
[17:20] <mac_nibblet> And they had smoothing activated so i was guessing it would be the same filter/setting in ffmpeg
[17:20] <kepstin-laptop> "smoothing" in flash just means that it uses a higher-quality rescaling algorithm - bilinear instead of nearest pixel
[17:21] <kepstin-laptop> so irrelevant for this.
[17:21] <kepstin-laptop> if it works in flash, but doesn't play properly when downloaded, then either your file's getting corrupted when downloaded or you've found something ffmpeg can't decode properly.
[17:22] <kepstin-laptop> what video codec is it, h264?
[17:25] <mac_nibblet> kepstin-laptop: Stream #0:0: Video: h264 (Main), yuv420p(tv), 320x240 [SAR 1:1 DAR 4:3], 24.42 fps, 24 tbr, 1k tbn, 48 tbc
[17:26] <mac_nibblet> kepstin-laptop: well after initating the RTMP connection and doing all the AMF crap i'm just copying the stream to a file
[17:26] <kepstin-laptop> the ffmpeg h264 decoder's pretty unlikely to have any errors at this point, so the most likely suspect is that the file's corrupted somehow? Are there any messages printed on the console by ffmpeg when decoding it?
[17:27] <mac_nibblet> Non-monotonous DTS in output stream 0:0; previous: 13544820, current: 13544820; changing to 13544821. This may result in incorrect timestamps in the output file.
[17:27] <mac_nibblet> I get tons of these
[17:27] <kepstin-laptop> hmm, that could be problematic, if the decode timestamps are messed up, the decoder could be getting frames in the wrong order, which could give artifacts.
[17:28] Action: kepstin-laptop doesn't know enough about rtmp/flv to have any good suggestions.
[17:30] <kepstin-laptop> any reason you can't use ffmpeg's built-in rtmp support?
[17:30] <mac_nibblet> kepstin-laptop: yeah i need to negotiate amf
[17:31] <mac_nibblet> kepstin-laptop: the rtmp connection challenges me with a javascript function that needs to be executed >_<
[17:34] <mac_nibblet> kepstin-laptop: do you know anyone who does have the knowledge ?
[17:37] <kepstin-laptop> hmm. even the ffmpeg rtmp protocol just copies the data from the rtmp connection to a flv format stream, so it doesn't sound like you're doing anything wrong...
[17:38] <kepstin-laptop> unless you're doing something like writing the same video frame to the file multiple times
[19:13] <llogan> wallbroken: sorry, but i'm usually not active on IRC during the weekends. i have the link to your output, but what was the command? it's missing.
[19:14] <wallbroken> wait
[19:16] <wallbroken> llogan ffmpeg -i input -vf "transpose=1,scale=1024:-2" -metadata:s:v rotate="" -c:a copy output.mov
[19:33] <thibaultmot> Hi, I'm trying to find a way to extract audio from a video without converting it to another format
[19:33] <thibaultmot> (most command line options I have found only allow you to extract to a specific audio codec)
[19:35] <kepstin-laptop> hmm, well, it depends on what the original audio format is
[19:35] <kepstin-laptop> but if you use -c:a copy then the audio won't be re-encoded, you just have to pick an appropriate output container
[19:44] <llogan> wallbroken: what was the actual issue again? I forgot.
[19:47] <wallbroken> llogan, when the video needs to be rotated of 180°, i used this: ffmpeg -i input -vf "hflip,vflip,scale=1024:-2" -metadata:s:v rotate="" -c:a copy output.mov
[19:47] <wallbroken> it's all ok
[19:47] <wallbroken> if the input is 80 mb
[19:47] <wallbroken> i get a 4 mb file
[19:47] <wallbroken> working good
[19:48] <wallbroken> , but now, the video needs to be rotated of 90°, and i used that other command
[19:48] <wallbroken> if i do that on the same video
[19:48] <wallbroken> i get a 13 mb instead of 4 mb file
[19:48] <wallbroken> and it playbacks slowly
[19:50] <llogan> ah, ok. what players did you test?
[19:51] <wallbroken> vlc
[20:24] <llogan> wallbroken: can you provid ethe input video?
[20:32] <wallbroken> llogan, you need i send you?
[21:27] <llogan> wallbroken: yes
[21:38] <thibaultmot> Hi, sorry I had to go AFK for a while because of ..reasons... .I am trying to just extract the audio out of a bunch of mp4's which have different audio formats. How do I use '-c:a' . I have tried typing '-c:a copy output' but that gives me an error
[21:38] <thibaultmot> pretty sure I'm doing something obviously wrong
[21:39] <llogan> thibaultmot: you shouldn't have drank that old milk.
[21:39] <thibaultmot> XD My problem is just ... what do I replace 'OUTPUT' with. I can't change it to test.mp3 because it might not be mp3
[21:40] <thibaultmot> http://pastebin.com/dLLHnpye
[21:41] <thibaultmot> oh sorry, forgout output
[21:44] <thibaultmot> http://pastebin.com/tuZ2eR5z
[21:44] <thibaultmot> I would just like to know what do I place instead of 'OUTPUT' to make sure it outputs a mp3 when the codec was mp3 in the mp4. And another audio format when another was used
[21:45] <thibaultmot> (without converting it to another format
[21:45] <thibaultmot> it has to choose the file extension by itself is what I'm trying to say
[21:56] <kepstin-laptop> thibaultmot: can't do it with just the ffmpeg tool, you'd need to wrap it with something that picks the container you want based on the input format
[22:13] <wallbroken> which is the difference between transpose and rotate?
[22:15] <llogan> rotate allows you to provide an arbitrary rotation value in radians
[22:16] <llogan> the vertically rotated output plays fine for me
[22:16] <llogan> in VLC and ffplay
[22:19] <wallbroken> maybe i found the problem
[22:21] <wallbroken> now i used 576 as resize resolution
[22:21] <wallbroken> because of the video goes from wide to vertical
[22:22] <wallbroken> when the video must go from horizontal to horizontal i used 1024 as resize
[22:22] <wallbroken> but when using 576, i ged a final video of 576x1024, but i also get two black vertical bars, why?
[22:23] <wallbroken> scale=576:-2
[22:23] <wallbroken> is good?
[22:26] <llogan> does ffplay show the vertical bars? you probably have some setting in VLC scaling upon playback.
[22:27] <llogan> i'll be back in an hour or maybe longer
[22:30] <wallbroken> -2 what does it mean?
[22:31] <pzich> I think it's maybe supposed to be -1, which means to match the aspect ratio?
[22:34] <wallbroken> yes
[22:34] <wallbroken> the documentation said that -1 is to preserve aspect ratio
[22:34] <wallbroken> llogan, do you confirm?
[22:34] <wallbroken> -2 what does it means?
[22:47] <c_14> -2 is preserve aspect ratio as best as you can but make it divisible by 2 iirc
[22:49] <wallbroken> in which sense?
[22:49] <wallbroken> also -1 preserve aspect ratio
[22:49] <wallbroken> i haven't understood the diff
[22:49] <pzich> yes, but this makes sure it's a multiple of 2
[22:49] <pzich> even numbers
[23:02] <wallbroken> and which is the advantage in getting multiple of 2?
[23:07] <pzich> many codecs require that the video dimensions be a multiple of 2, and often times you'll experience slower performance if you're cropping a video such that it's offset by an odd number of pixels
[00:00] --- Tue Dec 9 2014
More information about the Ffmpeg-devel-irc
mailing list