I want to fast copy parts from an rmvb file without re-encoding. This command works fine with mp4 files but not with rmbv (I dropped start time and duration here) :
ffmpeg -i input -c copy output
when I use it with rmvb like this:
ffmpeg -i 1.rmvb -c copy 1.mp4
I get this error:
[mp4 # 00bb8980] Could not find tag for codec rv40 in stream #0, codec
not curre ntly supported in container Could not write header for
output file #0 (incorrect codec parameters ?): Invali d argument
Stream mapping: Stream #0:1 -> #0:0 (copy) Stream #0:0 -> #0:1
(copy)
I also tried this:
ffmpeg -i 1.rmvb -c copy 2.rmvb
and got this error:
[NULL # 04748980] Unable to find a suitable output format for '2.rmvb'
2.rmvb: Invalid argument
I tried this command:
ffmpeg -i 1.rmvb -c:v copy -c:a aac -strict experimental -b:a 128k 1.mp4
and got this error:
[mp4 # 046e0020] Could not find tag for codec rv40 in stream #0, codec
not curre ntly supported in container Could not write header for
output file #0 (incorrect codec parameters ?): Invali d argument Error
initializing output stream 0:1 -- [aac # 046e1bc0] Qavg: nan
Conversion failed!
I read this topic:
but the solution does not work for me.. After many trials, this is the command that worked (and took too long time):
ffmpeg -i 1.rmvb -c:v libx264 -b:a 32k output.mp4
But I do not want to re-encode the file. Any solution?
Edit:
I tried:
ffmpeg -i 1.rmvb -c copy 1.mkv
ffmpeg version N-86447-gfeb13ae Copyright (c) 2000-2017 the FFmpeg
developers built with gcc 7.1.0 (GCC) configuration: --enable-gpl
--enable-version3 --enable-cuda --enable-cuvid --e nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth -- enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib libavutil 55. 63.100 / 55. 63.100 libavcodec 57. 98.100 /
57. 98.100 libavformat 57. 73.100 / 57. 73.100 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 92.100 / 6. 92.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 /
2. 8.100 libpostproc 54. 6.100 / 54. 6.100 [rm # 033a7520] Invalid stream index 2 for index at pos 206099254 Input #0, rm, from
'1.rmvb': Metadata:
title : ArabSeed.CoM
author : ArabSeed.CoM
copyright : ArabSeed.CoM
comment :
ASMRuleBook : #($Bandwidth >= 0),Stream0Bandwidth = 64082, Stream1Bandwi dth = 285918;
Audiences : Easy RealMedia Tool's Audience;
audioMode : music
Creation Date : 4/22/2010 4:31:14
Description : This File is Created by Easy RealMedia Tools#!
Email : rick#redcheek.net
Generated By : Easy RealMedia Tools V1.8x
HomeWeb : http://redcheek.net
Keywords : ArabSeed.CoM
Modification Date: 4/22/2010 4:31:14
videoMode : normal Duration: 01:16:35.69, start: 0.000000, bitrate: 358 kb/s
Stream #0:0: Audio: cook (cook / 0x6B6F6F63), 44100 Hz, stereo, fltp, 64 kb/ s
Stream #0:1: Video: rv40 (RV40 / 0x30345652), yuv420p, 720x408, 280 kb/s, 25 fps, 25 tbr, 1k tbn, 1k tbc Output #0, matroska, to
'1.mkv': Metadata:
title : ArabSeed.CoM
author : ArabSeed.CoM
copyright : ArabSeed.CoM
comment :
ASMRuleBook : #($Bandwidth >= 0),Stream0Bandwidth = 64082, Stream1Bandwi dth = 285918;
Audiences : Easy RealMedia Tool's Audience;
audioMode : music
Creation Date : 4/22/2010 4:31:14
Description : This File is Created by Easy RealMedia Tools#!
Email : rick#redcheek.net
Generated By : Easy RealMedia Tools V1.8x
HomeWeb : http://redcheek.net
Keywords : ArabSeed.CoM
Modification Date: 4/22/2010 4:31:14
videoMode : normal
encoder : Lavf57.73.100
Stream #0:0: Video: rv40 (RV40 / 0x30345652), yuv420p, 720x408, q=2-31, 280 kb/s, 25 fps, 25 tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: cook ([255][255][255][255] / 0xFFFFFFFF), 44100 Hz, ster eo, fltp, 64 kb/s Stream mapping: Stream #0:1 -> #0:0
(copy) Stream #0:0 -> #0:1 (copy) Press [q] to stop, [?] for help
[matroska # 05228980] The Matroska muxer does not yet support muxing
cook av_interleaved_write_frame(): Not yet implemented in FFmpeg,
patches welcome Error writing trailer of 1.mkv: Not yet implemented in
FFmpeg, patches welcome frame= 21 fps=0.0 q=-1.0 Lsize= 0kB
time=00:00:01.48 bitrate= 0.0kbits /s speed= 148x video:2kB
audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing ove
rhead: unknown Conversion failed!
I also tried:
ffmpeg -i 1.rmvb -c copy 1.avi
ffmpeg version N-86447-gfeb13ae Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --e
nable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --
enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li
bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug -
-enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl
e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam
e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable
-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 63.100 / 55. 63.100
libavcodec 57. 98.100 / 57. 98.100
libavformat 57. 73.100 / 57. 73.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 92.100 / 6. 92.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
[rm # 00077520] Invalid stream index 2 for index at pos 206099254
Input #0, rm, from '1.rmvb':
Metadata:
title : ArabSeed.CoM
author : ArabSeed.CoM
copyright : ArabSeed.CoM
comment :
ASMRuleBook : #($Bandwidth >= 0),Stream0Bandwidth = 64082, Stream1Bandwi
dth = 285918;
Audiences : Easy RealMedia Tool's Audience;
audioMode : music
Creation Date : 4/22/2010 4:31:14
Description : This File is Created by Easy RealMedia Tools#!
Email : rick#redcheek.net
Generated By : Easy RealMedia Tools V1.8x
HomeWeb : http://redcheek.net
Keywords : ArabSeed.CoM
Modification Date: 4/22/2010 4:31:14
videoMode : normal
Duration: 01:16:35.69, start: 0.000000, bitrate: 358 kb/s
Stream #0:0: Audio: cook (cook / 0x6B6F6F63), 44100 Hz, stereo, fltp, 64 kb/
s
Stream #0:1: Video: rv40 (RV40 / 0x30345652), yuv420p, 720x408, 280 kb/s, 25
fps, 25 tbr, 1k tbn, 1k tbc
Could not write header for output file #0 (incorrect codec parameters ?): Operat
ion not permitted
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Last message repeated 1 times
Don't have a rv40 stream to test with, but you should be able to mux into MKV, AVI, and RM.
ffmpeg -i 1.rmvb -c copy 1.mkv
ffmpeg -i 1.rmvb -c copy 1.rm
ffmpeg -i 1.rmvb -c copy 1.avi
Related
the command I use to encode:
ffmpeg -y -i VideoCapture.mp4 -c:v libx264 -b:v 444k -pass 1 -an -f null /dev/null && \
ffmpeg -i VideoCapture.mp4 -c:v libx264 -b:v 444k -pass 2 -c:a aac -b:a 128k output.mp4
I took this code from the official ffmpeg documentation, by changing the audio and video bitrate values according to the examples in the documentation. This code error when I run it on Linux.
The above code can run on windows (by changing the characters "NULL" and "").
This is the full output of the error:
ffmpeg version N-59498-g45dc668aea-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil 57. 7.100 / 57. 7.100
libavcodec 59. 12.100 / 59. 12.100
libavformat 59. 8.100 / 59. 8.100
libavdevice 59. 0.101 / 59. 0.101
libavfilter 8. 16.101 / 8. 16.101
libswscale 6. 1.100 / 6. 1.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VideoCapture.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2021-07-02T07:26:53.000000Z
Duration: 00:23:50.31, start: 0.000000, bitrate: 803 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 736 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
Metadata:
creation_time : 2021-07-02T07:26:53.000000Z
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 63 kb/s (default)
Metadata:
creation_time : 2021-07-02T07:09:01.000000Z
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 # 0x75dea80] using SAR=1/1
[libx264 # 0x75dea80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
Why this happened? is there any solution for this problem?
thank you.
I have no idea how to use FFmpeg, but my .avi file is too large for a 2-second video? Any idea how I can convert it to WebM? While retaining its alpha channel?
I tried this:
ffmpeg -i "1.avi" -c:v libvpx -pix_fmt yuva420p "1.webm"
Output showed:
ffmpeg version 4.4-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, 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. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[avi # 00000245f2e7d640] Stream #0: not enough frames to estimate rate; consider increasing probesize
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avi, from '1.avi':
Duration: 00:00:02.00, start: 0.000000, bitrate: 3983150 kb/s
Stream #0:0: Video: rawvideo, bgra, 1920x1080, 4014784 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> vp8 (libvpx))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> opus (libopus))
Press [q] to stop, [?] for help
[libvpx # 00000245f2e8ecc0] v1.10.0-24-g8b3e575a4
[libvpx # 00000245f2e8ecc0] Neither bitrate nor constrained quality specified, using default CRF of 32 and bitrate of 256kbit/sec
[libvpx # 00000245f2e8ecc0] Transparency encoding with auto_alt_ref does not work
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
Simplest command is:
ffmpeg -i input.avi output.webm
The video encoder libvpx-vp9 will be used by default.
libvpx-vp9 supports alpha, so alpha will be preserved by default.
For more info see FFmpeg Wiki: VP9.
Command I used to solve:
ffmpeg -i "1.avi" -c:v libvpx -b:v 2000k -pix_fmt yuva420p -auto-alt-ref 0 "1.webm"
"1.avi" - input.avi
"1.webm" - out.webm
Simple command:
ffmpeg -i input.avi output.webm
convert a mp4 file to h264 format by this command below
ffmpeg -i agrawsnzefjkuvsqczucbajyhrpaizzaobubqikayxrbfgfep.mp4 -c:v libx264 -c:a aac test.mp4
but I get Decoder (codec av1) not found for input stream #0:0
The result of the detail is below:
#ffmpeg -i agrawsnzefjkuvsqczucbajyhrpaizzaobubqikayxrbfgfep.mp4 -c:v libx264 -c:a aac test.mp4
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'agrawsnzefjkuvsqczucbajyhrpaizzaobubqikayxrbfgfep.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf57.83.100
Duration: 00:04:05.95, start: 0.000000, bitrate: 684 kb/s
Stream #0:0(und): Video: av1 (av01 / 0x31307661), none, 1920x1080, 551 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
File 'test.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (? (?) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Decoder (codec av1) not found for input stream #0:0
How to fix "Decoder (codec av1) not found for input stream #0:0" error?
There is no native (software) decoder for AV1 in FFmpeg as of v4.4. However, multiple external decoder libraries are supported via wrappers. These libs are libaom, libdav1d and various hardware-accelerated decoders such as nvdec. You'll need recent ffmpeg (4.3+) to avail many of these. Your ffmpeg ver is 3.4.8. Get a static binary for linux from https://johnvansickle.com/ffmpeg/
i have extracted a few clips from a video file of resolution 1920x816 called ca0.mp4...ca9.mp4 using the command
ffmpeg -i ./ca.mkv -ss 00:53:24 -t 00:01:30 ca0.mp4
Then i created a black video using
ffmpeg -f lavfi -i color=black:s=1920x816:r=24000/1001 -f lavfi -i anullsrc -ar 48000 -ac 2 -t 00:00:02 empty.mp4
now i want to concencate the clips with the black video between them. Therefore i created a file list.txt:
file 'ca0.mp4'
file 'empty.mp4'
file 'ca1.mp4'
file 'empty.mp4'
file 'ca2.mp4'
file 'empty.mp4'
file 'ca3.mp4'
file 'empty.mp4'
file 'ca4.mp4'
file 'empty.mp4'
file 'ca5.mp4'
file 'empty.mp4'
file 'ca6.mp4'
file 'empty.mp4'
file 'ca7.mp4'
file 'empty.mp4'
file 'ca8.mp4'
file 'empty.mp4'
file 'ca9.mp4'
and tried the command
ffmpeg -f concat -i list.txt -c:v qtrle -c:a copy ca.mp4
however, i get the following output:
ffmpeg version N-89940-gb1af0e23a3 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-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 --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 7.100 / 58. 7.100
libavdevice 58. 0.101 / 58. 0.101
libavfilter 7. 11.101 / 7. 11.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 # 000001e2cd155900] Auto-inserting h264_mp4toannexb bitstream filter
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, concat, from 'list.txt':
Duration: N/A, start: -0.021333, bitrate: 1894 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x816 [SAR 1:1 DAR 40:17], 1500 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(ger): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 394 kb/s
Metadata:
handler_name : SoundHandler
Stream #0:2(eng): Data: bin_data (text / 0x74786574), 0 kb/s
Metadata:
handler_name : SubtitleHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> qtrle (native))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 # 000001e2cd213080] Could not find tag for codec qtrle in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
Conversion failed!
can anyone tell me, what i did wrong?
As all files are already converted in .mp4 from .mkv
you may just need to copy the video codec too
ffmpeg -f concat -i list.txt -c:v copy -c:a copy ca.mp4
It will also speed up the process
I am able to generate m3u8 and list of segment(.ts) files from mp4 video file using following ffmpeg command
ffmpeg -i Bee_Free.mp4 -codec copy -vbsf h264_mp4toannexb -map 0 -f segment -segment_list free.m3u8 -segment_time 10 free%03d.ts
I am using the same command to generate m3u8 and ts files from .wmv and .avi files
command for .avi file
ffmpeg -i PalivalaBadraVatakam.avi -codec copy -vbsf h264_mp4toannexb -map 0 -f segment -segment_list palivaala.m3u8 -segment_time 10 palivaala%03d.ts
Error
ffmpeg version N-89041-g91a565e20f Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-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 --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 56. 0.100 / 56. 0.100
libavcodec 58. 3.101 / 58. 3.101
libavformat 58. 2.100 / 58. 2.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 0.101 / 7. 0.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avi, from 'PalivalaBadraVatakam.avi':
Metadata:
date : 2018-04-24T17:08:40+05:30
encoder : Adobe Premiere Pro CC 2018.1 (Windows)
Duration: 00:00:53.19, start: 0.000000, bitrate: 30317 kb/s
Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv411p, 720x480 [SAR 8:9 DAR 4:3], 28789 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
[AVBSFContext # 000001e976f84080] Codec 'dvvideo' (24) is not supported by the bitstream filter 'h264_mp4toannexb'. Supported codecs are: h264 (27)
Error initializing bitstream filter: h264_mp4toannexb
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Last message repeated 1 times
Command for .wmv file
ffmpeg -i Palivaalaa.wmv -codec copy -vbsf h264_mp4toannexb -map 0 -f segment -segment_list palivaalaa.m3u8 -segment_time 10 palivaalaa%03d.ts
Error
ffmpeg version N-89041-g91a565e20f Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-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 --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 56. 0.100 / 56. 0.100
libavcodec 58. 3.101 / 58. 3.101
libavformat 58. 2.100 / 58. 2.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 0.101 / 7. 0.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
[wmv3 # 0000024020a04a40] Extra data: 8 bits left, value: 20
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, asf, from 'Palivaalaa.wmv':
Metadata:
Application : Windows Movie Maker 2.6.4037.0
WMFSDKVersion : 12.0.16299.248
WMFSDKNeeded : 0.0.0.0000
artist : Sathish
IsVBR : 0
DeviceConformanceTemplate: MP#ML
Duration: 00:01:00.10, start: 0.000000, bitrate: 571 kb/s
Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, fltp, 96 kb/s
Stream #0:1(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 640x480, 768 kb/s, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc
[AVBSFContext # 0000024020a9b420] Codec 'wmv3' (71) is not supported by the bitstream filter 'h264_mp4toannexb'. Supported codecs are: h264 (27)
Error initializing bitstream filter: h264_mp4toannexb
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Last message repeated 1 times
HLS with TS files only supports h.264 video codec and aac or mp3 audio. Hence -codec copy will not work. Just remove that, and ffmpeg should choose libx264 automatically.
This file formats support by the TS muxer are listed here https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/mpegts.h#L45-L64
In summary they are:
VIDEO_MPEG1
VIDEO_MPEG2
AUDIO_MPEG1
AUDIO_MPEG2
AUDIO_AAC
AAC_LATM
VIDEO_MPEG4
METADATA
VIDEO_H264
VIDEO_HEVC
VIDEO_CAVS
VIDEO_VC1
VIDEO_DIRAC
AUDIO_AC3
AUDIO_DTS
AUDIO_TRUEHD
AUDIO_EAC3
None of the codecs you are trying are listed. And as it has in it's name the -vbsf h264_mp4toannexb and the error message Codec 'wmv3' (71) is not supported by the bitstream filter 'h264_mp4toannexb'. Supported codecs are: h264 (27), the h264_mp4toannexb filter only supports h264