2

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
Eng. M.Hamdy
  • 306
  • 1
  • 3
  • 12

1 Answers1

2

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
Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Thanks Mulvya, but it does not work. I've editted my question to add the full ffmpeg response. Hope you can discover what is wrong with the ffmpeg version or video file format (I of course tried different rmvb files). – Eng. M.Hamdy Jun 24 '17 at 07:30
  • You didn't mention you have `cook` audio. Did you try `.rm`? You can still use MKV or AVI if you re-encode the audio. – Gyan Jun 24 '17 at 08:01
  • @Gyan : `.rm` works, but `.rm` isn't needed. You said: `You can still use MKV or AVI if you re-encode the audio.`, Can you provide the cmd? Thanks. – 123iamking Oct 23 '20 at 03:42
  • Change `-c copy` to `-c:v copy` – Gyan Oct 23 '20 at 04:05