Recording (not transcoding) into MKV via cmd stops at 2GB?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
NM64
New Cone
New Cone
Posts: 3
Joined: 20 Apr 2019 23:18

Recording (not transcoding) into MKV via cmd stops at 2GB?

Postby NM64 » 21 Apr 2019 02:11

For whatever reason, when I do a direct recording from the likes of a webcam or another external capture device into an MKV container without any transcoding, the file stops at exactly 2.00GB, and this seems to occur with pretty much any version 3.x version of VLC (I did not try 2.x versions). This is the command I am using:

dshow:// ::dshow-vdev= :dshow-adev= :live-caching=300 --sout=#std{access=file,dst="T:\Test.mkv"}

The 2GB limit does not exist if I use AVI, but in this case recording to AVI keeps giving me corrupted files (which the VideoLAN wiki does warn about), and AFAIK I cannot use any other container because the audio is in PCM and the codec is in some 4:1:1 format that mkvtoolnix identifies as just "DV".

I also verified that it's not just the specific devices I'm recording from since it occurs with other devices on other PCs as well with the same command.

Interestingly this 2GB limit does not occur (at least in VLC 3.0.6) when using the transcode function, but I just want to do a direct rip/dump/recording for now and then do an offline re-encode after-the-fact using a different program at much higher and slower quality settings than I would ever be able to achieve in VLC in real time.


So...what do?

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: Recording (not transcoding) into MKV via cmd stops at 2GB?

Postby InTheWings » 23 Apr 2019 10:37

If you transcode you don't store raw DV. You then don't reach the 2GB because it's smaller.
To me there's either a FS limitation or a avformat limitation for MKV
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

NM64
New Cone
New Cone
Posts: 3
Joined: 20 Apr 2019 23:18

Re: Recording (not transcoding) into MKV via cmd stops at 2GB?

Postby NM64 » 25 Apr 2019 02:28

FS limitation
I'm unsure what the acronym FS refers to, but if you mean "file system" then that makes little sense considering it's just NTFS I'm using. Heck, since the partition was formatted through Windows's normal GUI and is like 100+GB, Windows doesn't even list FAT32 as an option so I couldn't have accidentally selected that either.

avformat limitation for MKV
I think you might be on to something, but not in the way you think - it might be an audio limitation as when I was recording from a webcam into an mkv, only the audio (araw) was being saved and yet the 2GB MKV issue still occurred, and I do believe it's araw audio for this camera that I'm trying to record from as well.

I'd like to try and see if I can make it past the 2GB MKV limit by transcoding only the audio into something like FLAC, but I do not know how to go about doing this without also transcoding the video stream as well...which would kind of defeat the purpose as I'm trying to keep things lossless for now without having to actually transcode into a lossless format and cause the file size to get ginormous (not to mention I don't even know how to transcode into lossless x264 via VLC anyway).


EDIT: I forgot to mention, when I tried just recording directly from a YouTube video for example (which used AAC audio) into an MKV, it made it past 2GB without issue.

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: Recording (not transcoding) into MKV via cmd stops at 2GB?

Postby InTheWings » 25 Apr 2019 10:19

That doesn't change the fact that 2GB is a known limit: integer 32 bits signed. I don't know what avformat does with DV, and DV isn't officially specified in MKV.

Check logs, you might have a reason for stopping muxing at some 2GB point.
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

NM64
New Cone
New Cone
Posts: 3
Joined: 20 Apr 2019 23:18

Re: Recording (not transcoding) into MKV via cmd stops at 2GB?

Postby NM64 » 25 Apr 2019 22:16

That doesn't change the fact that 2GB is a known limit: integer 32 bits signed. I don't know what avformat does with DV, and DV isn't officially specified in MKV.
I just thinking that, if I could put the audio into a format that doesn't run into the 2GB limit, then we could make absolute sure whether or not this DV format is in fact running into the 2GB limit or not.

Additionally as a last resort transcoding to h.264 lossless would probably also work (but could greatly inflate the file size), but again I've no idea how to actually specify the according x264 commands for VLC to actually do that.

Check logs, you might have a reason for stopping muxing at some 2GB point.
I don't know if VLC has any other sort of logs functionality other than "Messages", but setting it to a verbosity of "2 (debug)" does not show anything until I hit the stop button even if the recorded file hit the 2GB limit a while ago.

Nevertheless, here's what I get when I hit stop:

Code: Select all

main debug: incoming request - stopping current input prefetch debug: end of stream main debug: EOF reached main debug: killing decoder fourcc `dv ' main debug: removing module "copy" main debug: removing a sout input (sout_input: 02a8d3c0) avcodec debug: removing input main debug: killing decoder fourcc `s16l' main debug: removing module "copy" main debug: removing a sout input (sout_input: 04f243f8) avcodec debug: removing input main warning: no more input streams for this mux main debug: removing module "rawdv" main debug: removing module "record" main debug: removing module "prefetch" main debug: removing module "dshow" dshow debug: CaptureFilter::Pause dshow debug: CaptureFilter::Stop dshow debug: CapturePin::EndFlush dshow debug: releasing DirectShow dshow debug: DeleteDirectShowGraph: Removing filters dshow debug: DeleteDirectShowGraph: Removing capture filter dshow debug: CaptureFilter::EnumPins dshow debug: CapturePin::QueryDirection dshow debug: CapturePin::ConnectedTo [OK] dshow debug: CapturePin::Disconnect [OK] dshow debug: CaptureFilter::SetSyncSource dshow debug: CaptureFilter::JoinFilterGraph dshow debug: CaptureFilter::GetState 0 dshow debug: CaptureFilter::~CaptureFilter dshow debug: CapturePin::~CapturePin dshow debug: DeleteDirectShowGraph: Removing device filter main debug: Program doesn't contain anymore ES main debug: dead input main debug: destroying useless sout main debug: destroying chain... (name=std) main debug: removing module "stream_out_standard" main debug: removing module "avcodec" main debug: removing module "file" file debug: file access output closed main debug: destroying chain done main debug: nothing to play qt debug: IM: Deleting the input


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 14 guests