Re: [FFmpeg-user] Play video and simultaneously record audio
I've written a summary into my book in chapter 3.16 (but chapter numbering may change in future): http://www.astro-electronic.de/FFmpeg_Book.pdf Book contains obsolete info about v360 filter, please fix it. Done. Many new examples for the v360 filter added to chapters 2.48 to 2.55 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".
Re: [FFmpeg-user] Play video and simultaneously record audio
Am 19.01.2020 um 13:54 schrieb Paul B Mahol: On 1/19/20, Michael Koch wrote: Hello Gyan, I did try the above example (with some changes) but it has another problem: FFplay can't be stopped when the video has ended, and it uses the full screen. Which means I can't see the console window and can't close it. FFmpeg can only be stopped by the task manager. Looks like your video resolution is equal to or greater than your display. Add `-vf scale=iw/2:-1` to resize it. ok, this works fine and now I can see the console window and close it when the video has ended. Add -autoexit to quit ffplay when it detects EOF. This didn't work in my test. The FFplay window remains open and shows the last frame, until I manually close the FFmpeg console window. Pressing "q" or "esc" to close the FFplay window does only work if the video is still running, but not if the video has already ended. I've written a summary into my book in chapter 3.16 (but chapter numbering may change in future): http://www.astro-electronic.de/FFmpeg_Book.pdf Book contains obsolete info about v360 filter, please fix it. you mean the new fisheye output? I saw it, but I'm still waiting for new build on Zeranoe so that I can test it. 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".
Re: [FFmpeg-user] Play video and simultaneously record audio
On 1/19/20, Michael Koch wrote: > Hello Gyan, > >>> I did try the above example (with some changes) but it has another >>> problem: FFplay can't be stopped when the video has ended, and it >>> uses the full screen. Which means I can't see the console window and >>> can't close it. FFmpeg can only be stopped by the task manager. >> >> Looks like your video resolution is equal to or greater than your >> display. Add `-vf scale=iw/2:-1` to resize it. > > ok, this works fine and now I can see the console window and close it > when the video has ended. > >> Add -autoexit to quit ffplay when it detects EOF. > > This didn't work in my test. The FFplay window remains open and shows > the last frame, until I manually close the FFmpeg console window. > Pressing "q" or "esc" to close the FFplay window does only work if the > video is still running, but not if the video has already ended. > > I've written a summary into my book in chapter 3.16 (but chapter > numbering may change in future): > http://www.astro-electronic.de/FFmpeg_Book.pdf Book contains obsolete info about v360 filter, please fix it. > > Thanks for your help, > 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] Play video and simultaneously record audio
Hello Gyan, I did try the above example (with some changes) but it has another problem: FFplay can't be stopped when the video has ended, and it uses the full screen. Which means I can't see the console window and can't close it. FFmpeg can only be stopped by the task manager. Looks like your video resolution is equal to or greater than your display. Add `-vf scale=iw/2:-1` to resize it. ok, this works fine and now I can see the console window and close it when the video has ended. Add -autoexit to quit ffplay when it detects EOF. This didn't work in my test. The FFplay window remains open and shows the last frame, until I manually close the FFmpeg console window. Pressing "q" or "esc" to close the FFplay window does only work if the video is still running, but not if the video has already ended. I've written a summary into my book in chapter 3.16 (but chapter numbering may change in future): http://www.astro-electronic.de/FFmpeg_Book.pdf Thanks for your help, 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".
Re: [FFmpeg-user] Play video and simultaneously record audio
On 19-01-2020 12:51 am, Michael Koch wrote: My second test: ffmpeg -re -i test.mp4 -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -f sdl2 - This command line has two problems: 1. The video doesn't play continuously, it's stop-and-go. May be my notebook has not enough computing power? Any ideas how to avoid this problem? 2. FFmpeg doesn't stop when the end of the video has been reached. The audio file gets longer than the video. I did already try to add the -shortest option, but it didn't solve the problem. 1) Ok, let's pipe it to ffplay then. 2) The audio and playback video are independent outputs. So, ffmpeg will have to be manually stopped. ffmpeg -an -i test.mp4 -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -c copy -f mpegts - | ffplay -f mpegts - I did try the above example (with some changes) but it has another problem: FFplay can't be stopped when the video has ended, and it uses the full screen. Which means I can't see the console window and can't close it. FFmpeg can only be stopped by the task manager. Looks like your video resolution is equal to or greater than your display. Add `-vf scale=iw/2:-1` to resize it. Add -autoexit to quit ffplay when it detects EOF. I found a better solution for the stop-and-go problem with sdl2. Adding -audio_buffer_size 100 solves the problem: ffmpeg -re -i test.mp4 -f dshow -audio_buffer_size 100 -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -f sdl2 - Looks better for your needs, but this is dshow specific. Won't be applicable to other live audio sources. Gyan ___ 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] Play video and simultaneously record audio
My second test: ffmpeg -re -i test.mp4 -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -f sdl2 - This command line has two problems: 1. The video doesn't play continuously, it's stop-and-go. May be my notebook has not enough computing power? Any ideas how to avoid this problem? 2. FFmpeg doesn't stop when the end of the video has been reached. The audio file gets longer than the video. I did already try to add the -shortest option, but it didn't solve the problem. 1) Ok, let's pipe it to ffplay then. 2) The audio and playback video are independent outputs. So, ffmpeg will have to be manually stopped. ffmpeg -an -i test.mp4 -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -c copy -f mpegts - | ffplay -f mpegts - I did try the above example (with some changes) but it has another problem: FFplay can't be stopped when the video has ended, and it uses the full screen. Which means I can't see the console window and can't close it. FFmpeg can only be stopped by the task manager. I found a better solution for the stop-and-go problem with sdl2. Adding -audio_buffer_size 100 solves the problem: ffmpeg -re -i test.mp4 -f dshow -audio_buffer_size 100 -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -f sdl2 - 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".
Re: [FFmpeg-user] Play video and simultaneously record audio
On 16-01-2020 10:21 pm, Michael Koch wrote: Hello Gyan, can FFmpeg or FFplay be used for playing a video (without audio) and exactly simultaneously record an audio file? I mean for making sound effects for the video. If this isn't possible, is there any other free software that can do it? Basic syntax would be, ffmpeg -re -i videofile -f audiodevice -i audiourl -map 1:a audioout.wav -map 0:v -f sdl2 - My first test, this works fine: ffmpeg -re -i test.mp4 -f sdl2 - Question: Is there any documentation for -f sdl2 ? My second test: ffmpeg -re -i test.mp4 -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -f sdl2 - This command line has two problems: 1. The video doesn't play continuously, it's stop-and-go. May be my notebook has not enough computing power? Any ideas how to avoid this problem? 2. FFmpeg doesn't stop when the end of the video has been reached. The audio file gets longer than the video. I did already try to add the -shortest option, but it didn't solve the problem. 1) Ok, let's pipe it to ffplay then. 2) The audio and playback video are independent outputs. So, ffmpeg will have to be manually stopped. ffmpeg -an -i test.mp4 -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -c copy -f mpegts - | ffplay -f mpegts - Gyan Here is the console output: C:\Users\mKoch\Desktop>c://ffmpeg/ffmpeg -re -i test.mp4 -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -f sdl2 - ffmpeg version git-2020-01-15-0dc0837 Copyright (c) 2000-2020 the FFmpeg develop ers built with gcc 9.2.1 (GCC) 20200111 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. 38.100 / 56. 38.100 libavcodec 58. 65.103 / 58. 65.103 libavformat 58. 35.102 / 58. 35.102 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 71.100 / 7. 71.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf58.25.100 Duration: 00:00:06.57, start: 0.00, bitrate: 12218 kb/s Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p , 1920x1080 [SAR 1:1 DAR 16:9], 12216 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 tbc (d efault) Metadata: handler_name : VideoHandler timecode : 07:34:52:21 Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s Metadata: handler_name : TimeCodeHandler timecode : 07:34:52:21 Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, dshow, from 'audio=Mikrofon (Realtek High Definiti': Duration: N/A, start: 31251.109000, bitrate: 1411 kb/s Stream #1:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s Stream mapping: Stream #1:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native)) Stream #0:0 -> #1:0 (mpeg4 (native) -> rawvideo (native)) Press [q] to stop, [?] for help Output #0, wav, to 'audio.wav': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 ISFT : Lavf58.35.102 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16 , 1411 kb/s Metadata: encoder : Lavc58.65.103 pcm_s16le Output #1, sdl,sdl2, to 'pipe:': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf58.35.102 Stream #1:0(eng): Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080 [S AR 1:1 DAR 16:9], q=2-31, 746496 kb/s, 30 fps, 30 tbn, 30 tbc (default) Metadata: handler_name : VideoHandler timecode : 07:34:52:21 encoder : Lavc58.65.103 rawvideo frame= 1 fps=0.0 q=-0.0 size= 172kB time=00:00:01.01 bitrate=1396.5kbits/ frame= 17 fps= 17 q=-0.0 size= 256kB time=00:00:01.51 bitrate=1387.0kbits/ frame= 32 fps= 21 q=-0.0 size= 256kB time=00:00:01.51
Re: [FFmpeg-user] Play video and simultaneously record audio
Hello Gyan, can FFmpeg or FFplay be used for playing a video (without audio) and exactly simultaneously record an audio file? I mean for making sound effects for the video. If this isn't possible, is there any other free software that can do it? Basic syntax would be, ffmpeg -re -i videofile -f audiodevice -i audiourl -map 1:a audioout.wav -map 0:v -f sdl2 - My first test, this works fine: ffmpeg -re -i test.mp4 -f sdl2 - Question: Is there any documentation for -f sdl2 ? My second test: ffmpeg -re -i test.mp4 -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -f sdl2 - This command line has two problems: 1. The video doesn't play continuously, it's stop-and-go. May be my notebook has not enough computing power? Any ideas how to avoid this problem? 2. FFmpeg doesn't stop when the end of the video has been reached. The audio file gets longer than the video. I did already try to add the -shortest option, but it didn't solve the problem. Here is the console output: C:\Users\mKoch\Desktop>c://ffmpeg/ffmpeg -re -i test.mp4 -f dshow -channels 2 -i audio="Mikrofon (Realtek High Definiti" -y -map 1:a audio.wav -map 0:v -f sdl2 - ffmpeg version git-2020-01-15-0dc0837 Copyright (c) 2000-2020 the FFmpeg develop ers built with gcc 9.2.1 (GCC) 20200111 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. 38.100 / 56. 38.100 libavcodec 58. 65.103 / 58. 65.103 libavformat 58. 35.102 / 58. 35.102 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 71.100 / 7. 71.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf58.25.100 Duration: 00:00:06.57, start: 0.00, bitrate: 12218 kb/s Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p , 1920x1080 [SAR 1:1 DAR 16:9], 12216 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 tbc (d efault) Metadata: handler_name : VideoHandler timecode : 07:34:52:21 Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s Metadata: handler_name : TimeCodeHandler timecode : 07:34:52:21 Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, dshow, from 'audio=Mikrofon (Realtek High Definiti': Duration: N/A, start: 31251.109000, bitrate: 1411 kb/s Stream #1:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s Stream mapping: Stream #1:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native)) Stream #0:0 -> #1:0 (mpeg4 (native) -> rawvideo (native)) Press [q] to stop, [?] for help Output #0, wav, to 'audio.wav': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 ISFT : Lavf58.35.102 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16 , 1411 kb/s Metadata: encoder : Lavc58.65.103 pcm_s16le Output #1, sdl,sdl2, to 'pipe:': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf58.35.102 Stream #1:0(eng): Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080 [S AR 1:1 DAR 16:9], q=2-31, 746496 kb/s, 30 fps, 30 tbn, 30 tbc (default) Metadata: handler_name : VideoHandler timecode : 07:34:52:21 encoder : Lavc58.65.103 rawvideo frame= 1 fps=0.0 q=-0.0 size= 172kB time=00:00:01.01 bitrate=1396.5kbits/ frame= 17 fps= 17 q=-0.0 size= 256kB time=00:00:01.51 bitrate=1387.0kbits/ frame= 32 fps= 21 q=-0.0 size= 256kB time=00:00:01.51 bitrate=1387.0kbits/ frame= 47 fps= 23 q=-0.0 size= 256kB time=00:00:02.53 bitrate= 828.3kbits/ frame= 62 fps= 24 q=-0.0 size= 256kB time=00:00:02.53 bitrate= 828.3kbits/ frame= 77 fps= 25 q=-0.0 size= 512kB time=00:00:03.55 bitrate=1180.5kbits/ frame= 93 fps= 26 q=-0.0 size= 512kB time=00:00:04.05 bitrate=1035.6kbits/ frame= 108 fps=
Re: [FFmpeg-user] Play video and simultaneously record audio
On 16-01-2020 01:52 pm, Michael Koch wrote: Hello all, can FFmpeg or FFplay be used for playing a video (without audio) and exactly simultaneously record an audio file? I mean for making sound effects for the video. If this isn't possible, is there any other free software that can do it? Basic syntax would be, ffmpeg -re -i videofile -f audiodevice -i audiourl -map 1:a audioout.wav -map 0:v -f sdl2 - (At a minimum, you'll need a ffmpeg build with SDL2 enabled; if your package includes ffplay, it'll have it) Gyan ___ 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] Play video and simultaneously record audio
Hello all, can FFmpeg or FFplay be used for playing a video (without audio) and exactly simultaneously record an audio file? I mean for making sound effects for the video. If this isn't possible, is there any other free software that can do it? Thanks 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".