Log in

View Full Version : Convert GalaxyS3 1080p30 mp4 to Lagarith or Huffy?


miamicanes
9th June 2013, 01:39
What's the most straightforward, preferably free, way to convert a video shot in 1080p30 on a Galaxy S3 to a lossless codec Avisynth can deal with (Lagarith, HuffyUV, etc)?

The biggest single problem I seem to be having is that every free/open codec, player, and/or converter I've tried chokes on HD videos shot with my phone, even though they play fine on the phone. I can replicate the choking by opening them with VLC and stepping through frame by frame... in some places, the frame disintegrates into macroblock garbage for a dozen or two frames. In others, the player just gets stuck when stepping through, and seems to ignore attempts to move to the next frame until I give up and click 'play' again.

I'm guessing that Samsung's codec chip does something that's not entirely kosher, or maybe is patent/NDA-encumbered and the various open codecs can't/won't deal with it.

I'm not completely averse to spending up to $50 or so if I thought it would make my h.264 headaches go away, but I don't want to throw away money on a commercial codec only to find out that it has the same problem as everything else (or only fixes the problem for media playback, but doesn't do a thing to help with transcoding from mpeg4 to lossless).

Has anybody else run into problems like these and found a solution?

Guest
9th June 2013, 12:03
Post a link to an unprocessed source sample that "chokes" for you. Then we can test it on our various possible decoders.

Reel.Deel
9th June 2013, 14:41
That's sounds very odd. I've never encountered anything like what you described.
I have the S2, which the bitrate is 17 Mbps. A friend of mine has the S3 and the bitrate is slightly higher, IIRC it was 18 Mbps.
I have an older computer (Q6600 (http://ark.intel.com/products/29765)) and it has no problem playing videos from either phone.
Anyways, if you have an Nvidia video card I highly recommend DGDecNV (http://neuron2.net/dgdecnv/dgdecnv.html). It's not free, but the fee is a small price to pay for all the headaches it will save you.
If that is not an option you can always try FFMS2 (http://forum.doom9.org/showpost.php?p=1629550&postcount=1787) and LSMASHSource (http://forum.doom9.org/showthread.php?t=167435). They both work well and single threaded decode slightly faster than realtime.

Here's a decoding benchmark. Since everyone has different hardware is probably irrelevant but it's just to give you an idea.

Video:
[General info]
Log file created with: AVSMeter 1.5.1
Avisynth version: AviSynth 2.60, build:Mar 9 2013 [13:28:27]
Active MT Mode: 0


[Clip info]
Number of frames: 8269
Length (hhh:mm:ss.ms): 000:04:35.633
Frame width: 1920
Frame height: 1080
Framerate: 30.000 (30/1)
Colorspace: YV12

DGDecNV with inexpensive EVGA GeForce GT 520 (http://www.evga.com/Products/Product.aspx?pn=01g-p3-1521-kr) video card:
[Runtime info]
Frames processed: 8269 (0 - 8268)
FPS (min | max | average): 108.62 | 153.45 | 137.99
CPU usage (average): 23%
Thread count: 4
Physical Memory usage (peak): 98 MB
Virtual Memory usage (peak): 176 MB
Time (elapsed): 000:00:59.871


[Script]

DGSource("S2 Video.dgi")

LSMash:
[Runtime info]
Frames processed: 8269 (0 - 8268)
FPS (min | max | average): 34.60 | 53.58 | 39.09
CPU usage (average): 25%
Thread count: 1
Physical Memory usage (peak): 94 MB
Virtual Memory usage (peak): 97 MB
Time (elapsed): 000:03:31.318


[Script]

LSMASHVideoSource("S2 Video.mp4", threads=1)

FFMS2:
[Runtime info]
Frames processed: 8269 (0 - 8268)
FPS (min | max | average): 34.16 | 55.10 | 38.88
CPU usage (average): 25%
Thread count: 1
Physical Memory usage (peak): 90 MB
Virtual Memory usage (peak): 101 MB
Time (elapsed): 000:03:32.425


[Script]

FFVIdeoSource("S2 Video.mp4", threads=1)