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

burek burek021 at gmail.com
Sun Apr 9 03:05:01 EEST 2017


[01:44:49 CEST] <sshack> Hi, I'm extracting a video to jpeg files. Is there a way to tag the timecode in the jpeg exif metadata?  I've exhausted my google search powers here.
[01:45:59 CEST] <c_14> not without modifying the source
[01:47:50 CEST] <sshack> So are there some scripts or something to do this?
[01:49:49 CEST] <sshack> Or how about tagging with framenumber?
[01:50:26 CEST] <c_14> the output filename should already contain the framenumber (you might have to use -vsnyc vfr to force vfr output)
[01:50:57 CEST] <sshack> It does yes.
[01:51:28 CEST] <sshack> But can I put the framenumber in metadata? I'll get that thin wedge in, then open up to other things.
[01:51:49 CEST] <c_14> you could technically also run a second pass ffprobe -count_frames -show_entries frame=pkt_pts_time -select_streams v and then write a script to parse that and apply the metadata to the images
[01:52:26 CEST] <c_14> sshack: not without another program to modify the exif data, ffmpeg doesn't do that out of the box
[01:52:57 CEST] <sshack> ffmpeg doesn't write exif at all?
[01:53:35 CEST] <c_14> nope
[01:53:42 CEST] <c_14> (it doesn't write any)
[01:54:02 CEST] <sshack> Okay, that's disappointing. But it makes the path I have to take clear.
[01:54:23 CEST] <sshack> But it could output stuff to stdout which can be parsed?
[01:54:37 CEST] <sshack> two pass processing.
[01:54:41 CEST] <c_14> yep, check the ffprobe manpage
[01:55:13 CEST] <c_14> the command I wrote should be a good starting point
[01:55:26 CEST] <c_14> you might want to change -of to something that you can parse easier, maybe -of json or so
[01:55:41 CEST] <c_14> https://ffmpeg.org/ffprobe.html
[01:56:45 CEST] <sshack> Will do. Thanks.
[01:57:48 CEST] <sshack> But since I know the fps I'm outputting at I think I might just write a meta.txt file with encode parameters in it and read that.
[01:58:05 CEST] <sshack> Then it's an easy loop in my python code to label the dataset.
[01:58:09 CEST] <c_14> if you know your input is cfr, sure
[01:58:39 CEST] <sshack> I can write an encoding script to do that.
[01:59:18 CEST] <sshack> I had just naïvely though ffmpeg could label the output for me while encoding.
[02:10:02 CEST] <TAFB> can I convert 50fps to 60fps video without re-encoding (i.e. speed it up a bit)?
[02:17:26 CEST] <klaxa> TAFB: https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
[02:19:03 CEST] <TAFB> ffmpeg -i input.mkv -filter:v "setpts=0.5*PTS" output.mkv seems to re-encode the output
[02:20:14 CEST] <c_14> You can't do it with ffmpeg without reencoding
[02:20:27 CEST] <TAFB> ok, looks like mkvtoolnix can, testing now
[02:20:31 CEST] <c_14> Depending on your container you might be able to set the container fps using a program specific for that container
[02:23:17 CEST] <TAFB> yep, mkvtoolnix did it instantly, I'll see what it does when I convert .mkv to mp4 now, not sure about the audio though
[02:24:21 CEST] <klaxa> re-encoding audio is usually a lot faster and less of a problem
[02:24:42 CEST] <TAFB> it's pretty horrible quality to begin with but I know i'll have to re-encode it :(
[02:27:21 CEST] <TAFB> using audacity to change "tempo"
[02:29:25 CEST] <klaxa> sounds sane
[02:32:26 CEST] <TAFB> using tempo it makes it sound deeper, using speed it sounds almost exactly the same as the original! 8.843% boost
[02:34:58 CEST] <TAFB> ok, using avidemux to mux the video and audio into .mp4, wish me luck! :)
[02:36:46 CEST] <sshack> Is there an easy way to do aspect correct downscaling? Like 720p down to half size?
[02:37:21 CEST] <TAFB> wow, still plays at 60fps after converting from mkv to mp4!
[02:41:39 CEST] <TAFB> getting some strange numbers... hmmm. How much faster is 60fps than 50fps?? lol.
[02:42:02 CEST] <_bowser_> faster, like encoding? or?
[02:42:07 CEST] <TAFB> percentage
[02:42:50 CEST] <_bowser_> wait, what are you correlating fps with?
[02:43:08 CEST] <TAFB> i'm trying to "stretch" the audio
[02:43:12 CEST] <TAFB> but I can't get the right length
[02:43:13 CEST] <_bowser_> ah, that
[02:43:35 CEST] <_bowser_> there was someone doing that yesterday
[02:43:56 CEST] <_bowser_> there are tools that try to stretch audio without altering pitch, if that's what you want?
[02:44:20 CEST] <TAFB> I'm using "tempo" in audacity
[02:44:26 CEST] <_bowser_> ah
[02:44:36 CEST] <TAFB> but it says 30% difference between 60fps and 50fps, doesn't make much sense to me
[02:44:57 CEST] <_bowser_> makes none to me either since that sounds like video to me
[02:45:26 CEST] <_bowser_> what (application) is telling you about the difference?
[02:46:08 CEST] <c_14> TAFB: 60/50 is 1.2 times as fast
[02:47:00 CEST] <TAFB> ok, sweet. I'll give that ratio a try
[02:47:34 CEST] <TAFB> encoding/muxing now, 42 seconds :)
[02:49:34 CEST] <TAFB> when I put in 1.2 times faster it said 0.8333333333333333 shorter, looks correct so far though.
[02:49:47 CEST] <TAFB> yep, flawless a/v sync right to the end, woot
[02:50:00 CEST] <c_14> 50/60 is 0.83 repeating, so yes
[02:50:13 CEST] <TAFB> ncie
[02:50:51 CEST] <TAFB> 60 looks so much better than 50 :)
[08:44:08 CEST] <thebombzen> is there any particular reason libavcodec needed a native opus encoder?
[08:44:18 CEST] <thebombzen> I'm note sure why effort was put into that when libopus is already good
[09:39:37 CEST] <mavi> Hi, I'm trying to figure out an ideal  bufrate for my x264 encodes. Currently It's set to a 1:4 ratio. So 4 seconds of maxrate. Is that too much or fairly decent?
[09:39:48 CEST] <mavi> I've read on some sites it should be limited to 2 seconds.
[09:44:36 CEST] <mavi> My current settings for low bitrate stuff is -maxrate 425000  -bufsize 1700000, is that too much of a bufsize or is it doable. For the users I don't mind them waiting for a second or two for it to buffer.
[15:09:32 CEST] <smooth_penguin> hey guys, I'm trying to have a hls stream written to a file on disk while trying to have it played back
[15:09:49 CEST] <smooth_penguin> mplayer seems to be able to play back this file, but not VLC
[15:10:09 CEST] <smooth_penguin> my main goal is to have that file played over DLNA by the TV
[15:10:59 CEST] <smooth_penguin> the TV/VLC is only able to playback the file if I stop ffmpeg from writing to the file
[15:11:36 CEST] <smooth_penguin> I'm trying to figure what I should be doing to allow VLC to playback the file as its being written to by ffmpeg
[15:13:11 CEST] <smooth_penguin> vlc complains with "mkv error: cannot find any cluster, damaged file ?"
[15:13:30 CEST] <smooth_penguin> but once ffmpeg stops writing to the file, VLC can play it
[15:19:33 CEST] <klaxa> i'll take a shower back in a few
[15:29:16 CEST] <smooth_penguin> ack
[15:32:39 CEST] <smooth_penguin> https://pastebin.com/pyEwCH7Y <- the stream I write as /tmp/live.mkv
[15:34:33 CEST] <smooth_penguin> https://pastebin.com/WsRsPmtE <- the error I get with vlc when trying to playback /tmp/live.mkv as ffmpeg is writing to it
[15:34:57 CEST] <klaxa> oh you could try to just use a named pipe
[15:35:17 CEST] <smooth_penguin> hmm..
[15:35:31 CEST] <smooth_penguin> can you point me to an example?
[15:35:44 CEST] <klaxa> ffmpeg -i [m3u8] -c copy -f matroska pipe:1 > /tmp/fifo.mkv
[15:35:52 CEST] <klaxa> before that mkfifo /tmp/fifo.mkv
[15:35:58 CEST] <klaxa> and then play with vlc /tmp/fifo.mkv
[15:36:42 CEST] <klaxa> ah i see you use -c:v libx264, in that case use that if you want to
[15:36:55 CEST] <smooth_penguin> ah ok, let me give that a try
[15:37:54 CEST] <klaxa> however, i think ffmpeg will block if nothing reads the pipe
[15:38:47 CEST] <klaxa> this is just a hunch, but you could also try doing that without mkfifo, since writing to a pipe is not seekable the matroska container should be written to be read ahead of writing the trailer
[15:39:04 CEST] <klaxa> i might be wrong though
[15:43:49 CEST] <smooth_penguin> woop! it works if its not a named pipe
[15:44:00 CEST] <smooth_penguin> but the -pipe:1 did the trick
[15:44:09 CEST] <klaxa> nice :)
[15:44:30 CEST] <smooth_penguin> is there a technical explanation as to why it doesn't work without the -pipe:1 ?
[15:44:45 CEST] <klaxa> i gave it already :)
[15:45:05 CEST] <smooth_penguin> "the matroska container should be written to be read ahead of writing the trailer"
[15:45:07 CEST] <Exomene> Hi there. I'd like to know if there is a way to prevent ffplay to receive the keys stroke when launched from the CLI.
[15:45:11 CEST] <klaxa> if the file is seekable (which it is with open()) the matroska container contains information at the start of the file to seek through it
[15:45:29 CEST] <smooth_penguin> hmm
[15:45:38 CEST] <c_14> Exomene: -nostdin afair
[15:45:44 CEST] <klaxa> so you can seek faster, if you write to a pipe, this information is not written since you cannot modify data written to a pipe already
[15:46:02 CEST] <Exomene> thx c_14 I'll try it right now :)
[15:46:16 CEST] <smooth_penguin> thanks for explaining :)
[15:56:19 CEST] <Exomene> c_14, this option doesn't seem to exist on my version
[15:57:17 CEST] <c_14> what version?
[16:00:06 CEST] <Exomene> c_14, ffplay version 3.0.7-0ubuntu0.16.10.1
[16:00:22 CEST] <Exomene> the error is Failed to set value '-vf' for option 'nostdin': Option not found"
[16:01:42 CEST] <c_14> What's your commandline?
[16:02:37 CEST] <Exomene> ffplay -nostdin -vf "hflip" -loglevel quiet -fs /dev/video1
[16:03:58 CEST] <Exomene> I also tried ffplay --nostdin -vf "hflip" -loglevel quiet -fs /dev/video1
[16:04:08 CEST] <c_14> Ah, I misread. ffplay doesn't have that option
[16:04:25 CEST] <c_14> I don't think ffplay can disable keybindings
[16:07:34 CEST] <Exomene> c_14, I'm not bind to ffplay. If there is another program which can display /dev/video1 fullscreen undecorated, I'll take it :)
[16:07:45 CEST] <c_14> mpv?
[16:08:18 CEST] <MonkeyofDoom> ^
[16:16:19 CEST] <Exomene> c_14, very interesting, I'll test that. Thank you very much
[17:09:13 CEST] <Exomene> c_14, it needed some googling to make it work with v4l2 but now it does exactly what I want
[17:52:39 CEST] <Tecan> on 177 kb png it made a 43 kb jpg and guetzli made a 38 kb jpg  5 kb less
[17:53:00 CEST] <Tecan> could not compress it anymore with 7z , or pdf
[18:15:11 CEST] <gurki> Tecan: how about sth reasonable like jpeg2000?
[18:15:59 CEST] <gurki> guetzli actually sucks. the only reason ppl use it that ppl are too lazy to implement recent image standards
[20:51:27 CEST] <Dan39> hello \o
[20:51:56 CEST] <Dan39> is there an easy way to create a video of a specific length using the last from of another video?
[20:52:03 CEST] <Dan39> last frame*
[21:00:05 CEST] <gurki> the answer is yes, but i dont recall the specific command. google should tell you
[21:00:08 CEST] <gurki> :)
[21:00:56 CEST] <dl2s40> i thought about the same :D pick last frame and loop.. yeah should not be hard.
[21:02:22 CEST] <Dan39> hmm it seems there are some ways, but they dont look great
[21:12:38 CEST] <jocke_> Hello. Trying to install ffmpeg 3.2.4 on Linux Mint. Get error when running ./configure
[21:12:48 CEST] <jocke_> yasm/nasm not found or too old. Use --disable-yasm for a crippled build.
[21:13:28 CEST] <BtbN> So, install it
[21:13:38 CEST] <jocke_> When disabling yasm, build is ok.
[21:13:47 CEST] <thebombzen> sudo apt-get install yasm
[21:13:57 CEST] <thebombzen> you're going to want yasm anyway
[21:14:09 CEST] <thebombzen> it's used in many projects as a preferred assembler
[21:14:19 CEST] <jocke_> aha. i'm very noob at this.
[21:14:32 CEST] <BtbN> nasm will replace it in the future though
[21:14:41 CEST] <thebombzen> what do you mean?
[21:14:46 CEST] <thebombzen> I thought Yasm was a free clone of Nasm
[21:15:14 CEST] <BtbN> It doesn't even support avx-512, development has more or less stopped
[21:15:17 CEST] <jocke_> do i need to 'un-configure'?
[21:15:56 CEST] <thebombzen> with ffmpeg, no
[21:16:07 CEST] <BtbN> well, you do need to configure again
[21:16:09 CEST] <thebombzen> if it failed the first time, especially not
[21:18:26 CEST] <jocke_> ok, installed yasm, now everything looks fine!
[21:18:49 CEST] <jocke_> Thanks!
[21:21:24 CEST] <thebombzen> ah upon further inspection Yasm used to be better and free
[21:21:36 CEST] <thebombzen> but Nasm has picked up development, and is now 2-clause BSD
[21:25:45 CEST] <jocke_> hm, I guess both yasm and Nasm are above my skills at the moment
[21:29:28 CEST] <thebombzen> Then just install them and leave htem around
[21:29:47 CEST] <thebombzen> I don't write assembly code either but because there are people who do, having yasm installed is useful
[21:30:08 CEST] <jocke_> yes. make is working, takes some time. pc from 2005 i think.
[21:30:38 CEST] <thebombzen> ffmpeg takes a long time to compile so that's not a surprise
[21:31:11 CEST] <jocke_> i think this is first time i compile anything :)
[21:31:31 CEST] <thebombzen> does your CPU have multiple cores?
[21:32:00 CEST] <jocke_> dunno. probably not. i wonder how to check in Mint.
[21:32:36 CEST] <furq> nproc
[21:32:37 CEST] <thebombzen> lscpu
[21:32:47 CEST] <thebombzen> nproc will do it better lol
[21:33:11 CEST] <jocke_> nproc says 1
[21:33:16 CEST] <furq> nice
[21:33:24 CEST] <furq> if that's a cpu from 2005 then i'm not surprised
[21:33:24 CEST] <thebombzen> old computer
[21:33:43 CEST] <thebombzen> it's not surprising but might have had two
[21:34:08 CEST] <furq> the first consumer dual core cpus didn't show up till 2005
[21:34:14 CEST] <furq> and those were shit
[21:34:21 CEST] <jocke_> lscu says GenuineIntel, CPU family 6.  1396.645 MHz.
[21:34:45 CEST] <furq> actually i guess the athlon x2 was 2005 as well, and those were quite good
[21:35:32 CEST] <furq> i don't know what that would even be that's running at 1.4ghz
[21:36:05 CEST] <jocke_> Dell Inspiron 1300
[21:36:35 CEST] <furq> oh right, a celeron m
[21:36:51 CEST] <furq> you'll definitely be wanting assembly optimisations then ;_;
[21:36:58 CEST] <furq> although i'm not sure how much it'll help
[21:38:49 CEST] <jocke_> i'm looking around in the Linux world. Have a few newer Macs also, but i can't get everything to work properly.
[21:39:12 CEST] <jocke_> Linux on my Macs, I mean.
[21:39:37 CEST] <furq> are they ppc or intel
[21:39:51 CEST] <jocke_> intel
[21:40:16 CEST] <jocke_> problems with screen and wireless
[21:40:33 CEST] <jocke_> and sleep
[21:40:36 CEST] <furq> i'm not sure if it's worth the hassle of switching on an intel mac
[21:40:50 CEST] <furq> at least on ppc you get an os that's been updated this decade
[21:41:20 CEST] <furq> and also an os that isn't osx, obviously
[21:42:58 CEST] <jocke_> I've dual booted for half a year I think. Much is fine. But OSX and Macs works quite good.
[21:44:21 CEST] <jocke_> Wanted to go full FSS, but Trisquel had trouble. Ubuntu worked, but too much hassle.
[21:47:20 CEST] <gurki> why would i buy premium for the osx hardware just to put linux on it? Oo
[21:47:32 CEST] <gurki> i understand ppl buying mac for osx, but the hw itself is pretty crappy for the buck
[21:48:04 CEST] <gurki> pay*
[21:49:54 CEST] <jocke_> True. I heard of FSS a year ago and was curious. Left Windows 2004.
[22:00:52 CEST] <jocke_> Compilation done. But make install ends in error.
[22:01:16 CEST] <jocke_> cannot create directory /usr/local/share/man/man1: Permission denied
[22:02:02 CEST] <BtbN> don't make install.
[22:03:31 CEST] <jocke_> what to do then?
[22:03:51 CEST] <BtbN> Use the ffmpeg binary it just finished building?
[22:04:51 CEST] <jocke_> make is done, yes. Then INSTALL.md says: 3. Type `make install` to install all binaries and libraries you built.
[22:05:32 CEST] <BtbN> Why do you want to install them? Installing a foreign set of libav* is primarily bad
[22:06:54 CEST] <DHE> I just copy ffmpeg, ffprobe and (if available) ffplay to /usr/local/bin...
[22:07:04 CEST] <jocke_> ok. I don't know. I need to run a ffmpeg command, thats why downloaded ffmpeg.
[22:07:47 CEST] <jocke_> I see local/share/man is root root.
[22:13:17 CEST] <jocke_> I couldn't copy to /usr/local/bin, permission denied.
[22:15:21 CEST] <gurki> jocke_: why dont you just add the dir containing the binarys to your PATH variable?
[22:15:42 CEST] <gurki> export PATH=/where/ever/that/is:$PATH
[22:18:39 CEST] <jocke_>  That worked like charm!
[22:19:38 CEST] <gurki> :-)
[22:19:46 CEST] <jocke_> But I do not understand why I shouldn't do make install. Can you explain?
[22:20:05 CEST] <gurki> make install moves the binaries to the place where the system stores its binaries
[22:20:09 CEST] <furq> there's no reason not to do that if you're on mint and it's going to /usr/local
[22:20:10 CEST] <gurki> so you can find it
[22:20:22 CEST] <gurki> youll need root permisions to do that though
[22:20:22 CEST] <furq> only user-built stuff goes to /usr/local on debian derivatives
[22:20:37 CEST] <furq> although yeah you'll need root privs
[22:20:56 CEST] <gurki> whenever you type a command, linux will look for binaries with that name in whatever is in your path variable
[22:21:12 CEST] <gurki> .. the system ones are there per default
[22:21:36 CEST] <jocke_> I guess I have root privs. At least I installed Mint some months ago.
[22:21:55 CEST] <gurki> so you need to run make install while being root :)
[22:22:05 CEST] <jocke_> is that sudo?
[22:22:17 CEST] <gurki> sudo will run a single command with root priviledges
[22:22:22 CEST] <gurki> su will make you root
[22:22:48 CEST] <gurki> you should try not to be root whenever possible
[22:23:13 CEST] <Dan39> just sudo su and be done with it :D
[22:23:20 CEST] <gurki> and dont do what Dan39 said.
[22:23:30 CEST] <Dan39> /s
[22:23:48 CEST] <gurki> either su or sudo. sudo su is a bad idea
[22:23:59 CEST] <jocke_> ah. I'll try sudo make install then.
[22:24:04 CEST] <gurki> yes :)
[22:25:12 CEST] <durandal_1707> sudo rm -rf /
[22:25:40 CEST] <durandal_1707> that will install latest ffmpeg
[22:26:03 CEST] <jocke_> i think that looks very suspect
[22:27:47 CEST] <durandal_1707> yes, dont try it
[22:37:27 CEST] <jocke_> well, everything works now. Many thanks.
[00:00:00 CEST] --- Sun Apr  9 2017


More information about the Ffmpeg-devel-irc mailing list