|
|
| trodas |
Posted: May 24 2014, 08:24 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
Todays I take a 9 mov pieces (the video inside is MPEG4 AVC (avc1), audio is IMA 4.0 ADPCM (ima4) ) and converted them using VirtualDub "direct stream copy" for both video and audio to AVI pieces.
The capacity increased significantly - 1st piece from: 64 883 794 to 94 457 310
WTF?!
Complete capacity was: 953 057 804 and it is in avi now 1 356 829 794
...bad enought? It get worser. Then I tried to join all the pieces (the reason why I go for the AVI in first place) and the capacity from the size of the pieces: 1 356 829 794 bumped to 3 607 073 114
WTF!!!
Anyone have any idea, what I doing wrong?! Or is the codecs inside these mov files so much incompatible with AVI container? I could, I suppose, reencode the audio...
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| trodas |
Posted: May 24 2014, 08:54 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
After reencoding the audio to 128kBy CBR by Lame encoder, the sizes of the resulting files go nicely down - first chunk was: 64 883 794 and it is now 58 147 268
The complete size of the avi files are now: 861 041 294 and was 953 057 804
So far so good, eh? Well, not so fast! After loading all the chunks back in VirtualDub, appending one after another, I get again this size: 3 485 702 628
This is NUTS!
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| raffriff42 |
| Posted: May 25 2014, 05:55 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
Unfortunately the input plugins required for non-AVI sources always decompress the stream. That's the reason for the huge file sizes.
To copy the streams to another format ("remuxing"), it's easier to use ffmpeg:| CODE | | ffmpeg -i "video.mov" -c:v copy -c:a copy "video.avi" | ...assuming the streams are compatible with AVI, and it looks like yours are (AVC video, PCM audio)
If you want to join MOV pieces, again it's easier to use ffmpeg:| CODE | | ffmpeg -i concat "video1.mov|video2.mov|video3.mov" -c:v copy -c:a copy "output.mov" |
EDIT correction, that should be:| CODE | | ffmpeg -i "concat:video1.mov|video2.mov|video3.mov" -c:v copy -c:a copy "output.mov" |
This post has been edited by raffriff42 on May 26 2014, 11:16 AM |
 |
| trodas |
Posted: May 25 2014, 11:09 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
Not true. It always used Direct stream copy. Sadly I always ended up with 3x bigger size of file that it should be. Or tell me, how in the hell I was able to encode at mere old Opteron 148 CPU (yes, Socket 939) at 1500+ FPS 

Hence your argument is invalid. I never do any conversion AND on top of that, if you already bothered to read my post at all, then you noticed, that I actually make the mov files smaller when converted to avi, using mp3 audio instead of the default ADPCM. So if you just read up, then you notice that I can do Direct stream copy in the mov files for reencoding just audio. Stop looking for fail where it is not and start reading pls.
I usually used VD for joining parts that are at same resolution/bitrate w/o troubles. I did not do ANY MODIFICATION to the files, I just wanted them to join... that it is. Uncompressed file will be several magnitudes bigger anyway. The total lenght of the resulting video is over 2h, so 3.5G won't cover that, lol. Hmmm, the bitrate fluctuate between 1917 (part 1) and 2086 (part 7) ... that should not be that huge problem, could it?
I tried FFmpeg on the original mov parts (assuming I can reencode the audio to mp3 later), but the commandline does not work. I used this:
ffmpeg -i concat "1.mov|2.mov|3.mov|4.mov|5.mov|6.mov|7.mov|8.mov|9.mov" -c:v copy -c:a copy "output.mov"
"concat: No such file or directory"
Removing concat does not help too:
"1.mov|2.mov|3.mov|4.mov|5.mov|6.mov|7.mov|8.mov|9.mov: Invalid argument"
Help?
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| raffriff42 |
| Posted: May 25 2014, 11:17 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
I got the syntax wrong, sorry. ffmpeg -i "concat:..." http://trac.ffmpeg.org/wiki/How%20to%20con...20media%20files |
 |
| trodas |
Posted: May 25 2014, 08:30 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
First good news - this:
ffmpeg -i "concat:1.mov|2.mov|3.mov|4.mov|5.mov|6.mov|7.mov|8.mov|9.mov" -c:v copy -c:a copy "output.mov"
...actually works well and the FFMpeg is trying to do something. However it end up with HUGE number of errors:
http://www.mediafire.com/?nqc8wdu50p8mz5b
backup: http://www.sendspace.com/file/xvh4u2 https://www.oboom.com/4YWP32QM
...and the output file contain roughly the 1st episode. Not quite good.
So I get idea... what about joining the AVI files ...?
ffmpeg -i "concat:1.avi|2.avi|3.avi|4.avi|5.avi|6.avi|7.avi|8.avi|9.avi" -c:v copy -c:a copy "output.avi"
The result is 861 975 992 bytes big (that is good, the total capacity of the joined files are 861 041 294 bytes) however it does not play... some sound do play, but not much of video 
Log is there: http://www.mediafire.com/?4aonp5qksf5bdsz
backup: http://www.sendspace.com/file/l664vl https://www.oboom.com/UJN5FNSU
So I tried the ASF-AVI-RM-WMV Repair v1.82 and the result is 860 962 816 bytes long and same "usable" as the normal version...
But funny thing - VirtualDub (1.10.4 build 35491) crashed when I tried to load the file into it. Funny stuff. There is the log: http://www.mediafire.com/?phpqys6nds6ph61
backup: http://www.sendspace.com/file/twz57y https://www.oboom.com/E9GERFSJ
...there is something very wrong and I have no clue what... Uploading the file for bugreport, lol. FFmpeg produced file that crash VD, funny. BSplayer did not crash, but play only audio and only after seeking + SOME time... interesting...
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| raffriff42 |
| Posted: May 25 2014, 09:18 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
I don't know. Try the concat demuxer alternative. | QUOTE | There are two methods within ffmpeg that can be used to concatenate files of the same type: the concat ''demuxer'' and the concat ''protocol''. The demuxer is more flexible - it requires the same codecs, but different container formats can be used; and it can be used with any container formats, while the protocol only works with a select few containers. ...While the demuxer works at the stream level, the concat protocol works at the file level... |
Note whatever method you use, all of the codecs must match in the original files. |
 |
| trodas |
| Posted: May 25 2014, 11:55 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
I know that. ALL OF THE CODECS DO MATCH in the original files.
There is the resulting file that do crash VirtualDub on attempt to open it: https://www.oboom.com/CIKYNBQA
(upload to Mediafire and Sendspace caused failures, so I try later)
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| malky |
| Posted: May 26 2014, 12:18 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 290
Member No.: 22386
Joined: 6-November 07

|
Have you tried the other method where you make a txt list of the files (mylist.txt)
| CODE | file 'E:/Office clip/AVI/p1.avi' file 'E:/Office clip/AVI/p2.avi' file 'E:/Office clip/AVI/p3.avi' |
Then from the command line: ffmpeg -f concat -i mylist.txt -c copy all.avi |
 |
| trodas |
Posted: May 27 2014, 09:09 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
Well, then why not. I did this:
| CODE | file 'D:\Tools\Lame\1.avi' file 'D:\Tools\Lame\2.avi' file 'D:\Tools\Lame\3.avi' file 'D:\Tools\Lame\4.avi' file 'D:\Tools\Lame\5.avi' file 'D:\Tools\Lame\6.avi' file 'D:\Tools\Lame\7.avi' file 'D:\Tools\Lame\8.avi' file 'D:\Tools\Lame\9.avi' |
And the resulting file are the same and also it is not playing a bit, except audio and even the audio only after a quite long seeking... Useless.
However I think I figured out the bug in VirtualDub: The smaller, VirtualDub (1.10.4 build 35491) crashing file ( https://www.oboom.com/CIKYNBQA - alternative: http://www.mediafire.com/?dlcgvidlyp2ymc9 ) of size 860 962 816 bytes (after the repair) do show in BSplayer lenght 51:31 ... but I vaguely remember, that the lenght of the superbig 3G+ files are over 2h...
The parts lenghts are: 1 - 3:46 2 - 9:01 3 - 5:32 4 - 4:53 5 - 5:38 6 - 5:42 7 - 5:43 8 - 5:31 9 - 5:41
So by rought calculation, this makes 46 min + 327sec = 51min 27sec ... so roughly (the times are probably a few fraction of sec more, so all that make for the missing 4 sec in total between calculated 51:27 and 51:31) this is fine.
However the huge file, that is another story. Let me rejoin the files once again... and we see...
Ugh! Just loading all the avi segments into VD show that there is 299 905 frames and the lenght is 3h 28min 16.042sec. I see a problem! 

Obviously things cannot get right this way...
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| trodas |
Posted: May 29 2014, 05:18 PM |
 |
|

Advanced Member
  
Group: Members
Posts: 88
Member No.: 22291
Joined: 22-October 07

|
Slight bump...?
Maybe the MKVMerge with the --fix-bitstream-timing-information could help me out? Anyone...?
PS. yes! That did the trick! Done!
Because we are getting nowhere with VirtualDub, then I tried the MKV tools. I took the latest version, that the GUI program MMG.exe and added all the original mov files and let it made a mkv file out of that. Added the commandline "--fix-bitstream-timing-information 0:1" - THANKS to ndjamena from VideoHelp forum!
Result: video OK, just no audio. Playable. Weird. So I added the avi files to the MMG, where I have the audio already reencoded and vioa! Result: 858 009 572 bytes big, 51:31 long and all fine!
So I loaded the MKV file into VirtualDub, choosen the Direct stream copy and avi file is there! Result: 861 981 822 bytes big, 51:31 long and playing all well!
Ufff. The bitream was somewhat damaged for sure.
74194 frames now - it was 299 905 frames 51:34.417 time now - it was 3:28:1.042
If anyone want the source mov files, I keep them uploaded, but MKV fixed the bitstream, ugh. Hooooray!
That was hard nut to crack, heh
-------------------- "It is dangerous to be right in matters on which the established authorities are wrong." - Voltaire ...just keep folding, just keep folding... :) my config - my caps |
 |
| malky |
| Posted: May 29 2014, 10:31 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 290
Member No.: 22386
Joined: 6-November 07

|
| QUOTE | | Added the commandline "--fix-bitstream-timing-information 0:1" |
You added the command line in the GUI - where? |
 |
| raffriff42 |
| Posted: May 30 2014, 01:11 AM |
 |
|

Advanced Member
  
Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12

|
| QUOTE (malky @ May 29 2014, 10:31 PM) | | You added the command line in the GUI - where? |
Here's the source| QUOTE | | mux the AVC with MKVMerge with the --fix-bitstream-timing-information 0:1 option | It's an argument to mkvmerge.exe; I think you can use it in mmg.exe (the GUI) with Muxing, Add command line options.
This post has been edited by raffriff42 on May 30 2014, 01:37 AM |
 |
| malky |
| Posted: May 30 2014, 02:31 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 290
Member No.: 22386
Joined: 6-November 07

|
Good to know - thank you! |
 |