Hi! On 02/26/10 14:05, David Timms wrote: > On 24/02/10 03:23, Michael Riepe wrote: >> As part of my work on dvbcut2, I've developed a new algorithm for file >> format detection. > Do you plan to allow edit/trim of all sorts of media files ?
Only if possible. Some formats aren't documented sufficiently and/or there are no free codecs available, so it might be impossible to handle them. But the program should at least detect them and tell the user that it can't process them. >> The basic idea is that the beginning of a file - say, >> a few megabytes at most - is searched for magic byte sequences. But only >> once. If you scan the file again and again for every file format you're >> supporting, you'll waste a lot of time - in particular when the list >> includes not only MPEG PS/TS (as in dvbcut) but also AVI, Matroska, Ogg, >> M2TS (a variant of TS used on the Blu-ray disc) and possibly others. >> Besides that, the probing order may affect the result. > Are the ffmpeg library methods no good to you ? > I would have imagined that they might already do what you are intending > (without ever having used them myself) ? Frankly said, I didn't look at them. I'm not going to use ffmpeg (at least not directly). >> Anyway, I've packed the necessary bits and bytes into the attachment and >> I would like to ask you to test them on any file you can get your hands >> on. I'm particularly interested in all misdetected and undetected files. >> I want the detection to work as flawlessly as possible. Oh, and if you >> think an important format is missing, don't hesitate to tell me. > I'm guessing you wouldn't expect to be able to handle encrypted wma/f/asf ? No. The same applies to encrypted DVB streams, by the way. You will have to decrypt them first. >> Afterwards, you can run ./container<filenames> (for container files) or >> ./media<filenames> (for all others). > Might be nicer for the detection to tell us ? That's a little difficult. A TS file from DVB, for example, also looks very much like MPEG video - because large parts of it *are* MPEG video. But for dvbcut2, that's not necessary anyway because the program will deal with containers and a/v streams in different places. Besides that, many containers contain lots of hints, so you may not need to examine individual tracks in the first place. > ===== nvidia demo videos, archived elsewhere: > note that other files in the group that were downloaded at the same time > all detect normally (prob 83 .. 100% raw MPEG-1/2 video > > http://findthatfile.com/fileinfo.php?i=5985342&t=hZIP&f=Gothic_Chapel.zip > > cont gothic_chapel.mpg: > - I don't know what kind of file this is > > media gothic_chapel.mpg: > - seems to be raw MPEG-1/2 video (probability 95.2%) Errm... there is no .mpg in that .zip file. But I probably found the file anyway (http://www.nvidia.com/attach/7993). Seems that it's been properly detected - it *is* raw MPEG-1 video without a container. > ===== > Anyway, I have quite a few with outputs eg: > /home/media/wmap_nasa_030640.avi: > - seems to be an ASF file (probability 100.0%) > Seems stream 1 codec frame rate differs from container frame rate: > 1000.00 (1000/1) -> 15.00 (15/1) > Input #0, asf, from > '/home/media/client_clips/transport_hotel.player/tport/tport/movies/wmap_nasa_030640.avi': > Duration: 00:00:45.51, start: 3.000000, bitrate: 414 kb/s > Stream #0.0: Audio: wmav2, 8000 Hz, 1 channels, s16, 5 kb/s > Stream #0.1: Video: wmv1, yuv420p, 640x480, 15 tbr, 1k tbn, 1k tbc > Metadata > title : > > I guess that the extension was wrong. Yep. > ===== all these are A+V mpeg2 files (without looking further)! > /home/media/CT 15th April 2008 Tuesday.avi: > - I don't know what kind of file this is > > /home/media/Sports_bar_fosters.avi: > - seems to be 44100 Hz MPEG-1 Layer I audio (probability 60.7%) > > /home/media/rendered/elephants_dream/Elephants_Dream_HD.avi: > - I don't know what kind of file this is > > /home/media/rendered/blender_movie.learning_to_fly_BIG.avi: > - seems to be 44100 Hz MPEG-1 Layer I audio (probability 62.8%) > > /home/media/trailers/games/quake_iv.eoc.bad_q4singleplayer.avi: > - seems to be raw FLAC audio (probability 61.2%) Hmm... did you use media or container? The former doesn't work well on containers (and is not supposed to). [...] > Anyway, it is a bit time consuming to go through lists of thousands of > files, trying to pick out the troubling media files. > It would speed up the process for me to put each result on a single > line, with the detected type first. Then I could just sort the file, > ending up with the list of troubled files in groups, just an idea. > (maybe you have a better idea - so that manual parsing is not needed). You could run the list through "paste - - -" or something like that. It will put the detected type in the second column, but I guess that's better than nothing. > Anyway, some of the troubling ones were made with dvbcut1 (captured from > dvb transport, and cut up with dvbcut - I have used inbuilt mux only > when ffmpeg mux crashes dvbcut). I think you can ignore these. I can test MPEG-1/2 detection myself - I have a rather big video archive, actually. I'm more interested in the other formats, in particular HD stuff because that's what people want most. > Not sure how you would like media files, eg grab first 1-2 MB and upload > it to your server ? 1 MB per file should do the trick. But it would be better if you upload them to some sharehosting service and send me the link. Thanks for your effort, by the way! -- Michael "Tired" Riepe <mich...@mr511.de> X-Tired: Each morning I get up I die a little ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ DVBCUT-user mailing list DVBCUT-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dvbcut-user