I'm trying to process some audio with PyDub, but encountered an error, that seems to stem from ffmpeg, so I investigated, tried to process the audio file directly with ffmpeg and I reproduced the error:
PS C:\Users\Me\AppData\Local\Temp\16311759704613> ffmpeg -i .\input.mp3 out.wav
ffmpeg version 2020-12-12-git-5148740e79-essentials_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 56. 62.100 / 56. 62.100
libavcodec 58.115.102 / 58.115.102
libavformat 58. 65.100 / 58. 65.100
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7. 93.100 / 7. 93.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
[mpegts # 00000220e533d3c0] changing packet size to 188
[mpegts # 00000220e533d3c0] changing packet size to 204
[mpegts # 00000220e533d3c0] changing packet size to 192
[mpegts # 00000220e533d3c0] changing packet size to 188
[mpegts # 00000220e533d3c0] changing packet size to 204
[mpegts # 00000220e533d3c0] changing packet size to 192
[mpegts # 00000220e533d3c0] changing packet size to 188
[mpegts # 00000220e533d3c0] changing packet size to 204
[mpegts # 00000220e533d3c0] changing packet size to 192
.\input.mp3: could not find codec parameters
PS C:\Users\Me\AppData\Local\Temp\16311759704613>
I tried to listen to the audio, VLC can open the file:
And Audacity can too:
What can I do to process this file with ffmpeg?
Related
I want to download a video from a webpage. I found the m3u8 file and got the link, using them in FFmpeg, finally got something wrong.
Here is the capture of the beginning of the m3u8 file.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:13
#EXTINF:10.080000,
https://ddcdn.jd.com/ddimg/jfs/t1/203028/24/17499/1876858/61a85ec0Ef32e255f/289bf6dd94343ed0.bmp
#EXTINF:10.000000,
https://ddcdn.jd.com/ddimg/jfs/t1/140366/35/22093/1147042/61a85ec0E850c8c8e/30b8a5e3032486ea.bmp
#EXTINF:10.000000,
https://ddcdn.jd.com/ddimg/jfs/t1/213475/10/6333/1554250/61a85ec0Ecc4703c3/39107a4d803fc188.bmp
#EXTINF:8.040000,
https://ddcdn.jd.com/ddimg/jfs/t1/205672/5/17259/1669682/61a85ec0Eff60ae58/fca014f8ef9bdcdc.bmp
#EXTINF:10.000000,
https://ddcdn.jd.com/ddimg/jfs/t1/217728/38/6334/1906374/61a85ec0Eeaf23ef5/d9ec645ad064f527.bmp
Here is what I input and output in the cmd.
Input
ffmpeg -i "https://hls.kmzhiqing.com/hls/m3u8/1452590c00595055de5750d1595519554f525372617d0d4061.m3u8" 1.mp4
Output
ffmpeg version N-100036-g3de3d2f5e2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3-win32 (GCC) 20200320
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf --enable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
libavutil 56. 60.100 / 56. 60.100
libavcodec 58.113.100 / 58.113.100
libavformat 58. 64.100 / 58. 64.100
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7. 90.100 / 7. 90.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
[hls # 000001d87d857740] Skip ('#EXT-X-VERSION:3')
[hls # 000001d87d857740] Skip ('#EXT-X-ALLOW-CACHE:YES')
[hls # 000001d87d857740] Opening 'https://ddcdn.jd.com/ddimg/jfs/t1/203028/24/17499/1876858/61a85ec0Ef32e255f/289bf6dd94343ed0.bmp' for reading
[hls # 000001d87d857740] Opening 'https://ddcdn.jd.com/ddimg/jfs/t1/140366/35/22093/1147042/61a85ec0E850c8c8e/30b8a5e3032486ea.bmp' for reading
[hls # 000001d87d857740] Could not find codec parameters for stream 0 (Video: bmp, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, hls, from 'https://hls.kmzhiqing.com/hls/m3u8/1452590c00595055de5750d1595519554f525372617d0d4061.m3u8':
Duration: 00:24:24.60, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: bmp, none, 25 tbr, 25 tbn, 25 tbc
Metadata:
variant_bitrate : 0
Output #0, mp4, to '1.mp4':
Output file #0 does not contain any stream
I found that the the link in the m3u8 file is a bmp file instead of mp4.
Does it matter????
Can anyone tell me how to download the mp4 video file?
Thank you for reading this!
Here try this:
-$ ffmpeg -i <http://url/.m3u8> -c copy -bsf:a aac_adtstoasc video_name.mp4
I have an .srt subtitle file. I want to convert it into .ttml format(or xml) using ffmpeg command. I tried using traditional way to convert this. But ffmpeg throwing an error. Is there any way to convert this in Linux platform? Or any other command line applications do this conversion?
Below is the command I tried.
ffmpeg -i my_srt.srt -y srt-to-xml.xml -v verbose
ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, srt, from 'my_srt.srt':
Duration: N/A, bitrate: N/A
Stream #0:0: Subtitle: subrip
Output #0, webm_dash_manifest, to 'srt-to-xml.xml':
Output file #0 does not contain any stream
[AVIOContext # 0x5614924ef500] Statistics: 22267 bytes read, 0 seeks
I even tried like below.
ffmpeg -i my_srt.srt -y srt_to_ttml.ttml
It didn't work too.
It looks like ffmpeg 4.4 has minimal support for converting srt into ttml: font styles and positions are not preserved.
ttconv is an alternative.
The FFmpeg TTML muxer uses the .ttml extension:
ffmpeg -i input.srt output.ttml
The TTML encoder and muxer do not have any additional options as of writing this answer (see ffmpeg -h encoder=ttml & ffmpeg -h muxer=ttml).
I have found and downloaded the m3u8 file using the developer tools in Edge. However, it won't play directly in VLC.
I then downloaded all the segments referred to in the m3u8 file as well as the key and put them in the same folder as ffmpeg. The partial contents of the m3u8 file are:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:13
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-KEY:METHOD=AES-128,URI="keyfile.txt",IV=0x00000000000000000000000000000001
#EXTINF:12,
seg-1-z.ts
#EXT-X-KEY:METHOD=AES-128,URI="keyfile.txt",IV=0x00000000000000000000000000000002
#EXTINF:12,
seg-2-z.ts
...
#EXT-X-KEY:METHOD=AES-128,URI="keyfile.txt",IV=0x0000000000000000000000000000013E
#EXTINF:8,
seg-318-z.ts
#EXT-X-ENDLIST
The keyfile.txt contents are: eyJwYXNzcGhyYXNlIjoiNjE0YjQ5NTYzYTdlYiIsImNpcGhlcnRleHQiOiJlamZOTWRSZjltY3Z4R1JRTFg2cVMralJJTmZaUGJyMXVyaFhhTVZ1QVptSUpXZVdYMkZLQ0t1Q0ZCYUQwY3FYIiwiaXYiOiIxZTNlNzg3ZjNjYmRlOGViZDdlZTBkNWVhZDA1NmEzNCIsInNhbHQiOiIwNjc3M2I1OWE1Y2IxZjA3ODdkYmEzZTAwYWZmNGIzNyJ9
This is what I get when I run ffmpeg:
C:\Test\download>ffmpeg -allowed_extensions ALL -i "play.m3u8" -c copy "test.ts"
ffmpeg version 2021-09-16-git-8f92a1862a-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
libavutil 57. 5.100 / 57. 5.100
libavcodec 59. 7.103 / 59. 7.103
libavformat 59. 5.100 / 59. 5.100
libavdevice 59. 0.101 / 59. 0.101
libavfilter 8. 9.100 / 8. 9.100
libswscale 6. 1.100 / 6. 1.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100
[hls # 000001c67608d140] Skip ('#EXT-X-VERSION:3')
[hls # 000001c67608d140] Opening 'keyfile.txt' for reading
[hls # 000001c67608d140] Opening 'crypto:seg-1-z.ts' for reading
[hls # 000001c67608d140] Error when loading first segment 'seg-1-z.ts'
play.m3u8: Invalid data found when processing input
Can anyone help? Thanks
I am experimenting with live streaming my Windows 7 desktop to YouTube.
Firstly the list of devices:
ffmpeg-N-100616-gca21cb1e36-win64-gpl\bin\ffmpeg.exe -list_devices true -f dshow -i dummy
Gives:
ffmpeg version N-100616-gca21cb1e36 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 9.3-win32 (GCC) 20200320
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --a
rch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv
--enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-open
cl --enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-li
bdavs2 --enable-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-li
bopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --en
able-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-
libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-li
bxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
libavutil 56. 63.100 / 56. 63.100
libavcodec 58.116.100 / 58.116.100
libavformat 58. 65.101 / 58. 65.101
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7. 95.100 / 7. 95.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
[dshow # 000000000052ca00] DirectShow video devices (some may be both video and audio devices)
[dshow # 000000000052ca00] "VF0700 Live! Cam Chat HD"
[dshow # 000000000052ca00] Alternative name "#device_pnp_\\?\usb#vid_041e&pid_4088&mi_00#7&b015b04&0&0000#{65e8773d-8f56-11d0-a3
b9-00a0c9223196}\global"
[dshow # 000000000052ca00] "UScreenCapture"
[dshow # 000000000052ca00] Alternative name "#device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\UScreenCapture"
[dshow # 000000000052ca00] "screen-capture-recorder"
[dshow # 000000000052ca00] Alternative name "#device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{4EA69364-2C8A-4AE6-A561-56E4B504
4439}"
[dshow # 000000000052ca00] DirectShow audio devices
[dshow # 000000000052ca00] "Microphone (VF0700 Live! Cam Ch"
[dshow # 000000000052ca00] Alternative name "#device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (VF0700 Live! Cam Ch"
[dshow # 000000000052ca00] "virtual-audio-capturer"
[dshow # 000000000052ca00] Alternative name "#device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{8E146464-DB61-4309-AFA1-3578E927
E935}"
dummy: Immediate exit requested
ffmpeg-N-100616-gca21cb1e36-win64-gpl\bin\ffmpeg.exe -list_devices true -f dshow -i dummy
gives:
ffmpeg version 4.3.1-2021-01-01-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enab
le-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libss
h --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-li
brav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --en
able-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-
amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libm
fx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-
libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable
-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[dshow # 0000000000485ac0] DirectShow video devices (some may be both video and audio devices)
[dshow # 0000000000485ac0] "VF0700 Live! Cam Chat HD"
[dshow # 0000000000485ac0] Alternative name "#device_pnp_\\?\usb#vid_041e&pid_4088&mi_00#7&b015b04&0&0000#{65e8773d-8f56-11d0-a3
b9-00a0c9223196}\global"
[dshow # 0000000000485ac0] "UScreenCapture"
[dshow # 0000000000485ac0] Alternative name "#device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\UScreenCapture"
[dshow # 0000000000485ac0] "screen-capture-recorder"
[dshow # 0000000000485ac0] Alternative name "#device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{4EA69364-2C8A-4AE6-A561-56E4B504
4439}"
[dshow # 0000000000485ac0] DirectShow audio devices
[dshow # 0000000000485ac0] "Microphone (VF0700 Live! Cam Ch"
[dshow # 0000000000485ac0] Alternative name "#device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (VF0700 Live! Cam Ch"
[dshow # 0000000000485ac0] "virtual-audio-capturer"
[dshow # 0000000000485ac0] Alternative name "#device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{8E146464-DB61-4309-AFA1-3578E927
E935}"
dummy: Immediate exit requested
Now trying to live stream with the command:
ffmpeg-N-100616-gca21cb1e36-win64-gpl\bin\ffmpeg.exe -f dshow -i video='screen-capture-recorder':audio='Microphone (VF0700 Live! Cam Ch' -r 24 -s 1920x1080 -qmin 3 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key'
I get:
ffmpeg version 4.3.1-2021-01-01-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enab
le-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libss
h --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-li
brav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --en
able-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-
amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libm
fx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-
libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable
-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
leaving aero onGuessed Channel Layout for Input Stream #0.1 : stereo
Input #0, dshow, from 'video=screen-capture-recorder:audio=Microphone (VF0700 Live! Cam Ch':
Duration: N/A, start: 758394.360000, bitrate: N/A
Stream #0:0: Video: rawvideo, bgr0, 1920x1080, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
[NULL # 00000000006645c0] Unable to find a suitable output format for 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key
'
rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key: Invalid argument
[dshow # 0000000000607400] real-time buffer [screen-capture-recorder] [video input] too full or near too full (545% of size: 3041280
[rtbufsize parameter])! frame dropped!
Last message repeated 5 times
In short the errors are:
[NULL # 00000000006645c0] Unable to find a suitable output format for 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key
'
rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key: Invalid argument
[dshow # 0000000000607400] real-time buffer [screen-capture-recorder] [video input] too full or near too full (545% of size: 3041280
I have tried with and without the :1935 port number, with ffmpeg_x64.exe but no difference. Is the stream key the invalid argument or something else?
Figured it out with. The -f parameter is used to specif the input format dshow, but this parameter is also positionally dependent appliying to the input and/or output format if placed before the input and ouitput.
So the solution was to add the -f flv to the output as well:
ffmpeg-N-100616-gca21cb1e36-win64-gpl\bin\ffmpeg.exe -f dshow -i video='screen-capture-recorder':audio='Microphone (VF0700 Live! Cam Ch' -r 24 -s 1920x1080 -qmin 3 -f flv 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key'
So, we are saying the input format is dshow by placing it before the -i flag, and the output is flv by placing it before the output (the stream channel).
I want to download a mp4 from m3u8 link using ffmpeg command.
ffmpeg -i https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/master.m3u8 -c copy -bsf:a aac_adtstoasc output1.mp4
But an error occurred when loading first segment
https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/720/seg-1-v1-a1.ts?v=664e3521
https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/master.m3u8: Invalid data found when processing input
Someone helps me to solve my problem. Thanks!
Full command
ffmpeg -i https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/master.m3u8 -c copy -bsf:a aac_adtstoasc output2.mp4ffmpeg version 4.1.1-0york1~16.04 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
configuration: --prefix=/usr --extra-version='0york1~16.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-nonfree --enable-libfdk-aac --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[hls,applehttp # 0x56551c942500] Opening 'https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/720.m3u8?v=664e3521' for reading
[https # 0x56551cd51280] Opening 'https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/480.m3u8?v=3f40a361' for reading
[https # 0x56551cd51280] Opening 'https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/360.m3u8?v=aefcb682' for reading
[https # 0x56551cd51280] Opening 'https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/240.m3u8?v=bda86a2a' for reading
[https # 0x56551cd51280] Opening 'https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/144.m3u8?v=431e8038' for reading
[hls,applehttp # 0x56551c942500] Opening 'https://kms.sohatv.vn/drm/55ceb3f8-4675-454a-bfc8-96cb04bbae8f.key' for reading
[hls,applehttp # 0x56551c942500] Opening 'crypto+https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/720/seg-1-v1-a1.ts?v=664e3521' for reading
[hls,applehttp # 0x56551c942500] Error when loading first segment 'https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/720/seg-1-v1-a1.ts?v=664e3521'
https://hls.mediacdn.vn/vtv/2019/4/7/0704sao-mai-1554652229269816114782-af6d9.mp4/master.m3u8: Invalid data found when processing input
The stream is encrypted, and the key is encoded in an obfuscated format. ffmepg will not be able to decrypt the stream.