English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 12 May 2020, 00:31   #81
Retroplay
Lemon Curry ?
 
Retroplay's Avatar
 
Join Date: Sep 2004
Location: Denmark
Age: 49
Posts: 4,079
Like I always do, use MeGUI.
Retroplay is offline  
Old 12 May 2020, 12:24   #82
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by jotd View Post
@Foebane I could change audio track and keep video intact and output to .avi

ffmpeg rules, specially since you can batch the conversions. Other tools with a GUI require you to click on buttons to death, and batch modes are also not that good. Command line forever!

Code:
ffmpeg -i "GHOSTOWN human traffic @56883.avi" -acodec mp3 -b:a 320k -vcodec copy ghostown.avi
320k may be a bit excessive, you may want to reduce this.

On my machine it takes a few seconds to reencode only the audio.

a good starting point was: https://superuser.com/questions/2154...gs-with-ffmpeg

PS: awesome demo BTW, and the video codec is great too.
I converted the file with your command above, but the file was still fairly big, and the player not being able to play it is still there. I'm guessing that TSCC does only light compression in an obscure format for speed, so it's not exactly compatible as a final format.

Do you know what the parameters are for AAC audio and simple MP4 video re-encoding? I might have to convert them both anyway.

Quote:
Originally Posted by Retroplay View Post
Like I always do, use MeGUI.
I looked more closely at your video, and I think you used far too much compression. I also didn't want it cropped. Thanks all the same
Foebane is offline  
Old 12 May 2020, 12:54   #83
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
You required not to change the video stream. But changing the video stream to MP4 is not a problem either. I'll post the details later when I can check my source code.
jotd is online now  
Old 12 May 2020, 13:17   #84
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by jotd View Post
You required not to change the video stream. But changing the video stream to MP4 is not a problem either. I'll post the details later when I can check my source code.
Thanks. Yes, I didn't require it at first, but then I thought the video was more compressed, so that's why.
Foebane is offline  
Old 12 May 2020, 18:02   #85
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
I've tried this command for ffmpeg, but it produces an unplayable file. I don't know what extension to use, for a start, but everything else seems fine!

Code:
"C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i output.avi -vcodec libx264 -preset slow -crf 20 -acodec mp3 -b:a 160k done.mkv
I got the example from a page about H.264 video.
Foebane is offline  
Old 12 May 2020, 19:32   #86
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
My python script wraps ffmpeg and outputs .mp4. It also chains 2 passes so size is even better (adapts to various parts of the video)

ffmpeg.zip
jotd is online now  
Old 12 May 2020, 21:15   #87
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
I asked elsewhere, and eventually, I was given this solution:

Code:
ffmpeg -i input.avi -c:v libx264 -preset slow -crf 20 -c:a aac -b:a 160k -vf format=yuv420p -movflags +faststart output.mp4
This has worked brilliantly, and has produced fully functional, smaller and stable videos which look very neat. The person who helped me also provided details about the parameters, and I decided that I didn't need the -movflags and +faststart, at least for now.

EDIT: Forgot to mention, the parameters I had were more or less the same, but the crucial part was "-vf format=yuv420p" for MP4 compatibility.
Foebane is offline  
Old 12 May 2020, 22:39   #88
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
Ffmpeg forever!! And you're still not using 2 passes. Using 2 passes reduces the size even more for the same quality (or better quality for same size), but it's more complex so I scripted it in the python script.
jotd is online now  
Old 12 May 2020, 23:44   #89
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by jotd View Post
Ffmpeg forever!! And you're still not using 2 passes. Using 2 passes reduces the size even more for the same quality (or better quality for same size), but it's more complex so I scripted it in the python script.
Thanks, but I believe the file size is related to how much on-screen activity there is. I notice that the encoding with TSCC is real-time unless the screen is particularly busy, especially with any medium-res or interlaced stuff, when it stutters, obviously because it's encoding in real-time.

The last file I just did, Tint by The Black Lotus, was THE biggest raw file by far, being something like 1.6Gb in size for just over 12 minutes, and that's most likely because of the end credits, which are both medium res and interlaced and scrolling large HAM graphics complete with spinning sprite logo, and it stuttered throughout.

But when I processed it in ffmpeg, the final file size was just EIGHT PERCENT of the original file!! That's the most extreme reduction in size I've ever seen in video processing! So the final Tint size is 123Mb!
Foebane is offline  
Old 13 May 2020, 09:14   #90
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
Of course, you have to favor recording speed and accept that the recorded file is big (no or very fast and inefficient compression), then use a second pass to apply high quality, multipass compression filters on video & audio.

Devices that do that in real time embed special DSP chips that can do mp4 by hardware (and can't use multipass obviously). PeeCees can't do that (unless maybe you buy a special device)

As explained, when using multipass, the first pass encodes the video at a constant bit rate, but also logs the results/stats. The second pass exploits the log to use more bitrate when there's more movement on screen (same goes for audio). Known as VBR (variable bit rate). You can add more passes, but it's less and less interesting.
jotd is online now  
Old 13 May 2020, 09:51   #91
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
So the bitrate is constant as I'm doing it now? Well, that's not so bad, I never liked the idea of VBR in my old MP3 files anyway.

I consulted this webpage a lot during my research yesterday.
Foebane is offline  
Old 13 May 2020, 10:20   #92
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
yeah, with one pass, bitrate is constant. But hard drive space is cheap
jotd is online now  
Old 13 May 2020, 10:51   #93
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by jotd View Post
yeah, with one pass, bitrate is constant. But hard drive space is cheap
I don't mind larger files for consistent quality, and a lot of them are smallish, in the 40Mb range.

What I've never liked about video files is that deterioration in the quality when a lot of motion occurs, always hated that fuzziness, even on DVDs and streaming.
Foebane is offline  
Old 13 May 2020, 12:19   #94
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
that's not what variable bitrate does. The videos where quality deteriorates have too low bitrate (constant or variable). If you use variable bitrate with the same overall bitrate, what will happen (If I understand correctly):

- first pass, encoder encodes with constant specified bitrate
- second pass, encoder checks the stats of encoded video and tries to get as close as possible to the sequence of images with the first pass (or original sequence of image). If it succeeds with a lower bitrate, then it keeps that low bitrate for the current image sequence. If it doesn't it increases bitrate and uses specified bitrate.

So you can only win in size, because of this image comparison feedback that prevents the software from lowering quality when more data is needed.
jotd is online now  
Old 13 May 2020, 23:40   #95
rutra80
Registered User
 
Join Date: Jul 2019
Location: Poland
Posts: 308
Not quite : )
1-pass -crf is variable bitrate / constant quality - with -crf value you specify desired quality (lower value = better quality) and encoder encodes each frame with as many bits as is needed to reach given quality but you have no idea how big/small the file will be.
2-pass is variable bitrate / variable quality - you gain control over how small/big the file will be. After 1st pass encoder has full knowledge of material and on 2nd pass may shave off bits of low motion / low detail frames, and assign more bits to high motion / high detail frames - quality will fluctuate but you will be able to reach specific file size.

Audio is always 1-pass and, with exception of mp3, variable/average bitrate too.
rutra80 is offline  
Old 13 May 2020, 23:49   #96
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Over the last 36 hours, I have recorded 60 videos based on the CBR, and I have noticed that the more active screen activity a demo has (and the least likely to fit in with H.264 video) the bigger the file will be.

My largest video by far is Total Triple Trouble by Rebels @ 312Mb - no doubt because of all the copper effects and especially the colour cycling through a lot of it, it plays havoc on such video encoders.

One of my smallest videos is Jesus Christ Motocross by Nature @ 23Mb - I can only guess because it's the closest Amiga demo I have to basically a CGI cartoon, and of course, H.264 likes those high-end demos the most.

Once I've finished recording, I will send a list of the demos I recorded, and their file sizes. It should make for interesting reading.
Foebane is offline  
Old 14 May 2020, 00:32   #97
rutra80
Registered User
 
Join Date: Jul 2019
Location: Poland
Posts: 308
Quote:
Originally Posted by Foebane View Post
CBR
You mean CRF, which is VBR
rutra80 is offline  
Old 14 May 2020, 09:46   #98
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,163
thanks for clarifying. I guessed (wrong) the details, but it amounts to the same thing. Multipass is required to reduce size, with the same quality.
jotd is online now  
Old 14 May 2020, 10:45   #99
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by rutra80 View Post
You mean CRF, which is VBR
Yep, thanks, I read it was that, I just misremembered.

Anyway, I have now recorded 72 favourite demos that I would view normally, and they have all been encoded with TSCC and converted with ffmpeg, with 50% stereo separation and at 50fps, as I view them on my monitor. I even found a way to add "album art" to each video file for presentation, via mp3tag.

Here's the list of demos. I might put a requested sample on The Zone. Will I need to zip it up?

Code:
 Volume in drive C is Foebane
 Volume Serial Number is 945F-CD97

 Directory of C:\Users\aaron\Videos\Amiga Demos

30/09/2018  12:00    <DIR>          .
30/09/2018  12:00    <DIR>          ..
30/09/2018  12:00        66,193,430 ABYSS extralife @2982.mp4
30/09/2018  12:00       106,702,255 ANADUNE sunrise @17868.mp4
30/09/2018  12:00        37,513,608 ANARCHY in the kitchen @414.mp4
30/09/2018  12:00        37,911,852 ANDROMEDA sequential @403.mp4
30/09/2018  12:00        78,304,431 ATTENTIONWHORE invertebrates @75793.mp4
30/09/2018  12:00        33,305,723 AUSTRALIAN DRUG FOUNDATION outside planet earth @63345.mp4
30/09/2018  12:00        88,834,090 AXIS big time sensuality @3449.mp4
30/09/2018  12:00        56,762,020 BOMB shaft7 @1132.mp4
30/09/2018  12:00        45,135,793 BRAINSTORM electric ocean @50152.mp4
30/09/2018  12:00        59,553,474 DA JORMAS 84 t @18481.mp4
30/09/2018  12:00        41,443,566 DA JORMAS major release @13022.mp4
30/09/2018  12:00        79,950,739 DA JORMAS ulsteri @4490.mp4
30/09/2018  12:00        26,131,738 DARKAGE neo @3467.mp4
30/09/2018  12:00        50,742,982 DISASTER AREA gagrakacka mind zones @65778.mp4
30/09/2018  12:00        28,486,611 DRIFTERS twenty @50156.mp4
30/09/2018  12:00        59,662,092 EPHIDRENA knarkzilla @81085.mp4
30/09/2018  12:00        80,556,035 EPHIDRENA neonsky @67789.mp4
30/09/2018  12:00        15,616,626 ESSENCE crazy sexy cool @3819.mp4
30/09/2018  12:00        63,622,219 EXTREME ENTERTAINMENT push @1936.mp4
30/09/2018  12:00       101,630,638 FACULTY lethal dose 2 @12348.mp4
30/09/2018  12:00        50,140,517 FAIRLIGHT faktory @1153.mp4
30/09/2018  12:00        32,262,397 FIVE FINGER PUNCH arachnid cycle @84819.mp4
30/09/2018  12:00        50,819,073 FOCUS DESIGN 1992 @84825.mp4
30/09/2018  12:00        31,216,682 FOCUS DESIGN be kool fool @66249.mp4
30/09/2018  12:00        41,332,568 FOCUS DESIGN plasma hut @53535.mp4
30/09/2018  12:00        49,427,177 GHOSTOWN human traffic @56883.mp4
30/09/2018  12:00        31,399,725 GHOSTOWN sushi boyz @65405.mp4
30/09/2018  12:00        73,550,209 HAUJOBB mild fantasy violence @30293.mp4
30/09/2018  12:00        45,451,991 HAUJOBB signals @81077.mp4
30/09/2018  12:00        67,081,424 LEMON de profundis @81081.mp4
30/09/2018  12:00        92,501,349 LEMON rink a dink redux @61182.mp4
30/09/2018  12:00       128,818,336 LEMON the fall @75773.mp4
30/09/2018  12:00        57,432,932 LIMITED EDITION mind abuse @3949.mp4
30/09/2018  12:00        38,575,382 LIMITED EDITION mind traveller @3948.mp4
30/09/2018  12:00        10,942,295 LOGICOMA way too rude @85248.mp4
30/09/2018  12:00        67,643,523 LOVEBOAT beats @3448.mp4
30/09/2018  12:00        69,587,951 MADWIZARDS kioea @59135.mp4
30/09/2018  12:00       128,948,312 MADWIZARDS mute 12 @2573.mp4
30/09/2018  12:00        28,979,554 MANKIND euskal 8 party invitation @2377.mp4
30/09/2018  12:00        20,945,289 MOODS PLATEAU stealth ranger @61221.mp4
30/09/2018  12:00        30,320,954 MOVEMENT mina omistan @3875.mp4
30/09/2018  12:00        23,297,340 NATURE jesus christ motocross @52968.mp4
30/09/2018  12:00       114,168,372 NERVE AXIS pulse @195.mp4
30/09/2018  12:00       113,907,178 NOXIOUS beyond belief @10248.mp4
30/09/2018  12:00        98,783,505 OXYGENE vision @3032.mp4
30/09/2018  12:00        20,994,799 OZONE smoke bomb @170.mp4
30/09/2018  12:00       104,352,549 POLKA BROTHERS the prey @703.mp4
30/09/2018  12:00        45,602,760 PUSH ENTERTAINMENT incision @3590.mp4
30/09/2018  12:00        46,245,611 PUSH ENTERTAINMENT mental @10727.mp4
30/09/2018  12:00       108,451,570 RAM JAM it can't be done @2649.mp4
30/09/2018  12:00        59,613,253 RAM JAM massive killing capacity @2647.mp4
30/09/2018  12:00        44,626,018 RAVE NETWORK OVERSCAN urea @2320.mp4
30/09/2018  12:00        60,051,442 REBELS paranoid @1630.mp4
30/09/2018  12:00        80,973,928 REBELS switchback @2744.mp4
30/09/2018  12:00       319,598,350 REBELS total triple trouble @2720.mp4
30/09/2018  12:00        48,763,135 REDNEX emptyhead @10234.mp4
30/09/2018  12:00        40,767,495 RESISTANCE enchantment under the sea @70213.mp4
30/09/2018  12:00       199,178,618 SANITY roots 2 @3251.mp4
30/09/2018  12:00        38,598,940 SKARLA authentik @3716.mp4
30/09/2018  12:00        58,246,046 SPACEBALLS norwegian kindness @56651.mp4
30/09/2018  12:00       151,068,854 SPACEBALLS state of the art @99.mp4
30/09/2018  12:00        83,635,048 STEROID unexpected @50462.mp4
30/09/2018  12:00       119,159,946 TEAM HOI hoi saga 1 planet groove @9710.mp4
30/09/2018  12:00        89,800,278 THE BLACK LOTUS glow @6975.mp4
30/09/2018  12:00        47,342,338 THE BLACK LOTUS ocean machine @16337.mp4
30/09/2018  12:00        79,781,445 THE BLACK LOTUS starstruck @25778.mp4
30/09/2018  12:00       126,101,945 THE BLACK LOTUS tint @701.mp4
30/09/2018  12:00        30,835,257 TRACTION past is prologue @59278.mp4
30/09/2018  12:00        39,293,616 TULOU mortality @3465.mp4
30/09/2018  12:00        29,943,995 TULOU something old @74668.mp4
30/09/2018  12:00        50,585,696 UNIQUE pt 2 horizons @75778.mp4
30/09/2018  12:00        29,715,836 UNIQUE subside @67140.mp4
              72 File(s)  4,808,922,725 bytes
               2 Dir(s)  160,775,294,976 bytes free
Foebane is offline  
Old 15 May 2020, 07:09   #100
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Looks like I'll have to revise my list: Total Triple Trouble is an absolute WHOPPER and doesn't even look or sound that good, and neither does State of the Art, and Planet Groove is boring, too.

I was quite surprised that the more Amiga-y the visuals are, the larger the file size is. I mean, Drifters' Twenty has video footage in HAM in it and it's easily one of the smaller files there!

Naturally, Logicoma's Way Too Rude is the tiniest file by far, which is not surprising, considering the demo's sparse visuals.
Foebane is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording sound in WinUAE ldaneels support.WinUAE 13 25 May 2013 13:44
recording audio via winuae stevorino support.WinUAE 2 27 May 2011 13:17
Input Recording Problems (Winuae 1.3+) hipoonios support.WinUAE 19 11 October 2010 08:21
Recording Amiga games videos project bLAZER Retrogaming General Discussion 1 20 December 2009 15:29
Recording makes the Winuae superslow MRZ support.WinUAE 24 13 March 2002 01:55

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:15.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12180 seconds with 16 queries