[FFmpeg-user] metadata from concat list not working
Hi. I am trying to create a video from my music files, creating audio visualization with showfreqs and displaying current filename with drawtext. Here is my command: ffmpeg -f concat -safe 0 -i files.txt -filter_complex "[0:a]showfreqs=cmode=separate:colors=cyan|orange,drawtext=text='%{metadata\:title\:blah}':font=verdana:fontsize=56:fontcolor=white:x=(main_w/2-text_w/2):y=20[outv]" -map [outv] -map 0:a -c:v h264_nvenc -c:a copy -pix_fmt yuv420p -shortest video.mkv And this is my files.txt: file 'Alarm01.wav' file_packet_metadata title=Alarm01 file 'Alarm02.wav' file_packet_metadata title=Alarm02 Somehow this is not working for me and I don't understand why. My video displays text "blah", which tells me that ffmpeg can't find the metadata... I was also reading this: https://rensa.co/projects/ccrc-weather-station/ and they have done pretty much the same, only with pictures. And it worked for them. I tried to reproduce what they have done - with pictures - but I again don't get the metadata drawn... Any help would be appreciated. Kind regards. Goran ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] metadata from concat list not working
Hi Nicolas, I am trying to understand what you meant, but unfortunately I don't get it. I am still a beginner with video filters of ffmpeg and what I read in the documentation for stream metadata and packet metadata didn't help me to see what I was confusing. What I would like to understand is why does it work for the weather station (the link in my first email) and why is the same logic accepted here: https://superuser.com/questions/1336844/is-it-possible-to-burn-a-filename-watermark-in-the-corner-of-a-concatenated-imag as an answer. When I try to reproduce what the weather station has or what this second link describes, I don't get the text in the video. The weather station even posted its video and there you can clearly see that the metadata from custom-list.txt is displayed on bottom-left of the video <https://www.youtube.com/watch?v=nq4ZGtLOw6Q>. If it worked for them, why doesn't it work when I try to reproduce it? Best regards. Goran On Sun, Sep 29, 2019 at 7:39 PM Nicolas George wrote: > Goran Obal (12019-09-29): > > Somehow this is not working for me and I don't understand why. My video > > displays text "blah", which tells me that ffmpeg can't find the > metadata... > > I suspect you are confusing stream metadata and packet metadata. > > Regards, > > -- > Nicolas George > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] metadata from concat list not working
Hi everyone, I apologize for spamming... I just saw that it is in fact working for me when I do it with pictures, I was just using such examples that the text was not visible. Sorry. So, yes, it seems I don't understand what is different when I create video from a bunch of pictures and when I use filter_complex to create video from audio files and try to write text over it... I assume that the "picture way" is then packet and the "audio visualization filter way" is then a stream. So I think my question should be: Can I inject metadata to a stream? Best regards. Goran On Mon, Sep 30, 2019 at 10:47 AM Goran Obal wrote: > Hi Nicolas, > > I am trying to understand what you meant, but unfortunately I don't get it. > I am still a beginner with video filters of ffmpeg and what I read in the > documentation for stream metadata and packet metadata didn't help me to see > what I was confusing. > > What I would like to understand is why does it work for the weather > station (the link in my first email) and why is the same logic accepted > here: > https://superuser.com/questions/1336844/is-it-possible-to-burn-a-filename-watermark-in-the-corner-of-a-concatenated-imag > as > an answer. > When I try to reproduce what the weather station has or what this second > link describes, I don't get the text in the video. The weather station even > posted its video and there you can clearly see that the metadata > from custom-list.txt is displayed on bottom-left of the video > <https://www.youtube.com/watch?v=nq4ZGtLOw6Q>. > > If it worked for them, why doesn't it work when I try to reproduce it? > > Best regards. > Goran > > > On Sun, Sep 29, 2019 at 7:39 PM Nicolas George wrote: > >> Goran Obal (12019-09-29): >> > Somehow this is not working for me and I don't understand why. My video >> > displays text "blah", which tells me that ffmpeg can't find the >> metadata... >> >> I suspect you are confusing stream metadata and packet metadata. >> >> Regards, >> >> -- >> Nicolas George >> ___ >> ffmpeg-user mailing list >> ffmpeg-user@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-user >> >> To unsubscribe, visit link above, or email >> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] metadata from concat list not working
OK, thanks to everyone who answered. I couldn't figure it out any other way, so I am just sending you my solution in case anyone is interested. Step 1 (use for loop to create videos (mkv) from all audio files - in my case wav, change that to what you need): for %i in (*wav) do ffmpeg -i %i -filter_complex "[0:a]showfreqs=cmode=separate:colors=cyan|orange,drawtext=text='%~ni':font=verdana:fontsize=56:fontcolor=white:x=(main_w/2-text_w/2):y=20[outv]" -map [outv] -map 0:a -c:v h264_nvenc -c:a copy -pix_fmt yuv420p -shortest %~ni.mkv Step 2 (use for loop to create a list of all created videos): for %i in (*mkv) do echo file '%i'>>video.txt Step 3 (concatenate all videos into one): ffmpeg -f concat -safe 0 -i video.txt -c copy finale.mkv If anyone has any more suggestions how to bring this into one step, that would be awesome, if not, this is how to do it if you need/want it. Kind regards. Goran On Mon, Sep 30, 2019 at 11:44 AM Paul B Mahol wrote: > On 9/30/19, Goran Obal wrote: > > Hi everyone, > > > > I apologize for spamming... I just saw that it is in fact working for me > > when I do it with pictures, I was just using such examples that the text > > was not visible. Sorry. > > So, yes, it seems I don't understand what is different when I create > video > > from a bunch of pictures and when I use filter_complex to create video > from > > audio files and try to write text over it... I assume that the "picture > > way" is then packet and the "audio visualization filter way" is then a > > stream. > > So I think my question should be: Can I inject metadata to a stream? > > Yes with ametadata and metadata filters, read their documentation. > Note that drawtext filter command you used use only frame metadata, > and frame metadata > can be added/removed/changed by mentioned filters above. > The concat demuxer can not set/remove/change frame metadata. > Also frame metadata is per each frame and can obviously disappear and > appear at any time. > AFAIK there is no way for filters to know stream metadata, so your > approach to draw text is wrong. > > Stream metadata is static per stream and never changes. > Frame metadata can be available in each filtered frame. > > > > > Best regards. > > Goran > > > > > > On Mon, Sep 30, 2019 at 10:47 AM Goran Obal > wrote: > > > >> Hi Nicolas, > >> > >> I am trying to understand what you meant, but unfortunately I don't get > >> it. > >> I am still a beginner with video filters of ffmpeg and what I read in > the > >> documentation for stream metadata and packet metadata didn't help me to > >> see > >> what I was confusing. > >> > >> What I would like to understand is why does it work for the weather > >> station (the link in my first email) and why is the same logic accepted > >> here: > >> > https://superuser.com/questions/1336844/is-it-possible-to-burn-a-filename-watermark-in-the-corner-of-a-concatenated-imag > >> as > >> an answer. > >> When I try to reproduce what the weather station has or what this second > >> link describes, I don't get the text in the video. The weather station > >> even > >> posted its video and there you can clearly see that the metadata > >> from custom-list.txt is displayed on bottom-left of the video > >> <https://www.youtube.com/watch?v=nq4ZGtLOw6Q>. > >> > >> If it worked for them, why doesn't it work when I try to reproduce it? > >> > >> Best regards. > >> Goran > >> > >> > >> On Sun, Sep 29, 2019 at 7:39 PM Nicolas George wrote: > >> > >>> Goran Obal (12019-09-29): > >>> > Somehow this is not working for me and I don't understand why. My > video > >>> > displays text "blah", which tells me that ffmpeg can't find the > >>> metadata... > >>> > >>> I suspect you are confusing stream metadata and packet metadata. > >>> > >>> Regards, > >>> > >>> -- > >>> Nicolas George > >>> ___ > >>> ffmpeg-user mailing list > >>> ffmpeg-user@ffmpeg.org > >>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user > >>> > >>> To unsubscribe, visit link above, or email > >>> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > >> > >> > > ___ > > ffmpeg-user mailing list > > ffmpeg-user@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > > > To unsubscribe, visit link above, or email > > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] IRC #ffmpeg on freenode
Hi. Does anyone else have problems sending messages to IRC channel #ffmpeg on freenode? I always get "Cannot send to nick/channel" when I try to say something. Br. Goran ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] IRC #ffmpeg on freenode
Yes, thank you, this is it. On Thu, Oct 3, 2019 at 3:24 PM tth wrote: > On 10/03/19 15:04:25, Goran Obal wrote: > > Hi. > > > > Does anyone else have problems sending messages to IRC channel > > #ffmpeg on > > freenode? I always get "Cannot send to nick/channel" when I try to say > > something. > > May be you have to be authentified : > https://freenode.net/kb/answer/registration > > > > -- > ---( https://framasphere.org/tags/tetalab )- > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] How to use ffmpeg in batch mode?
Hi. If you are only changing the container and don't want to transcode the contents, be sure to add -c copy in the ffmpeg line of the example (haven't tested it but it seems fine), so it looks like this: ffmpeg -i %IN% -y -c copy %OUT% Br. On Mon, Oct 21, 2019 at 9:14 AM Michael Koch wrote: > Am 20.10.2019 um 23:56 schrieb arthur brogard via ffmpeg-user: > > I have been trying to convert a bunch of mkv files to mp4 using ffmpeg > in batch mode via a .bat file but I can't get it right. > > I've followed a number of suggested commands from various hits I've got > on google but none of them work. > > Don't need anything fancy. Just a basic convert from mkv to mp4 if > anyone can help? > > I haven't tested it, but I thing this (Windows) batch file should work: > > > for %%f in (*.mkv) do call :for_body %%f > goto :the_end > > :for_body > set IN=%1 > set OUT=%IN:mkv=mp4% > ffmpeg -i %IN% -y %OUT% > exit /b > > :the_end > pause > > > You find a similar (tested and working) example in my book on page 88: > http://www.astro-electronic.de/FFmpeg_Book.pdf > > Michael > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] How to use ffmpeg in batch mode?
Sorry, forgot the extensions for output. ;) ffmpeg -i %1 -y %~n1.mkv or ffmpeg -i %1 -y -c copy %~n1.mkv On Mon, Oct 21, 2019 at 10:33 AM Goran Obal wrote: > Michael, you could use this: > %~ni <- this means the filename without the extension, so instead of > renaming, just use: > ffmpeg -i %1 -y %~n1 > or > ffmpeg -i %1 -y -c copy %~n1 > > On Mon, Oct 21, 2019 at 10:28 AM Michael Koch > wrote: > >> >> > >> > set OUT=%IN:mkv=mp4% >> >> please note that this renaming will give unexpected results if "mkv" is >> also part of the filename, for example >> aamkv.mkv will be renamed to >> aamp4.mp4 >> >> If someone knows a solution to this problem, please let us know. >> >> Michael >> ___ >> ffmpeg-user mailing list >> ffmpeg-user@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-user >> >> To unsubscribe, visit link above, or email >> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". > > ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] How to use ffmpeg in batch mode?
Michael, you could use this: %~ni <- this means the filename without the extension, so instead of renaming, just use: ffmpeg -i %1 -y %~n1 or ffmpeg -i %1 -y -c copy %~n1 On Mon, Oct 21, 2019 at 10:28 AM Michael Koch wrote: > > > > > set OUT=%IN:mkv=mp4% > > please note that this renaming will give unexpected results if "mkv" is > also part of the filename, for example > aamkv.mkv will be renamed to > aamp4.mp4 > > If someone knows a solution to this problem, please let us know. > > Michael > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] How to use ffmpeg in batch mode?
Silly me, it's the other way around (mkv to mp4)... ffmpeg -i %1 -y %~n1.mp4 or ffmpeg -i %1 -y -c copy %~n1.mp4 On Mon, Oct 21, 2019 at 10:34 AM Goran Obal wrote: > Sorry, forgot the extensions for output. ;) > ffmpeg -i %1 -y %~n1.mkv > or > ffmpeg -i %1 -y -c copy %~n1.mkv > > On Mon, Oct 21, 2019 at 10:33 AM Goran Obal wrote: > >> Michael, you could use this: >> %~ni <- this means the filename without the extension, so instead of >> renaming, just use: >> ffmpeg -i %1 -y %~n1 >> or >> ffmpeg -i %1 -y -c copy %~n1 >> >> On Mon, Oct 21, 2019 at 10:28 AM Michael Koch < >> astroelectro...@t-online.de> wrote: >> >>> >>> > >>> > set OUT=%IN:mkv=mp4% >>> >>> please note that this renaming will give unexpected results if "mkv" is >>> also part of the filename, for example >>> aamkv.mkv will be renamed to >>> aamp4.mp4 >>> >>> If someone knows a solution to this problem, please let us know. >>> >>> Michael >>> ___ >>> ffmpeg-user mailing list >>> ffmpeg-user@ffmpeg.org >>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user >>> >>> To unsubscribe, visit link above, or email >>> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". >> >> ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Can ffmpeg convert these mp4 to that mp4?
mp4 is just a container, we need to know what is inside this container. What video, what audio! Use ffprobe on those files and send us the results. On Wed, Oct 30, 2019 at 8:45 AM arthur brogard via ffmpeg-user < ffmpeg-user@ffmpeg.org> wrote: > I have an old tv that plays usb sticks and we use it for that. > But some formats pic and video it won't accept. > Not being into it I don't really understand why or what. > This time I have a bunch of microbe animations and it plays some and some > it says 'unsupported format'. > I note the details of two of the 'unsupported' formats: > > 1. mp4. 1920 x 1080 423kbps 24 fps2. mp4 1280 x 720 672kbps 30 fps > and one file that it plays happily: > mp4 854 x 478 853 kbps 25fps. > Can anyone detect what the basic problem is and can I fix it by running > the files through ffmpeg with the appropriate command line, whatever that > might be? > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] First frame is corrupted
Try using a different pixel format, say yuv420p. Add -pix_fmt yuv420p before output file in the command line. On Wed, Oct 30, 2019 at 10:08 AM Michael Koch wrote: > Hi, > > I have a video which looks fine in FFplay and also in VLC, but after > uploading to Facebook the first frame is corrupted, as can be seen here: > https://www.facebook.com/12490928195/videos/2597554727004199/ > I don't know if this is a problem in my file or not. The console output > is below. > > Michael > > > F:\2019_10_30_Sylvia>c://ffmpeg/ffmpeg -ss 300 -i P1000479.mov > -filter_complex " > > colorlevels=rimin=0.015:gimin=0.005:bimin=0.015:rimax=0.26:gimax=0.26:bimax=0.26 > " -t 3 -q:v 1 -y sylvia.mp4 > ffmpeg version N-95216-ge6625ca41f Copyright (c) 2000-2019 the FFmpeg > developers > >built with gcc 9.2.1 (GCC) 20190918 >configuration: --enable-gpl --enable-version3 --enable-sdl2 > --enable-fontconfi > g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d > --enable-libb > luray --enable-libfreetype --enable-libmp3lame > --enable-libopencore-amrnb --enab > le-libopencore-amrwb --enable-libopenjpeg --enable-libopus > --enable-libshine --e > nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame > --enable > -libvpx --enable-libwavpack --enable-libwebp --enable-libx264 > --enable-libx265 - > -enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib > --enable-gmp --enab > le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc > --enable-libmysofa --en > able-libspeex --enable-libxvid --enable-libaom --enable-libmfx > --enable-ffnvcode > c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec > --enable-dxva2 - > -enable-avisynth --enable-libopenmpt --enable-amf >libavutil 56. 35.100 / 56. 35.100 >libavcodec 58. 59.101 / 58. 59.101 >libavformat58. 33.100 / 58. 33.100 >libavdevice58. 9.100 / 58. 9.100 >libavfilter 7. 61.100 / 7. 61.100 >libswscale 5. 6.100 / 5. 6.100 >libswresample 3. 6.100 / 3. 6.100 >libpostproc55. 6.100 / 55. 6.100 > [mov,mp4,m4a,3gp,3g2,mj2 @ 00460680] decoding for stream 0 failed > Guessed Channel Layout for Input Stream #0.1 : stereo > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'P1000479.mov': >Metadata: > major_brand : qt > minor_version : 537986816 > compatible_brands: qt pana > creation_time : 2019-10-29T23:33:53.00Z > com.panasonic.Semi-Pro.metadata.xml: encoding="UTF-8" st > andalone="no" ?> > : xmlns:xsi="http://www.w3.org/2001/XMLSchema-inst > ance" xmlns="urn:schemas-Professional-Plug-in:Semi-Pro:ClipMetadata:v1.0"> > : > : > 060A2B340101010501010D2113005767E053 > 00BB5534547F1060C1650131 > : 12012 > : 1/25 > : > : > : H264_422_Intra > : 1080 > : 1920 > : 10 > : 25p > : NonDrop > : 22:23:17:03 > : > : > : 2 > : 48000 > : 16 > : > : > : > : 0 > : > : 2019-10-29T23:33:53+02:00 ate> > : 2019-10-29T23:33:53+02:00 ateDate> > : > : > : Panasonic > : DC-GH5S > : > : > : 2019-10-29T23:33:53+02:00 > : > : > : > : > : xmlns="urn:schemas-Professional-P > lug-in:P2:CameraMetadata:v1.2"> > : > : > : STANDARD > : > : > : BT.709 > : > : > : > : > : > : >Duration: 00:08:00.48, start: 0.00, bitrate: 201724 kb/s > Stream #0:0(und): Video: h264 (High 4:2:2 Intra) (avc1 / > 0x31637661), yuv422 > p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 24 kb/s, 25 fps, 25 > tbr, 90k > tbn, 50 tbc (default) > Metadata: >creation_time : 2019-10-29T23:33:53.00Z >timecode: 22:23:17:03 > Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, > stereo, s1 > 6, 1536 kb/s (default) > Metadata: >creation_time : 2019-10-29T23:33:53.00Z >