[Ffmpeg-devel-irc] ffmpeg.log.20151129
burek
burek021 at gmail.com
Mon Nov 30 02:05:02 CET 2015
[00:24:25 CET] <MINIMAN10000> Alright so I'm trying to stream to twitch with ffmpeg using ffmpeg -rtbufsize 2100M -f dshow -i video="screen-capture-recorder" -r 5 -preset faster -threads 2 -f flv "rtmp://live-sea.twitch.tv/app/*key*"
[00:24:27 CET] <visualshock> Can I use ffmpeg to combine ts files?
[00:24:48 CET] <c_14> visualshock: yes
[00:25:06 CET] <visualshock> c_14, do you know if it is more efficient than cat?
[00:25:21 CET] <MINIMAN10000> but i can't actually get the stream to work and it says: Codec AVOption preset (Configuration preset) specified for output file #0 (rtmp://live-sea.twitch.tv/app/key) has not been used for any stream.
[00:25:31 CET] <c_14> visualshock: efficient as in faster? probably not
[00:25:48 CET] <furq> MINIMAN10000: -c:v libx264
[00:27:02 CET] <MINIMAN10000> http://pastebin.com/D1YqnCUX
[00:27:25 CET] <MINIMAN10000> lol
[00:27:28 CET] <MINIMAN10000> i failed to catch em all
[00:27:41 CET] <MINIMAN10000> key reset
[00:30:46 CET] <MINIMAN10000> fflogger, well I got a new error http://pastebin.com/kMaqUkNY
[00:31:38 CET] <MINIMAN10000> derp
[00:31:42 CET] <MINIMAN10000> i changed key didnt update
[00:36:10 CET] <MINIMAN10000> alrighty
[00:36:26 CET] <MINIMAN10000> now i'm back to the problem i normally have even when not streaming
[00:36:33 CET] <MINIMAN10000> and it does say live
[00:37:16 CET] <c_14> what problem?
[00:38:03 CET] <MINIMAN10000> alright got that problem to go away for now
[00:38:14 CET] <MINIMAN10000> the one where the realtime buffer fills up and it uses all my ram
[00:38:28 CET] <MINIMAN10000> but changing the bitrate seems to settle it down
[00:38:44 CET] <MINIMAN10000> nope nevermind it just took longer guess i do have to solve it
[00:39:28 CET] <c_14> If you really only want 5fps output, just put -framerate 5 before the -i
[00:40:09 CET] <MINIMAN10000> alright
[00:43:06 CET] <MINIMAN10000> Alright i used ctrl-c to stop this one http://pastebin.com/RVzusGwg
[00:44:02 CET] <c_14> up the preset to veryfast or ultrafast
[00:44:06 CET] <c_14> or increase the threadcount
[00:44:31 CET] <c_14> You're not encoding fast enough
[00:46:14 CET] <Putti> c_14, that makes it use more bandwith, right?
[00:46:24 CET] <c_14> yes
[00:46:54 CET] <furq> for the same quality, yes
[00:47:02 CET] <furq> nvm wrong person
[00:47:28 CET] <MINIMAN10000> huh you're right... for some reason that thought didn't occur to me
[00:48:20 CET] <MINIMAN10000> thanks for the help
[00:49:20 CET] <MINIMAN10000> now it looks like the only anomaly left is the fact there is no video on twitch
[00:49:46 CET] <MINIMAN10000> which is the only problem i didn't anticipate
[00:50:10 CET] <MINIMAN10000> hmm
[00:57:17 CET] <MINIMAN10000> huh
[00:57:21 CET] <MINIMAN10000> it says video resolution is 0 x 0
[00:57:24 CET] <MINIMAN10000> fps 0
[01:02:44 CET] <MINIMAN10000> No video on twitch I'm running out of ideas lol http://pastebin.com/gBbheVCs
[01:03:37 CET] <c_14> What's the fps output saying?
[01:04:31 CET] <MINIMAN10000> on twitch?
[01:04:38 CET] <c_14> ffmpeg
[01:04:41 CET] <MINIMAN10000> 15
[01:04:59 CET] <c_14> too low
[01:05:02 CET] <c_14> should be 30
[01:05:17 CET] <MINIMAN10000> jeeze lol
[01:05:19 CET] <MINIMAN10000> now that you mention it
[01:05:22 CET] <c_14> try outputting to a file instead of twitch
[01:05:27 CET] <c_14> It's either network or cpu
[01:05:39 CET] <MINIMAN10000> cpu
[01:08:17 CET] <MINIMAN10000> 16 fps as a file
[01:09:12 CET] <c_14> probably the cpu
[01:09:50 CET] <c_14> If you have more threads, increase the threadcount. Otherwise drop the resolution or get a faster cpu
[01:09:54 CET] <MINIMAN10000> no mor ethreads
[01:09:57 CET] <MINIMAN10000> no more threads*
[01:11:37 CET] <MINIMAN10000> 480*270 18 fps
[01:12:43 CET] <c_14> What if you use -c:v zlib with the local file
[01:12:54 CET] <MINIMAN10000> zlib?
[01:13:01 CET] <c_14> just testing something
[01:13:59 CET] <MINIMAN10000> no idea how to use it, no idea what it is
[01:14:05 CET] <furq> MINIMAN10000: if you have a dualcore cpu you should be using -threads 3 with libx264
[01:14:12 CET] <c_14> just swap -c:v libx264 with -c:v zlib
[01:14:17 CET] <MINIMAN10000> oh i just assumed ffmpeg was being derpy with 3 threads
[01:14:31 CET] <furq> no it defaults to 1.5 * hw threads
[01:14:38 CET] <c_14> If you don't need to artificially limit ffmpeg's speed, just don't set -threads
[01:14:39 CET] <Putti> MINIMAN10000, if you want to stream to twitch and you have GPU maybe you could try to use some GPU encoder with ffmpeg (if there are(?)) or, OBS (Open Broadcaster Software) which is good with screen recording streaming.
[01:14:52 CET] <furq> although yeah just don't set -threads if you're not trying to peg to specific cores
[01:15:40 CET] <MINIMAN10000> 17 fps
[01:15:57 CET] <MINIMAN10000> now 16
[01:16:03 CET] <furq> is it actually using 100% cpu
[01:16:19 CET] <c_14> Maybe dshow isn't producing enough frames...
[01:16:30 CET] <MINIMAN10000> jumping around 75-90
[01:16:51 CET] <MINIMAN10000> http://puu.sh/lCfGN/e97e443f40.png
[01:18:40 CET] <MINIMAN10000> seems to mostly be sitting at 70% till i actually look at it it starts jumping around lol
[01:27:25 CET] <MINIMAN10000> so do you think it could be screen-capture-recorder taking up a bunch of cpu to capture the screen
[01:28:24 CET] <c_14> could be, you can try testing with -f lavfi -i testsrc instead
[01:28:33 CET] <c_14> to see if it's the capturing or the encoding that's doing it
[01:31:00 CET] <MINIMAN10000> I must be doing something wrong it doesnt like -framerate http://pastebin.com/2FnJEe20
[01:31:28 CET] <c_14> ye, get rid of that temporarily as well, and the rtbufsize
[01:31:38 CET] <MINIMAN10000> 260 fps
[01:31:43 CET] <MINIMAN10000> 250 and dropping
[01:32:02 CET] <c_14> Ok, now with libx264 instead of zlib?
[01:32:23 CET] <MINIMAN10000> 730 fps
[01:32:46 CET] <MINIMAN10000> 510 fps and seems to stablaize
[01:32:49 CET] <c_14> So the problem is the screen-capture-recorder
[01:33:08 CET] <MINIMAN10000> gah took me a while to find a way to capture my screen on windows
[01:33:12 CET] <MINIMAN10000> i finally found that
[01:33:17 CET] <c_14> use gdigrab?
[01:33:21 CET] <MINIMAN10000> no idea how to use it
[01:33:46 CET] <c_14> https://ffmpeg.org/ffmpeg-devices.html#gdigrab
[01:35:31 CET] <MINIMAN10000> input desktop 15 fps
[01:37:12 CET] <maco1717> hi everyone
[01:37:39 CET] <MINIMAN10000> man obs makes streaming 30 fps seem so easy
[01:44:04 CET] <maco1717> Im trying to stream from my usb capturer [Bus 001 Device 004: ID 18ec:5850 Arkmicro Technologies Inc.] on a raspberry pi 2 wih raspbian, ive tried everything ive managed to find around, but nothin seam to work. i getall sort fo error, like operation not permited, couldt not find codec parameter, unknown input format, like that, I suspect it has to
[01:44:05 CET] <maco1717> do with the codec parameters, could someone give me a hand?
[01:49:00 CET] <maco1717> at the end im just trying with this command
[01:49:02 CET] <maco1717> ffmpeg -i /dev/video0 http://localhost:8090/feed1.ffm
[01:57:31 CET] <Putti> maco1717, found from stackoverflow (by user Val): ffmpeg -f video4linux2 -s 640x480 -r 15 -vcodec h264 -i /dev/video0 -an http://localhost:8099/feed1.ffm , maybe something like that would work
[01:59:45 CET] <Putti> operation not permitted might be because either dev/video0 can be viewed by superuser or because you cannot open that 8090 port or something similar :D
[02:01:13 CET] <Putti> ^ I meant to say that can only be viewed by superuser
[02:03:46 CET] <maco1717> i tried running it with sudo tho
[02:04:15 CET] <maco1717> when i run the StackO command you provided me i get
[02:04:17 CET] <maco1717> Unknown input format: 'video4linux2'
[02:04:43 CET] <maco1717> :S
[02:04:44 CET] <maco1717> :(
[02:05:40 CET] <c_14> Is your build built with libv4l2?
[02:08:17 CET] <maco1717> I dont know
[02:08:25 CET] <maco1717> how can i find out?
[02:08:43 CET] <c_14> ffmpeg -devices
[02:08:51 CET] <c_14> check for v4l2 or video4linux2
[02:09:11 CET] <maco1717> Missing argument for option 'devices'
[02:10:04 CET] <c_14> eeeeh
[02:10:11 CET] <c_14> What version?
[02:10:21 CET] <c_14> You can also check in the configuration: line for --enable-libv4l2
[02:11:06 CET] <maco1717> ffmpeg 0.8.17-6:0.8.17-1+rpi1
[02:11:06 CET] <maco1717> libavutil 51. 22. 3 / 51. 22. 3
[02:11:06 CET] <maco1717> libavcodec 53. 35. 0 / 53. 35. 0
[02:11:06 CET] <maco1717> libavformat 53. 21. 1 / 53. 21. 1
[02:11:06 CET] <maco1717> libavdevice 53. 2. 0 / 53. 2. 0
[02:11:06 CET] <maco1717> libavfilter 2. 15. 0 / 2. 15. 0
[02:11:06 CET] <maco1717> libswscale 2. 1. 0 / 2. 1. 1
[02:11:07 CET] <maco1717> libpostproc 52. 0. 0 / 52. 0.100
[02:11:40 CET] <c_14> ah, well
[02:11:46 CET] <c_14> That's ancient
[02:11:54 CET] <maco1717> ahhhh!
[02:11:56 CET] <maco1717> ok
[02:12:05 CET] <maco1717> ill start with that
[02:12:05 CET] <maco1717> then
[02:12:07 CET] <maco1717> thx
[02:12:29 CET] <maco1717> I've been reading so many tuts i dont even know which one a followed anymore
[02:12:39 CET] <furq> maco1717: if it's an rpi2 then you might be able to just install ffmpeg from the debian armv7 packages
[02:12:54 CET] <furq> s/armv7/armhf/
[02:13:14 CET] <maco1717> ok ill try that
[02:13:22 CET] <furq> i suspect raspbian is already using some debian repositories
[02:13:29 CET] <maco1717> any tutorial ?
[02:13:31 CET] <maco1717> xD
[02:13:44 CET] <furq> paste your /etc/apt/apt.conf to a pastebin
[02:13:52 CET] <furq> er
[02:13:56 CET] <furq> /etc/apt/sources.list
[02:14:52 CET] <maco1717> deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
[02:14:53 CET] <maco1717> # Uncomment line below then 'apt-get update' to enable 'apt-get source' deb-src
[02:14:53 CET] <maco1717> #http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
[02:14:53 CET] <maco1717> deb-src http://www.deb-multimedia.org sid main
[02:14:53 CET] <maco1717> deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy main
[02:15:01 CET] <maco1717> ive changed it a couple times today...
[02:17:35 CET] <furq> have you upgraded it since raspbian upgraded to jessie
[02:18:00 CET] <maco1717> yeah
[02:18:20 CET] <maco1717> eh
[02:18:23 CET] <maco1717> i dont know
[02:18:32 CET] <maco1717> looks like i have wheezy
[02:18:46 CET] <maco1717> ive upgraded it today tho
[02:19:00 CET] <furq> if you're on jessie then you might just be able to use debian's jessie-backports repo
[02:19:47 CET] <furq> the armhf packages will work on an rpi2
[02:21:53 CET] <maco1717> thanks ill give it a try
[03:27:33 CET] <Che-Anarch> Can I use ffprobe to inspect a particular point on video timeline?
[03:27:56 CET] <Che-Anarch> Looking for a way of ensuring that the end duration as claimed is there.
[03:39:37 CET] <waressearcher2> Che-Anarch: hallo
[03:41:16 CET] <Che-Anarch> what is hallo?
[03:55:38 CET] <Che-Anarch> I'd just like to read / confirm the nearing frames from whats confirmed via: ffprobe -i VIDEO.mkv -show_entries format=duration -loglevel 16
[03:55:59 CET] <Che-Anarch> That is the end durations if its present.
[04:01:10 CET] <c_14> Che-Anarch: use -read_intervals?
[04:11:05 CET] <Che-Anarch> c_14 but how? how to say last X seconds? or frames?
[04:13:07 CET] <c_14> mhm, don't think you can seek from eof in that
[04:22:26 CET] <Che-Anarch> c_14 can I use the duration tiem I get back somehow?
[04:22:47 CET] <c_14> If you think you know how long it should be, sure.
[04:26:39 CET] <Che-Anarch> c_14 so: total=$(ffprobe -i AFILE.mkv -show_entries format=duration -loglevel 16 | grep duration= | awk -F'=' '{print $2}') ; echo "total time == $total" # thats the total I know for a file
[04:28:24 CET] <Che-Anarch> How can I use that total time in seconds to say get the the end claimed duration? - or do I need another value?
[04:29:45 CET] <c_14> What's the end claimed duration? are you trying to check that the duration ffprobe reports is the actual file duration?
[04:31:57 CET] <Che-Anarch> c_14 yes - cause i noticed during copy / while its beeing copied it still passes / doesnt complain or give any output - so this is the only way I could think of for validating that the video is truely ready.
[04:33:16 CET] <c_14> you can use -read_intervals $total-1%+10 or something, you'll have to do the -1 in shell/scripting language math though
[04:33:26 CET] <c_14> eh
[04:34:23 CET] <c_14> Actually, I'm not sure what that would do if it can't reach the end.
[04:37:22 CET] <Che-Anarch> Hmmm it still doesnt complain - no visible error
[04:38:39 CET] <c_14> you could use ffmpeg -i file -f null /dev/null and then check the time=
[04:39:24 CET] <Che-Anarch> Can I feed the time the same way to that?
[04:40:03 CET] <Che-Anarch> So it doesnt do that whole file?
[04:43:47 CET] <c_14> You could add a -ss to approximately where you think the end would be, then you'd have to add the seek time to the listed time
[04:47:17 CET] <Che-Anarch> ffmpeg -i FILE.mkv -ss 00:23:17.88 -f null /dev/null ; # ?? that doesnt work with -t 1 either :-(
[04:48:55 CET] <c_14> That one will still decode the entire video. place the -ss before the -i. And what do you mean that won't work with -t ?
[04:57:40 CET] <Che-Anarch> c_14 I thought maybe I can do a single still frame capture is that possible?
[04:57:58 CET] <c_14> -frames:v 1
[04:58:07 CET] <Che-Anarch> That should fail is the frame is not there?
[05:01:20 CET] <c_14> It'll throw a warning, but it will still exit successfully
[05:02:41 CET] <Che-Anarch> ffmpeg -i FILE.mkv -ss 00:23:17.88 -frames:v 1 -f null /dev/null # ?
[05:02:59 CET] <Che-Anarch> It just hang / wait indefinatly cant see any obvious error messages
[05:03:09 CET] <c_14> put the -ss before the -i
[05:04:29 CET] <Che-Anarch> 'Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)' wooo hoo!
[12:08:21 CET] <arod_> what's the right way to fix video clips with inconsistent frame rate? Clips are from my motoG smartphone and I get slightly different FPS values (29,3 to 29,6)
[12:09:29 CET] <arod_> ffmpeg -i input.mp4 -r 25 output.mpg seem to work but file size is much smaller and the clip is re-encoded
[12:13:19 CET] <waressearcher2> arod_: hallo
[12:52:25 CET] <Mavrik> arod_, smartphones don't to CFR recording, the framerate is always variable.
[12:52:50 CET] <Mavrik> I'd suggest against trying to "fix" that because it'll make videos stuttery.
[12:53:08 CET] <arod_> Mavrik: I've learned it the hard way :(
[12:54:11 CET] <arod_> Mavrik: so how can I use that clips in a video editor? NLEs require a fixed and consistent FPS
[12:55:00 CET] <Mavrik> Well, you'll have to convert it I guess or choose a better editor :/
[12:55:07 CET] <Mavrik> That'll require full reencode with fps filter.
[12:55:28 CET] <Mavrik> ffmpeg -i <file> -c:v libx264 -crf 23 -vf fps=30 -c:a copy blah.mp4
[12:56:24 CET] <arod_> I meant that with "fix"
[12:57:02 CET] <arod_> Mavrik: what NLE would you suggest?
[13:14:51 CET] <Mavrik> arod, I don't do video editing, so I really can't give you a useful answer :/
[16:25:31 CET] <c_14> Fyr: not yet, but I just pinged the patch
[17:59:45 CET] <Gunni> hey, i am trying to remove an audio channel from a dual audio video file, the original sounds fine but when i use the following command the audio goes severely out of sync -- ffmpeg -i in.avi -map 0:0 -map 0:2 -acodec copy -vcodec copy out.avi
[18:00:05 CET] <Gunni> any ideas how to keep the result in sync?
[19:36:20 CET] <aphorise> Is there a min / max or convention to time string? like can one get 00:00:00.8727 for example? I'm relaying on: sTime=$(ffprobe -i FILE.mkv -select_streams v -show_streams 2>&1 | grep Duration | awk -F': ' '{print $2}' | awk -F', ' '{print $1}'); echo $sTime ; # should
[19:39:15 CET] <aphorise> Cause on the `DURATION` Metadata of some of the output tracks for example I can see rather long '000...' strings
[20:13:29 CET] <Gunni> hey, i am trying to remove an audio channel from a dual audio video file, the original sounds fine but when i use the following command the audio goes severely out of sync -- ffmpeg -i in.avi -map 0:0 -map 0:2 -acodec copy -vcodec copy out.avi
[21:33:11 CET] <aphorise> Got what I needed done for confirming validity of vide files by -1 seconds encoding files - but its rather taxing my script is now ~ 3-4 times slower that when I was doing ffprobe.
[21:33:30 CET] <aphorise> I wish there was another faster way of confirming readiness of files.
[21:34:44 CET] <aphorise> I guess that whole opening file + seeking time at approximation request but output is a rather taxing process
[00:00:00 CET] --- Mon Nov 30 2015
More information about the Ffmpeg-devel-irc
mailing list