<p>You are trying to include a codec (dvvideo) into a container (mp4), which doesn't support it (at least in ffmpeg). See difference between <a href="https://superuser.com/a/300997/1076830">codec and container</a>. You better use a codec supported by mp4, say H.265 using libx265 and try converting. See the <a href="https://trac.ffmpeg.org/wiki/Encode/H.265" rel="nofollow noreferrer">docs</a> for additional options you may want to apply. Here is the extensive list of <a href="http://mp4ra.org/#/codecs" rel="nofollow noreferrer">codecs supported</a> by mp4, but all of them may not be supported by ffmpeg. Here are  some popular <a href="https://en.wikipedia.org/wiki/MPEG-4_Part_14#Data_streams" rel="nofollow noreferrer">codecs</a>.
Also, pcm_s16le is a raw audio format, convert it to aac.
Try</p>
<pre><code>ffmpeg -i filename.avi -c:v libx265 -x265-params lossless=1 -c:a libfdk_aac -b:a 128k -y filename.mp4
</code></pre>
<p>It has H.265 lossless encoding and uses libfdk_aac, which is of better quality than native one.</p>

CC BY-SA 4.0
2021-07-31T20:35:55.310Z
Thank you very much for this helpful information!
stars.in.the.sky
CC BY-SA 4.0
2021-08-04T12:05:04.757Z
Most welcome @stars.in.the.sky, If this solution works for you, you may mark the answer as accepted.
Abdullah Ibn Fulan
CC BY-SA 4.0
2021-07-28T19:46:36.960Z
2021-07-28T20:05:45.650Z
2021-07-28T20:05:45.650Z
Abdullah Ibn Fulan
<p>I'm trying to convert .avi files to .mp4 using ffmpeg, as lossless-ly as possible.</p>
<p>I tried this command:</p>
<pre><code> ffmpeg -i filename.avi -c:v copy -c:a copy -y filename.mp4
</code></pre>
<p>and received this output:</p>
<pre><code> 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-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --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-ldexeflags= --extra-libs=-lgomp
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  1.101 / 59.  1.101
  libavformat    59.  3.100 / 59.  3.100
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.102 /  8.  0.102
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avi, from 'Filename.avi':
  Metadata:
    TAPE            : Filename
    TCOD            : 653986667
  Duration: 00:01:54.01, start: 0.000000, bitrate: 30411 kb/s
  Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv411p, 720x480 [SAR 8:9 DAR 4:3], 28779 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn
  Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
[mp4 @ 000001d0ca8a1480] Could not find tag for codec dvvideo 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:1 --
Stream mapping:
  Stream #0:0 -&gt; #0:0 (copy)
  Stream #0:1 -&gt; #0:1 (copy)
    Last message repeated 1 times
</code></pre>
<p>It outputs an .mp4 file with an error message that the file can't be played and the error code 0xc10100be.</p>
<p>Can anyone interpret what is happening? What command would you recommend here?</p>
<p>Thank you very much!</p>

<ffmpeg><encoding><codec>
ffmpeg to convert .avi to .mp4 results in error: Could not find tag for codec dvvideo in stream #0, codec not currently supported in container
stars.in.the.sky
# ffmpeg to convert .avi to .mp4 results in error: Could not find tag for codec dvvideo in stream #0, codec not currently supported in container

(Asked by: username_0 on 2021-06-24)

I'm trying to convert .avi files to .mp4 using ffmpeg, as lossless-ly as possible.
I tried this command:
 ffmpeg -i filename.avi -c:v copy -c:a copy -y filename.mp4

and received this output:
 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-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --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-ldexeflags= --extra-libs=-lgomp
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  1.101 / 59.  1.101
  libavformat    59.  3.100 / 59.  3.100
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.102 /  8.  0.102
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avi, from 'Filename.avi':
  Metadata:
    TAPE            : Filename
    TCOD            : 653986667
  Duration: 00:01:54.01, start: 0.000000, bitrate: 30411 kb/s
  Stream #0:0: Video: dvvideo (dvsd / 0x64737664), yuv411p, 720x480 [SAR 8:9 DAR 4:3], 28779 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn
  Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
[mp4 @ 000001d0ca8a1480] Could not find tag for codec dvvideo 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:1 --
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
    Last message repeated 1 times

It outputs an .mp4 file with an error message that the file can't be played and the error code 0xc10100be.
Can anyone interpret what is happening? What command would you recommend here?
Thank you very much!

**Tags:** ffmpeg, encoding, codec


---

## 1 answers

### Answer by username_1 on 2021-07-28. Score: 1

You are trying to include a codec (dvvideo) into a container (mp4), which doesn't support it (at least in ffmpeg). See difference between codec and container. You better use a codec supported by mp4, say H.265 using libx265 and try converting. See the docs for additional options you may want to apply. Here is the extensive list of codecs supported by mp4, but all of them may not be supported by ffmpeg. Here are  some popular codecs.
Also, pcm_s16le is a raw audio format, convert it to aac.
Try
ffmpeg -i filename.avi -c:v libx265 -x265-params lossless=1 -c:a libfdk_aac -b:a 128k -y filename.mp4

It has H.265 lossless encoding and uses libfdk_aac, which is of better quality than native one.

> **Comments:**
> **username_0**: Thank you very much for this helpful information!  
> **username_1**: Most welcome @username_0, If this solution works for you, you may mark the answer as accepted.  

---

