[Ffmpeg-devel-irc] ffmpeg.log.20140327

burek burek021 at gmail.com
Fri Mar 28 02:05:01 CET 2014


[00:00] <bencc> what's the difference?
[00:00] <bencc> I mean cropping the height not the duration
[00:01] <bencc> I don't need the bottom of the video
[00:02] <bencc> with the following command I can play the video in chrome but not in FF:
[00:02] <bencc> ffmpeg.exe -i output.mkv -c:v copy -movflags +faststart -c:a aac -strict experimental -b:a 96k full.mp4
[00:04] <llogan> can you provide a short sample of the output that exhibits the same issue?
[00:04] <llogan> you can't crop losslessly (at least with ffmpeg) because the video filters require re-encoding
[00:05] <llogan> s/losslessly/while stream copying
[00:05] <llogan> you can crop "losslessly" with mjpeg using jpegtran
[00:05] <bencc> thanks. I'll search for mjpeg and jpegtran
[00:06] <bencc> I'll try to generate a short sample
[00:06] <llogan> but that won't work for you sicne you want it to play in the browser, and you'd have to re-encode to get crusty, old mjpeg
[00:06] <bencc> ok
[00:06] <bencc> this is how I generated the mkv video:
[00:07] <bencc> ffmpeg -f pulse -ac 1 -i alsa_output.pci-0000_00_05.0.analog-stereo.monitor -f x11grab -r 30 -s 1280x960 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset:v ultrafast -crf 0 -threads 0 output.mkv
[00:10] <llogan> lossless is huge and you want to play that in a browser?
[00:12] <bencc> llogan: I want to play mp4
[00:12] <bencc> but remove the bottom without lossing quality if possible
[00:13] <llogan> you're stream copying lossless H.264 into MP4. lossless is huge.
[00:13] <llogan> and i'm not sure what browsers can handle that
[00:13] <bencc> how can I decrease the size and still have good quality?
[00:15] <llogan> ffmpeg -i input -c:v libx264 -preset medium -crf 23 -vf crop=iw:ih-10,format=yuv420p -c:a aac -strict experimental -b:a 96k -movflags +faststart output.mp4
[00:15] <llogan> http://ffmpeg.org/ffmpeg-filters.html#crop
[00:15] <llogan> https://trac.ffmpeg.org/wiki/x264EncodingGuide
[00:15] <llogan> adjust -preset and -crf and crop to your needs
[00:15] <bencc> thanks. trying
[00:26] <bencc> llogan: with your command it works in FF
[00:27] <bencc> and it cropps to a good size
[00:27] <bencc> thanks
[01:16] <relaxed> llogan: daily
[01:18] <llogan> a regular movement. good.
[05:33] <jbermudes> I'm recording h264 video from a webcam into an mp4 file with ffmpeg. What would be the best way to watch what is being recorded while the video is being recorded?
[05:33] <jbermudes> On Linux, the webcam driver won't seem to let me have another process like mplayer or vlc try to read from the camera while ffmpeg is recording
[05:46] <relaxed> jbermudes: if you use a different output container you can have mplayer play it
[05:47] <relaxed> I recommend matroska .mkv
[06:06] <jbermudes> relaxed: thanks, I'll try that out
[06:07] <Felix__> hello all
[06:08] <Felix__> is anyone familiar with graphstudionext?
[06:12] <Felix__> or dts-hd ma decoding?
[08:34] <Aetas> Anyone happen to be around with some FLV/Sorenson format knowledge?
[09:37] <termos> I have compiled with libfdk-aac but when trying to encode with AV_CODEC_ID_AAC I get an error saying aac is experimental. How do I set the encoder to use libfdk-aac?
[09:38] <bart__> Hello, I'm having touble putting a multiply blend filter over my videos. Every time I add a filter, I get a green overlay. My code, screenshots and output can be found on this stackoverflow question : http://stackoverflow.com/questions/22631761/multiply-blend-mode-using-ffmpeg-adds-green-overlay
[09:38] <bart__> Somebody that can help me out?
[09:40] <kcm1700> I'm using 'mjpeg' encoder by code. which field in AVCodecContext should be set to improve quality?
[10:00] <stonie_> hiho! how many -threads would you prefer for encoding?
[10:07] <DrSlony> vague question
[10:07] <DrSlony> for vp8/9 the docs say "number of physical cores minus 1"
[10:08] <DrSlony> of course on my i7 with 4 physical cores and 8 virtual ones, sticking to that rule means less than half my cpu is used, so i use number of virtual cores minus 1, or without the minus one
[10:16] <stonie_> ok ty
[12:43] <diroots> hi there
[12:46] <diroots> i'm trying to set a metadata on a file,... -vcodec copy -acodec copy -metadata:s:v:0 codec_name="DVCPRO HD 1080i50" on a .mov file. when doing this, I see the codec_name information on the ffmpeg output during processing, but when reading once more the output file, the codec_name meta disappear on the video stream,... is the specific meta application on the video stream (metadata:s:v:0) incompatible with vcodec:copy?
[13:17] <troulouliou_dev> hi what is the easy command to recursively parse a directory for mkv files and create a 5 minutes sample of those files with the exact same video and audio codecs ?
[13:19] <DrSlony> troulouliou_dev in msdos?
[13:22] <troulouliou_dev> DrSlony, ? :)
[13:22] <troulouliou_dev> no ubuntu
[13:26] <DrSlony> :)
[13:27] <troulouliou_dev> DrSlony, i mean what are the ffmpeg utils and param to just sample the first 5 minutes of a files and output it in the same container firmat with same audio and codec properties
[13:30] <relaxed> troulouliou_dev: ffmpeg -i input -t 00:05:00 -c copy output
[13:30] <troulouliou_dev> relaxed, big thanks
[13:31] <troulouliou_dev> relaxed, if input is dts_hd ma i ll still have dts_hd ma in output ? not only the core stream
[13:31] <troulouliou_dev> relaxed, it will be a raw copy of the frames i guess
[13:31] <relaxed> yes, make that: ffmpeg -i input -t 00:05:00 -map 0 -c copy output
[13:32] <troulouliou_dev> relaxed, ok big thanks
[13:38] <DrSlony> troulouliou_dev try this: find . -iname "*.mkv" | while read -r f; do ffmpeg -i "$f" -t 00:05:00 -map 0 -c copy "${f%.*}_5m.mkv"; done
[13:40] <troulouliou_dev> DrSlony, cool nice one :)
[15:10] <rsdrsdrsd> is yasm website down?
[15:36] <spaam> rsdrsdrsd: no
[15:41] <rsdrsdrsd> spaam: the following file can't be downloaded http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
[15:42] <rsdrsdrsd> website isn't down
[15:42] <spaam> its really slooow
[15:48] <nikitos> DrSlony Hi! How do you think, is now right time for my yesterday question?
[16:51] <superware> is there a way to hint avformat_find_stream_info about a network stream codec? I want to save time while ensuring the right parameters are being detected.
[16:58] <termos> when transcoding audio with fdk_aac my audio is just noise. I am using the bitstream filter aac_adtstoasc and encoding to flv. What could be the problem?
[17:50] <nikitos> Hello! Are here somebody, who can help me with ffmpeg(liav) and vaapi (libva). I have asked this question in mail-list ffmpeg-libav, and one man answered that ffmpeg don`t have gpu encoding features, but ffmpeg supports vaapi and have it in list of hardware accels. What type of support of vaapi does ffmpeg have?
[17:57] <Jack64> nikitos: that should probably be asked in #ffmpeg-devel
[17:58] <JEEBsv> hwaccels are decoders that depend on you doing some of the prerequisite stuff
[17:58] <JEEBsv> it's not as simple as with "normal" decoders
[17:58] <nikitos> Jack64 thanks, I will try ffmpeg-devel
[17:59] <JEEBsv> you should see if any other project uses the same hwaccel that you're wanting to use
[17:59] <JEEBsv> and of course you would have to actually know about libva
[17:59] <JEEBsv> so having documentation around for libva and looking at how another project uses the hwaccel are quite important
[18:00] <nikitos> JEEBsv I didn`t find any examples of encoding, only decoding
[18:00] <JEEBsv> oh, encoding
[18:00] <JEEBsv> does lavc support that?
[18:00] <nikitos> I will check lavc
[18:00] <JEEBsv> lavc is libavcodec
[18:01] <JEEBsv> one of the libraries in FFmpeg or Libav projects
[18:01] <JEEBsv> I'm asking if it has support for libva _encoding_ at all?
[18:01] <JEEBsv> as far as I can see it only has the scaffolding for _decoding_
[18:02] <JEEBsv> yeah
[18:02] <JEEBsv> can't find encoders with vaapi
[18:03] <JEEBsv> so I don't know what exactly you're looking for in lavf/lavc for yourself?
[18:04] <JEEBsv> I mean you could use lavf/lavc for decoding for your input, and then encode with va-api, and then mux with lavf
[18:04] <JEEBsv> but the encoding part would have nothing to do with lavc then
[18:04] <JEEBsv> unless you are interested in writing encoder(s) for vaapi into lavc as hwaccels
[18:04] <JEEBsv> so yeah, specify what you want to do first
[18:10] <nikitos> I want "simple" thing, I want to use integrated in intel hd graphics 4600 h.264 hardware encoder via ffmpeg
[18:11] <nikitos> so, I have raw yuv420p frames and I need to encode them to h.264 bitstream
[18:11] <JEEBsv> what do you mean with 'via ffmpeg'?
[18:11] <JEEBsv> do you mean ffmpeg cli or lavf/lavc libraries?
[18:11] <nikitos> via ffmpeg, I mean c/c+ programm that uses liabcodec API
[18:11] <nikitos> second libs
[18:11] <JEEBsv> ok
[18:12] <JEEBsv> do you want the actual _encoding_ be done via libavcodec?
[18:12] <JEEBsv> or do you just want the things around it to be done via libavcodec?
[18:20] <nikitos> what does mean things around it ?
[18:20] <JEEBsv> :|
[18:20] <JEEBsv> anyways, if you want to use a lavc hwaccel to encode, you would have to code such yourself
[18:20] <JEEBsv> since there is none at the moment
[18:21] <JEEBsv> if you think you are up to the task, goto #ffmpeg-devel and hope that hwaccels' design is capable of encoding :P
[18:21] <troulouliou_dev> is -c copy still usable in ffmpeg tool ?
[18:21] <JEEBsv> yes
[18:21] <troulouliou_dev> Failed to set value 'copy' for option 'c'
[18:22] <JEEBsv> then you have an old ffmpeg or the last ffmpeg binary from Libav
[18:22] <JEEBsv> what project does the copyright mention?
[18:22] <JEEBsv> if it's Libav, just use avconv
[18:22] <JEEBsv> if it's FFmpeg, then you just update :P
[18:22] <troulouliou_dev> JEEB, libav  ok ... thanks :)
[18:22] <JEEBsv> and libav has its own channel @ #libav
[18:23] <troulouliou_dev> JEEB, ill stick to ffmpeg :) just forgot ./ before ffmpeg in script :)
[18:24] <JEEBsv> ok
[18:28] <nikitos> JEEBsv thank you!
[18:33] <nikitos> JEEBsv, may I ask here question about h.264 two pass encoding?
[18:33] <JEEBsv> no-one stops you from _asking_
[18:36] <nikitos> When I encodes video second pass via libx264 (h.264) does it converts input data back to raw frames (for example yuv420) or uses h.264 bitsream to generete output?
[18:37] <JEEBsv> encoding always encodes raw pictures
[18:37] <JEEBsv> an encoder always takes in raw pictures
[18:37] <JEEBsv> if it takes in something else, it no longer is an encoder only
[18:46] <nikitos> so, than, why 2pass (or 3pass) encoding works better? In my mean Better - better qulity at same bitrate. How does it work?
[18:47] <JEEBsv> uhm
[18:47] <JEEBsv> let's get something clear
[18:48] <JEEBsv> with libx264, CRF and 2pass ABR rate control modes give you the same quality for the same bit rate (except for the rare cases where multipass rate control fails badly)
[18:48] <JEEBsv> it all depends on what you want to specify
[18:49] <JEEBsv> for a specific file size (ABR), you will want to use 2pass because that way the encoder knows more or less the whole complexity of the whole video, and it can make decisions with rate control accordingly
[18:49] <JEEBsv> for a specific rate factor (CRF), which is the closest thing we have to something that is like "constant quality", you use CRF
[18:50] <nikitos> ok, maybe idea of 2pass encdoding is not clear for me. So what is primary feature os Npass encoding?
[18:50] <JEEBsv> first pass or the Nth pass write logs of the whole clip
[18:50] <JEEBsv> and then the 2nd or final pass only encodes reading in that log
[18:51] <nikitos> oh, I see
[18:51] <nikitos> thank you ver much!
[18:51] <JEEBsv> it is useful when what you want is not a certain quality level, but when you have an ABR (average bit rate) that you want to fit
[18:51] <JEEBsv> but saying that 2pass ABR is the mode that gives you "better quality at the same bit rate" is complete bollocks
[18:52] <JEEBsv> at least with libx264
[18:52] <JEEBsv> of course not all encoders have something like the CRF mode
[18:52] <nikitos> :-) I see, thanks, I will learn more about encoding
[18:52] <nikitos> thanks
[19:25] <superware> is there a way to hint avformat_find_stream_info about a network stream codec? I want to save time while ensuring the right parameters are being detected.
[19:36] <voip> Hello guys, i am tryng to copy and convert (PAL->NTSC) stream. But as result i have quality loss and very pixelized video. Where is my mistake ? http://pastebin.com/NdspuB8g
[19:37] <llogan> voip: do you want to use the mpeg2video encoder as ffmpeg has selected by default?
[19:37] <nikitos> voip it seems you need to specify output bitrate
[19:38] <nikitos> Stream #0:0: Video: mpeg2video, yuv420p, 1280x720 [SAR 3:4 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc as I understand it setes 200kbit as default video bitrate
[19:41] <voip> llogan, i dont want use mpeg2, but when i putting h264 (instead of -f mpegts -f h264) as result i have black screen
[19:41] <llogan> and why upscale from 720x576 to 1280x720?
[19:41] <llogan> you don't want -f h264
[19:41] <voip> nikitos, shuld i manualy increase bitrate ?
[19:42] <voip> llogan, just for test . whith 720x480 same result
[19:43] <llogan> why not simply stream copy the input to the output instead of re-encode?
[19:43] <nikitos> voip yes, try -b 1000k or -v:b 1000k
[19:45] <voip> llogan, basicly i need stream copy, i need only change to ntsc resolution
[19:45] <voip> nikitos, tnx
[19:45] <llogan> why do you need ntsc?
[19:45] <nikitos> voip, does it works for you?
[19:46] <llogan> nikitos: that will still use mpeg2video
[19:46] <nikitos> yes, we just solves pixilized video triuble
[19:46] <nikitos> trOuble
[19:46] <llogan> the trouble with triubles
[19:47] <voip> :)))
[19:47] <nikitos> sorry (((
[19:48] <voip> llogan, my boss want see in ntsc resolution :)))
[19:48] <voip> for me doest mater :)
[19:48] <llogan> your boss probably won't be able to tell the difference between 25 and 30000/1001 (ntsc video) since ffmpeg will simply duplicate frames to compensate
[19:52] <llogan> anyway, to possibly get what you think you want: ffmpeg -i input -c:v libx264 -maxrate 1800k -bufsize 3600k -vf scale=1280:-1,fps=ntsc -g 2 -c:a copy -f mpegts output
[19:53] <llogan> see http://trac.ffmpeg.org/wiki/EncodingForStreamingSites
[19:53] <llogan> it's msotly about justin.tv, twitch, etc, but it should provide useful info for you
[19:54] <voip> llogan, problem when we copy 720x576 stream , not ergonmcly shows on hdtvs
[19:54] <llogan> that -g is wrong. i keep confusing units. -g 60
[19:54] <voip> llogan, thahnk you
[20:18] <dhaval2712> I think I've found a bug in FFMPEG. I updated and now VLC doesn't work at all and neither could I extract audio from it.
[20:30] <jnvsor> Can you set an x264 crf value and a maximum bitrate or will the max bitrate override the crf?
[20:32] <JEEB> jnvsor, VBV can be used with CRF
[20:32] <JEEB> also remember that you need to set both maxrate and bufsize
[20:32] <JEEB> basically VBV will limit the CRF
[20:32] <JEEB> so that it will not go over the VBV limitations at any point
[20:33] <jnvsor> Righty, great
[21:24] <jnvsor> How come if I use x264opts to set vbv it works but if I use -bufsize it's corrupted and stuff?
[21:46] <jnvsor> Streaming to twitch, getting an error: "Connection failed: Application folder ([install-location]/applications/jnvsor) is missing."
[22:02] <FrEaKmAn_> hi all
[22:02] <FrEaKmAn_> is it possible with ffmpeg to merge 2 videos? so I put 1 small video on top of other?
[22:03] <jnvsor> FrEaKmAn_: Yep, look for the overlay filter
[22:03] <jnvsor> syntax is "[below][above]overlay={opts}[output]"
[22:04] <FrEaKmAn_> great, thanks
[22:29] <voip> Guys, what is mean: frame=  828 fps= 14 q=-1.0 Lsize=    6978kB time=00:00:33.18 bitrate=1722.7kbits/s ?
[22:30] <voip> fps = 14 is it output frame rate ?
[22:30] <voip> http://pastebin.com/MnmhFhaf
[22:31] <jnvsor> Yep
[22:31] <Bumble-Bee> current processing fps
[22:31] <jnvsor> Right, sorry, I use it mainly for realtime recording where it is the output framerate xD
[22:31] <Bumble-Bee> yeah
[22:32] <Bumble-Bee> terms are pretty much interchangeable
[22:32] <jnvsor> Speaking of - what's the best nosie removal audio filter? I saw something about compand but the example didn't do anything
[22:32] <voip> why fps is too slow ?
[22:33] <Bumble-Bee> voip you set threads to more than 1 ?
[22:33] <voip> i didnt set threads
[22:34] <voip> http://pastebin.com/MnmhFhaf
[22:34] <jnvsor> Copy codec + slow network?
[22:34] <voip> jnvsor, 1000mb network :)
[22:35] <Bumble-Bee> just for a laugh
[22:35] <Bumble-Bee> set threads to
[22:35] <Bumble-Bee> cat /proc/cpuinfo | grep processor | wc -l
[22:35] <Bumble-Bee> minus 1
[22:35] <voip> 8 cores
[22:35] <Bumble-Bee> 8 cores of 8 threads ?
[22:36] <Bumble-Bee> amd or intel ?
[22:36] <voip> intel xeon
[22:36] <voip> how te set threats for http://pastebin.com/MnmhFhaf ?
[22:37] <Bumble-Bee> -threads 8
[22:38] <voip> Bumble-Bee, ffmpeg will use 8 threats ?
[22:41] <Aetas> there any way to get an output of a stream's timecodes other than mkvtimestamp_v2 which requires timecodes to be in increasing order?
[22:42] <voip> Bumble-Bee, why i need to use 8 for simple stram copy, also i have 0% cpu ussage
[22:42] <jnvsor> voip: Try it to a file. If it works the problem's with your network
[22:43] <voip> jnvsor, ok
[23:22] <voip> Guys, can i do this: ffmpeg -i http://source_A   udp://aaa.aaa.aaa.aaa:5000
[23:22] <voip> ffmpeg -i http://source_B   udp://aaa.aaa.aaa.aaa:6000
[23:22] <voip> ffmpeg -i http://source_C   udp://aaa.aaa.aaa.aaa:7000
[23:22] <voip> with one command ?
[23:23] <voip> Or shuld run N instances ffmpegs?
[23:28] <llogan> you don't need to set threads with libx264. it will automatically set the correct number for you
[23:29] <llogan> oh, you're stream copying. how fast is it with a local file output?
[23:29] <voip> llogan, ok
[23:30] <voip> but if i want copy N streams form differen sources can i use 1 command ?
[23:30] <voip> ex:
[23:30] <voip> ffmpeg -i http://source_A   udp://aaa.aaa.aaa.aaa:5000
[23:30] <voip> <voip> ffmpeg -i http://source_B   udp://aaa.aaa.aaa.aaa:6000
[23:30] <voip> <voip> ffmpeg -i http://source_C   udp://aaa.aaa.aaa.aaa:7000
[23:30] <voip> ?
[23:31] <llogan> yes. with the -map option
[23:32] <voip> ok, thanks
[23:32] <voip> ona more question :)
[23:33] <llogan> ffmpeg -i input0 -i input1 -i input2 -map 0:v -map 0:a output0 -map 1:v -map 1:a output1 -map 2:v -map 2:a output2
[23:34] <llogan> i don't know if it will be faster or slower than 3 separate processes. you should test.
[23:34] <voip> perfect !
[23:34] <voip> :)
[23:35] <llogan> you may want to use -re as an input option
[23:36] <llogan> or you won't need that because your input is not a local file. i keep forgetting stuff.
[23:36] <voip> no i will copy from network
[23:36] <llogan> -re should not be used with live network streams
[23:38] <llogan> i thought you wanted to re-encode to scale and change fps?
[23:38] <voip> thank you, logan
[23:51] <voip> llogan, sorry maybe i asking too much questions
[23:51] <voip> i have one more question
[23:52] <voip> how to copy from stream  format like: http://178.167.5.37:7777/udp/234.5.2.1:1234
[23:52] <voip> ?
[23:53] <jnvsor> I have a heavy background noise on a microphone - is there an ffmpeg filter I can use to remove it?
[23:55] <llogan> voip: i'm not sure
[23:56] <llogan> jnvsor: if it is within a certain frequency band you could try filters. lowpass, highpass, equalizer, bandreject, etc
[00:00] --- Fri Mar 28 2014


More information about the Ffmpeg-devel-irc mailing list