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

burek burek021 at gmail.com
Sat Jun 9 03:05:02 EEST 2018


[01:03:38 CEST] <YaMoonSun> Hey there; I'm trying to clip a segment from a video and the output seems to have a second or two more audio than it does video. Why is that?
[03:40:06 CEST] <Woodpecker> Does ffmpeg have any mimetypes associated with it? Just making a script to use with concat, and I am pretty ocd with this sort of thing.
[03:59:28 CEST] <kepstin> Woodpecker: ffmpeg doesn't really use mime types at all, its format autodetection is based on filenames and probing content only
[03:59:58 CEST] <kepstin> many formats it can read have mime types assigned, of course.
[04:01:59 CEST] <atomnuker> actually it does use mime type for probing
[04:04:55 CEST] <kepstin> i suppose if you your source is e.g. http
[04:05:05 CEST] <kepstin> or if you're writing a custom app that provides it via the api
[04:05:54 CEST] <Woodpecker> kepstin: okay. I am just going to write .ffmpeg ;p
[04:07:32 CEST] <kepstin> if you're using mime types to set up file associations for something that simply runs ffmpeg internally, just look up mime types for all the containers you care about and add them :/
[05:15:03 CEST] <nickd1239012> newbie here - can anyone help me figure out how to extract a scte 35 message from a stream ?
[05:33:11 CEST] <nickd1239012> anyone?
[06:00:01 CEST] <nickd1239012> newbie here - can anyone help me figure out how to extract a scte 35 message from a stream ?
[09:13:11 CEST] <crigges> Hello, Iam currently trying to build FFmpeg with openh264 under windows using msvc by following this guide https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC  The build without openh264 already works fine, however for me it's not 100% clear where exactly I can link external libraries explained in this part:
[09:13:21 CEST] <crigges> "In order to build FFmpeg with support to external libraries, you need to make sure that the libraries and headers are placed in a location specified by the INCLUDE and LIB directories referenced by the VC compiler and linker."
[11:39:28 CEST] <vishal733> testing..
[11:41:04 CEST] <vishal733> Hello. I notice an issue when I try to create short samples of a large video using ffmpeg. The number of audio channels in container of output video always seems to be 2 (where-as originally audio channels could be mono, 2, 5.1, 7.1). It this a bug, or am I missing some parameter in my ffmpeg command..
[11:41:09 CEST] <vishal733> Here's the command I use:
[11:41:26 CEST] <vishal733> ffmpeg -ss 40 -i in.mp4 -t 125 -vcodec copy -acodec copy -map 0 -avoid_negative_ts 1 out.mpr
[11:41:34 CEST] <vishal733> ffmpeg -ss 40 -i in.mp4 -t 125 -vcodec copy -acodec copy -map 0 -avoid_negative_ts 1 out.mp4
[11:42:28 CEST] <vishal733> And here's the output of mediainfo on out.mp4 (Audio Channels=2, AudioChannels_Orig=1).. here in.mp4 is a mono audio channel video
[11:42:30 CEST] <vishal733> https://pastebin.com/86CULNMS
[11:42:58 CEST] <vishal733> ffmpeg version: 4.0
[11:52:02 CEST] <durandal_1707> vishal733: give info about in.mp4
[11:54:22 CEST] <vishal733> sure
[11:55:07 CEST] <vishal733> #durandal_1707: mediainfo details for input video: https://pastebin.com/HeJKaFiT
[11:57:50 CEST] <Zexaron> visha1773: it could be, but why not just force the channels then to make it workaround
[12:00:43 CEST] <Zexaron> with the ac command
[12:01:55 CEST] <Zexaron> but I would have to check logs again about more details regarding sorround mixing, been some time we had a big discussion of that here, but probably might not be necessary for your case
[12:04:49 CEST] <vishal733> #Zexarom: sure. I guess forcing the output channel should work for me.. (at least for mono)
[12:05:07 CEST] <vishal733> in case of 5.1 audios.. I will have to figure out if it's possible to force audio channels simply like that
[12:05:17 CEST] <vishal733> in any case, I guess this is a bug, and should be resolved..
[12:05:47 CEST] <vishal733> and I have noticed this bug across multiple videos.. when cropping segments from videos with diff. num of channels
[12:05:55 CEST] <vishal733> thanks. didn't know about the ac command earlier
[12:07:45 CEST] <vishal733> So even this command doesn't solve it for me: ffmpeg -ss 40 -i in.mp4 -t 125 -vcodec copy -acodec copy -ac 1  out.mp4
[12:08:37 CEST] <vishal733> nor this: ffmpeg -ss 40 -i in.mp4 -t 125 -vcodec copy -ac 1  out.mp4 (audio being re-encoded here)
[12:10:41 CEST] <vishal733> nor this: ffmpeg -ss 40 -i in.mp4 -t 125  -ac 1  out.mp4 (both audio and video being re-encoded here)
[12:24:37 CEST] <Zexaron> visha1773: if you don't specify -ac, the default is 2, stereo, so that's maybe overriding things, may not be a bug
[12:25:13 CEST] <Zexaron> however, if you use copy, then that should override the default, so maybe you're right
[12:26:19 CEST] <furq> uh
[12:26:28 CEST] <furq> channel count should absolutely not be touched if you're copying the audio
[12:26:36 CEST] <furq> are you sure it's mapping the correct stream
[12:28:01 CEST] <vishal733> I can share the video with you guys..
[12:28:29 CEST] <vishal733> I already shared the command I've used. along with mediainfo for input, and output..
[12:29:00 CEST] <Zexaron> probably not going to make a difference unless is some kind of a weird corrupt file
[12:29:04 CEST] <vishal733> furq: Regarding this "are you sure it's mapping the correct stream".. how can I be confirm your ponit?
[12:29:36 CEST] <furq> nvm i didn't see the mediainfo of the input
[12:29:49 CEST] <furq> the mediainfo of the output looks pretty suspect though
[12:29:49 CEST] <vishal733> Zexaron: I don't think there's anything wrong with this file
[12:30:23 CEST] <vishal733> furq: tell me more.. what's odd about the output mediainfo?
[12:30:42 CEST] <furq> 2 channels, but channel positions: front C
[12:30:54 CEST] <furq> one of those must be wrong
[12:31:06 CEST] <furq> what does ffprobe -show_streams say
[12:31:07 CEST] <vishal733> yes. and there's also a field Channels_Original, which is one
[12:31:32 CEST] <vishal733> I read about this on mediainfo wiki. So number of channels info is contained both in container, and via raw stream
[12:31:36 CEST] <Zexaron> why don't you try using ffprobe --analyzeduration 99999 -probesize 999999 filepath  to get more accurate details , mediainfo can't always be trusted
[12:31:43 CEST] <vishal733> so AudioChannels is what is value stored in container
[12:31:46 CEST] <furq> afaik ffmpeg will only ever automatically up/downmix if the encoder doesn't support the requested layout
[12:31:50 CEST] <Zexaron> and the show_streams ofcourse
[12:31:57 CEST] <vishal733> but actual raw stream contains one channel (as denoted by Channels_Original)
[12:32:04 CEST] <vishal733> sure
[12:32:06 CEST] <vishal733> will try
[12:32:07 CEST] <furq> and aac definitely supports mono and 5.1
[12:33:02 CEST] <furq> nvm i just tested it
[12:33:22 CEST] <furq> i would probably call that a mediainfo bug
[12:33:55 CEST] <vishal733> so with ffprobe it does say mono
[12:33:59 CEST] <vishal733> let me fetch the details..
[12:34:17 CEST] <vishal733> I think it could still be a bug with ffmpeg. It writing a different audio channels at container level
[12:34:19 CEST] <furq> don't bother, you can do it synthetically
[12:34:36 CEST] <furq> ffmpeg -f lavfi -i testsrc=d=1 -f lavfi -i sine=d=1 test.mp4
[12:34:42 CEST] <furq> gives the same issue with mediainfo
[12:35:28 CEST] <vishal733> you should read this: https://sourceforge.net/p/mediainfo/feature-requests/413/
[12:36:32 CEST] <vishal733> anyways. my application can handle the difference b/w AudioChannels, and AudioChannels_orig.. I use AudioChannels_original whenever available.
[12:36:47 CEST] <furq> i tested with a different mp4 muxer and i still get the same issue with mediainfo
[12:36:51 CEST] <furq> so i'm calling that their bug
[12:37:02 CEST] <vishal733> ok!
[12:37:23 CEST] <vishal733> I tried encoding using Adobe Media Encoder. and mediainfo returned values correctly.
[12:37:26 CEST] <vishal733> anyways..
[12:37:30 CEST] <furq> weird
[12:38:34 CEST] <vishal733> You can readup even this thread: https://sourceforge.net/p/mediainfo/discussion/297610/thread/79c07d9a/
[12:38:44 CEST] <vishal733> anyways. could be mediainfo bug. but I would doubt that..
[12:39:16 CEST] <furq> the first reply in that thread is pretty much what i was thinking
[12:39:25 CEST] <vishal733> and if possible for you guys to specifically figure out information about AudioChannels in container, v/s in actual raw stream. that might make us extra sure where the bug lies
[12:39:34 CEST] <furq> i guess lavf/lsmash are just not setting a field in the metadata
[12:39:42 CEST] <vishal733> I see
[12:40:21 CEST] <vishal733> you suspect they are not setting a field in metadata, or filling it wrongly instead?
[12:41:00 CEST] <furq> probably just not setting it at all
[12:41:09 CEST] <vishal733> ok..
[12:41:18 CEST] <furq> idk though i'm not an isobmff guru
[12:41:48 CEST] <vishal733> and it's not even possible for me get into these details right now. Occupied with my daily work!
[12:42:07 CEST] <furq> yeah if channels_original is always present then you should use that anyway
[12:42:25 CEST] <vishal733> yes. and that works..
[12:42:27 CEST] <furq> apparently everything else just looks at the bitstream
[12:42:35 CEST] <vishal733> I just thought I'd inform the ffmpeg community about this bug though
[14:10:03 CEST] <defanor> i've noticed rather strange ffmpeg/ffplay behaviour with some streams: `ffplay <rtsp stream url>` fails with UDP timeout, retries with TCP, and hangs on that (-loglevel debug shows just "hello state=0"), while `ffplay -rtsp_flags prefer_tcp <same url>` works. it's possible that something is wrong with those streams, but is/was there a known bug like that, or some hints on how to investigate it?
[14:10:36 CEST] <defanor> -rtsp_flags prefer_tcp seems to work for me as a workaround, just curious now
[16:26:17 CEST] <if_gaga1> hello guys, can i send some commads, like zoom, unzom to ffmpeg while he running and streaming rtsp video? smth like ffmpeg fifo control socket?
[16:30:18 CEST] <furq> if_gaga1: https://ffmpeg.org/ffmpeg-filters.html#zmq_002c-azmq
[16:31:27 CEST] <if_gaga1> furq: thnx, yep i know about filters, can i apply some filter/send remote command to ALREADY running ffmpeg?
[16:31:27 CEST] <furq> you might also be able to wire up sendcmd/asendcmd to a fifo, i've never tried
[16:31:38 CEST] <furq> and yes that's specifically what zmq does
[16:32:47 CEST] <if_gaga1> oh shi~, thanks furq, looks like that what i'm looking for
[17:10:10 CEST] <waterworks> I'm trying to build ffmpeg with nvenc support but it complains it can't find ffnvcodec when it's listed in pkg-config --list-all. https://pastebin.com/DezFQtAb nvenc test is passed at line 14137. MSYS2 VS2017
[18:50:13 CEST] <analogical> hi is it possible to flip a video 90 degrees with ffmpeg without re-encoding the file??
[18:53:05 CEST] <analogical> flip -> rotate
[18:57:04 CEST] <ariyasu> no
[18:57:19 CEST] <ariyasu> using transpose will re-encode the video
[19:01:17 CEST] <furq> analogical: you can set the rotate metadata
[19:01:24 CEST] <furq> -metadata:s:v:0 rotate=90
[19:01:38 CEST] <furq> or rotate=0 if this is a phone video that's already been rotated
[19:36:42 CEST] <analogical> furq, could you put that into context please?
[19:44:14 CEST] <furq> mp4 (and maybe some other formats) has a rotation flag in the metadata
[19:44:22 CEST] <furq> if it's set then players will rotate it on playback
[19:44:56 CEST] <furq> if your file doesn't have it set then -i foo.mp4 -map 0 -c copy -metadata:s:v:0 rotate=90 bar.mp4
[19:46:04 CEST] <furq> but normally when people ask this, they've recorded something on a phone and it's not the orientation they expect, in which case the flag might already be set
[19:46:27 CEST] <analogical> I would be nice to understand what all those settings do
[19:47:39 CEST] <Mavrik> It's worth noting that a sizable chunk of players ignore that flag and you get video wrongly rotated anyway.
[19:48:07 CEST] <analogical> I tried this ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4 and it worked
[19:49:31 CEST] <analogical> what does :s:v:0 mean?
[19:51:33 CEST] <JEEB> steam, video, nr0
[20:25:14 CEST] <romano2k> hello! i'd like to change the framerate of a video from 23,976 fps to 30 fps without resampling it, so that 1 frame from the original would remain 1 frame into the output. how is this operation called? how can i do it with ffmpeg?
[20:25:54 CEST] <Mavrik> You probably need to fix timestamps using setpts
[20:26:04 CEST] <Mavrik> That is setpts video filter
[20:26:18 CEST] <Mavrik> Of course that will desync your audio
[20:26:53 CEST] <BtbN> so you want to speed it up?
[20:27:20 CEST] <romano2k> BtbN: yes it'll be quicker
[20:27:34 CEST] <BtbN> setpts should be able to do that
[20:27:35 CEST] <romano2k> Mavrik: may i do this without transcoding?
[20:27:52 CEST] <BtbN> I don't think you can, with ffmpeg.c at least
[20:28:05 CEST] <romano2k> https://ffmpeg.org/ffmpeg-filters.html#setpts_002c-asetpts i'm not sure how to use this
[20:28:13 CEST] <furq> don't use filters for that
[20:28:23 CEST] <furq> romano2k: what container and codec is it
[20:28:28 CEST] <BtbN> you could re-mux to raw h264, and then re-remux that to your container, with your desired rate
[20:28:44 CEST] <BtbN> any audio will be messed up then though
[20:28:45 CEST] <furq> chances are mkvmerge or l-smash will do it
[20:28:50 CEST] <Mavrik> Hm, yeah, using container tools would probably be better than ffmpeg
[20:28:59 CEST] <furq> and also yeah you'll need to reencode the audio
[20:29:00 CEST] <romano2k> furq: the source is this Vimeo video grabbed using youtube-dl in MP4 with H264 : https://vimeo.com/241838243
[20:29:04 CEST] <furq> right
[20:29:16 CEST] <furq> l-smash or mkvmerge will both deal with that
[20:29:16 CEST] <romano2k> i don't need the audio
[20:29:19 CEST] <furq> ok good
[20:29:32 CEST] <furq> do you care if it's in mp4
[20:29:37 CEST] <romano2k> not really
[20:29:48 CEST] <furq> even better
[20:29:54 CEST] <romano2k> in the end i'd like to cut some parts with Final Cut Pro X, but i can handle this
[20:30:22 CEST] <furq> mkvmerge -o out.mp4 --default-duration $idx:30fps --fix-bitstream-timing-information $idx:1 in.mp4
[20:30:26 CEST] <romano2k> so i need to demux to a raw h264 stream, then remux specifying the rate i want?
[20:30:49 CEST] <Mavrik> Do what furq tells you with mkvmerge directly on mp4 :)
[20:30:56 CEST] <romano2k> yes i'll try right away
[20:31:15 CEST] <romano2k> can you explain what the options do? specifically the $idx:1 part?
[20:31:21 CEST] <furq> change $idx to the index of your video stream
[20:31:24 CEST] <furq> which is most likely 0
[20:31:55 CEST] <furq> and uh
[20:31:58 CEST] <furq> -o out.mkv obviously
[20:32:41 CEST] <furq> for reference, if you happen to have l-smash available, muxer -i in.mp4?fps=30 -o out.mp4
[20:34:25 CEST] <romano2k> i'm using macOS with brew.sh, which has mkvtoolnix but not l-smash, so i'll stick to mkvmerge for now
[20:34:38 CEST] <romano2k> is there an official website in something else than japanese for l-smash?
[20:35:19 CEST] <furq> https://github.com/l-smash/l-smash
[20:35:29 CEST] <furq> there's no real english docs other than what's in --help
[20:36:05 CEST] <romano2k> and not even a README.md on the github, that's a shame :-/ i'll have a look anyway
[20:36:07 CEST] <furq> i assume mp4box can do it as well but people in here yell at me whenever i mention mp4box
[20:36:49 CEST] <furq> l-smash is easy enough to build though
[20:37:56 CEST] <romano2k> what is its purpose anyway? :)
[20:38:10 CEST] <romano2k> your mkvmerge command worked, thank you for that
[20:38:24 CEST] <furq> it's just a bunch of mp4-related tools
[20:39:34 CEST] <romano2k> actually the mkvmerge process went fine, but Final Cut Pro says that it's not able to import it. it doesn't know the file duration. any quick fix? (something related to headers maybe?)
[20:39:42 CEST] <furq> does fcp support mkv
[20:39:48 CEST] <romano2k> no it doesn't
[20:39:57 CEST] <furq> you should be able to remux it to mp4 with ffmpeg now
[20:40:21 CEST] <romano2k> i found it strange that we muxed to mp4 with mkvmerge ;-)
[20:40:27 CEST] <furq> oh right
[20:40:32 CEST] <furq> yeah that was a typo, it was muxing to mkv
[20:40:42 CEST] <romano2k> got it, thanks, i'll remux with ffmpeg
[20:41:29 CEST] <romano2k> "ffmpeg -i verspera-30fps.mkv verspera-30fps.mp4" will just remux it, right?
[20:41:35 CEST] <furq> you need -c copy
[20:41:47 CEST] <romano2k> ok
[20:42:21 CEST] <romano2k> done! thank you so much :-)
[20:43:50 CEST] <romano2k> by the way, do you guys know why we stick to 23.976 and 30000/1001 rates instead of 24 and 30 or 60, in the digital age with 60 Hz screens?
[20:45:03 CEST] <JEEB> leftover from analog broadcast times. blu-ray does let you do exactly 24Hz, at least.
[20:45:11 CEST] <JEEB> (although most discs are still 24/1.001)
[20:46:31 CEST] <romano2k> i know it's a leftover, but are there good reasons to stick to these rates? compatibility issues at some point? do you know if there are plans to change?
[20:47:18 CEST] <JEEB> no idea about possible changes to that, that's 100% up to the broadcasters since their stuff effectively controls what people have to output
[20:47:35 CEST] <JEEB> and I don't think there's a good reason for digital only stuff to have the /1.001 rates
[20:47:59 CEST] <kerio> that would be US analog broadcast
[20:48:11 CEST] <kerio> EU analog broadcast was 25 on the dot, aiui
[20:48:26 CEST] <JEEB> 50Hz, 50 fields per sec yes
[22:18:47 CEST] <kepstin> probably one of the main reasons is to allow mixing old and new content on tv channels which use a fixed encoder config like 1080i
[22:19:37 CEST] <kepstin> since there's so much content already at that rates, everybody continues to use them so they remain compatible
[22:19:46 CEST] <JEEB> yup'
[22:19:57 CEST] <Mavrik>  also software only lets you export at those rates
[22:20:01 CEST] <Mavrik> and then cameras only support those rates
[22:20:25 CEST] <Mavrik> and everyone just says "eh, noone else supports other rates anyway" :P
[22:21:52 CEST] <kepstin> we just need to redefine the length of a second to be 1.001 old seconds, that'll fix everything.
[23:23:16 CEST] <romano2k> kepstin: haha sure :-D
[23:26:48 CEST] <Crigges> Hello, Iam trying to build ffmpeg with openh264 under windows using msvc by following this guide: https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC  I don't understand exactly where I need to link the external librarys as described here:
[23:26:53 CEST] <Crigges> "In order to build FFmpeg with support to external libraries, you need to make sure that the libraries and headers are placed in a location specified by the INCLUDE and LIB directories referenced by the VC compiler and linker."
[23:27:33 CEST] <Crigges> The build without external librarys already works fine. Do I need to use pkg-config?
[00:00:00 CEST] --- Sat Jun  9 2018


More information about the Ffmpeg-devel-irc mailing list