3

I have a video file of .mp4 format. I want to convert it into .mpeg. But when the output file size reaches 4GB, the conversion stops with a message something like "av_interleaved_write_frame() file too large"

My file system is ext4.

The commands I used are as below :

ffmpeg -i "input_file.mp4" -q:v 0 -q:a 0 -c:v mpeg2video "output_file.mpeg"

ffmpeg -i "input_file.mp4" -q:v 0 -q:a 0 -c:v mpeg2video -fs 8G "output_file.mpeg"

I understand that the conversion target defaults to DVD, so, the 4GB is the upper limit. can I tweak the target ?

Or, is it possible to dump the output to a subsequent file2Out.mpeg once file1Out.mpeg reaches 4GB

rajendra332
  • 41
  • 1
  • 4
  • try `-fs` in bytes but I don't think there's a default limit – aergistal Mar 21 '15 at 07:00
  • @aergistal I tried using -fs 9000M... still facing same problem: av_interleaved_write_frame(): File too largeime=01:40:23.53 bitrate=5703.7kbits/s dup=2 drop=0 frame=144434 fps= 81 q=0.0 Lsize= 4194304kB time=01:40:24.44 bitrate=5703.4kbits/s dup=2 drop=0 video:3892617kB audio:282396kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.462057% Conversion failed! – rajendra332 Mar 21 '15 at 08:20
  • the doc says bytes so try 8000000000. But I'm almost positive this isn't the issue... – aergistal Mar 21 '15 at 12:06
  • 2
    Thanks... I think the problem is with filesystem. The drive I am making this conversion is FAT32. I think it wont allow an mpeg file to exceed 4GB. I'll try doing in another drive of ext4 – rajendra332 Mar 23 '15 at 04:44
  • 2
    It clearly won't work on FAT32. I thought you were on EXT4. – aergistal Mar 23 '15 at 10:15
  • yes, it indeed is the case. Thank you – rajendra332 Mar 24 '15 at 14:16
  • is there a command in ffmpeg that automatically detects filesystem limit and split the output into several parts? – yeahman Aug 16 '16 at 17:00

2 Answers2

1

Yes, the reason is the filesystem format. FAT32 doesnt allow an mpeg file to exceed 4GB. thank you

rajendra332
  • 41
  • 1
  • 4
1

For instance, if your input lasts for 2 hours, you can convert the first hour to one file, and the second hour to another file by using -to option to stop at a certain position and -ss (placed before -i) option to start from a certain position:

ffmpeg -i "input_file.mp4" -to 1:00:00 -q:v 0 -q:a 0 -c:v mpeg2video "output_file_h1.mpeg" && \
ffmpeg -ss 1:00:00 -i "input_file.mp4" -q:v 0 -q:a 0 -c:v mpeg2video "output_file_h2.mpeg"
Yevhen Pavliuk
  • 601
  • 7
  • 14