Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th May 2011, 15:49   #1  |  Link
MadiZone
Registered User
 
Join Date: May 2011
Posts: 4
Samsung Galaxy S II, PlayStation3 and DLNA-sharing

Thread summary: Compatibility issues between MPEG-4 files recorded on Galaxy S II and PlayStation3 video player.


Hello Doom9. This is my first post after 5 days of patiently waiting - finally it's my turn in the line. :-)

I am the lucky owner of one of the new Samsung Galaxy S II which records H.264 video and AAC audio in both 1080p and 720p. Furthermore it has built-in DLNA sharing support, so I can play the content on other DLNA-enabled devices such as the PlayStation3 - or can I?

When I start the Allshare DLNA-server on my phone, I can access it from my PS3 and while my JPEG-shots display just fine, I am having problems with my video. The PlayStation3 simply refuses to play the file and reports it as unsupported - despite the fact that PS3 supports both H264 and AAC out of the box.

With my limited technical insight into the MPEG-4 format I have isolated the problem and even identified a solution, although it's not ideal.

When opening the recording in MediaInfo, I get the following information:

Code:
General
Complete name                    : D:\Film\Galaxy II samples\road_original.mp4
Format                           : MPEG-4
Format profile                   : 3GPP Media Release 4
Codec ID                         : 3gp4
File size                        : 4.20 MiB
Duration                         : 3s 508ms
Overall bit rate                 : 10.0 Mbps

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : Baseline@L3.1
Format settings, CABAC           : No
Format settings, ReFrames        : 1 frame
Format settings, GOP             : M=1, N=30
Muxing mode                      : Container profile=Unknown@1.1
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 3s 508ms
Bit rate mode                    : Variable
Bit rate                         : 9 980 Kbps
Width                            : 1 280 pixels
Height                           : 720 pixels
Display aspect ratio             : 16:9
Frame rate mode                  : Variable
Frame rate                       : 30.217 fps
Minimum frame rate               : 21.739 fps
Maximum frame rate               : 43.478 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.358
Stream size                      : 4.17 MiB (99%)
Language                         : English

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : LC
Codec ID                         : 40
Duration                         : 3s 456ms
Bit rate mode                    : Variable
Bit rate                         : 50.8 Kbps
Nominal bit rate                 : 58.5 Kbps
Maximum bit rate                 : 62.1 Kbps
Channel(s)                       : 1 channel
Channel positions                : Front: C
Sampling rate                    : 16.0 KHz
Compression mode                 : Lossy
Stream size                      : 21.4 KiB (0%)
Language                         : English
Notice the bold part. Apparently, the PlayStation3 doesn't like 3GP4. But if I open the file in QuickTime only to export it with direct stream copying, I arrive with this file:

Code:
General
Complete name                    : D:\Film\Galaxy II samples\road_remuxed.mp4
Format                           : MPEG-4
Format profile                   : Base Media / Version 2
Codec ID                         : mp42
File size                        : 4.20 MiB
Duration                         : 3s 541ms
Overall bit rate                 : 9 943 Kbps
Encoded date                     : UTC 2011-05-29 15:21:04
Tagged date                      : UTC 2011-05-29 15:21:04

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : Baseline@L3.1
Format settings, CABAC           : No
Format settings, ReFrames        : 1 frame
Format settings, GOP             : M=1, N=30
Muxing mode                      : Container profile=Unknown@1.1
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 3s 541ms
Bit rate mode                    : Variable
Bit rate                         : 9 886 Kbps
Width                            : 1 280 pixels
Height                           : 720 pixels
Display aspect ratio             : 16:9
Frame rate mode                  : Variable
Frame rate                       : 29.935 fps
Minimum frame rate               : 21.739 fps
Maximum frame rate               : 43.478 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.358
Stream size                      : 4.17 MiB (99%)
Language                         : English
Encoded date                     : UTC 2011-05-29 15:21:04
Tagged date                      : UTC 2011-05-29 15:21:04

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : LC
Codec ID                         : 40
Duration                         : 3s 520ms
Bit rate mode                    : Variable
Bit rate                         : 48.0 Kbps
Nominal bit rate                 : 58.5 Kbps
Maximum bit rate                 : 62.1 Kbps
Channel(s)                       : 1 channel
Channel positions                : Front: C
Sampling rate                    : 16.0 KHz
Compression mode                 : Lossy
Stream size                      : 21.4 KiB (0%)
Language                         : English
Encoded date                     : UTC 2011-05-29 15:21:04
Tagged date                      : UTC 2011-05-29 15:21:04
The profile is now MP42, but the streams inside are the same.
This new file is now playable by the PlayStation3. No transcoding, no tricks.

For reference, I have uploaded both of above files for you to examine if you want:

Original version: http://www.nielsbuus.dk/ting/skattek...d_original.mp4
Exported from QuickTime Pro: http://www.nielsbuus.dk/ting/skattek...ad_remuxed.mp4

Now - transfering every video recording I have made to my PC just to manually remux the video in QuickTime is a tedious task. Therefore I would like to ask you:

Do you have any ideas for a smarter way to go around this? Please include pros and cons. I am not interested in anything that involves transcoding.

I have searched the Android Market for an app that can batch remux video on the phone, but it seems that no such app exist.

Any ideas?
MadiZone is offline   Reply With Quote
Old 29th May 2011, 16:35   #2  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,949
remux with mp4box or try to change the codec id atom @ hex level (3gp4->mp42) and see if that is what the playstation 3 is parsing for, from how you describe it it seems so, asking maybe Sony to support the 3gp4 atom in their parser would be a easier way, though it's Sony good luck
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004

Last edited by CruNcher; 29th May 2011 at 16:40.
CruNcher is offline   Reply With Quote
Old 29th May 2011, 16:41   #3  |  Link
Lam3rD
Registered User
 
Join Date: Oct 2009
Posts: 47
Assuming you're under Windows:

1. download ffmpeg
2. open notepad and paste this:

Code:
@ECHO OFF
:Loop
IF "%~1"=="" GOTO Continue
path\to\ffmpeg -i %1 -vcodec copy -acodec copy %1-fixed.mp4
SHIFT
GOTO Loop
:Continue
pause
3. replace path\to with the correct path
4. save as something.bat
5. drag and drop all videos you have on the batch file and you'll have them soon enough

p.s: in some cases "all" could be too much for DOS to handle, so you might have to drop them in little chunks (like 5-10-20 at a time)

Code:
General
Complete name                    : D:\encoding\road_original-fixed.mp4
Format                           : MPEG-4
Format profile                   : Base Media
Codec ID                         : isom
File size                        : 4.20 MiB
Duration                         : 3s 541ms
Overall bit rate                 : 9 943 Kbps
Writing application              : Lavf52.31.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : Baseline@L3.1
Format settings, CABAC           : No
Format settings, ReFrames        : 1 frame
Format settings, GOP             : M=1, N=30
Muxing mode                      : Container profile=Unknown@1.1
Codec ID                         : avc1
Codec ID/Info                    : Advanced Video Coding
Duration                         : 3s 541ms
Bit rate mode                    : Variable
Bit rate                         : 9 886 Kbps
Width                            : 1 280 pixels
Height                           : 720 pixels
Display aspect ratio             : 16:9
Frame rate mode                  : Variable
Frame rate                       : 29.935 fps
Minimum frame rate               : 21.739 fps
Maximum frame rate               : 43.478 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.358
Stream size                      : 4.17 MiB (99%)
Language                         : English

Audio
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format profile                   : LC
Codec ID                         : 40
Duration                         : 3s 520ms
Bit rate mode                    : Variable
Bit rate                         : 48.0 Kbps
Channel(s)                       : 1 channel
Channel positions                : Front: C
Sampling rate                    : 16.0 KHz
Compression mode                 : Lossy
Stream size                      : 21.4 KiB (0%)
Language                         : English
they should be able to support isom MPEG-4
__________________
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."
-- Albert Einstein

Last edited by Lam3rD; 29th May 2011 at 16:46.
Lam3rD is offline   Reply With Quote
Old 29th May 2011, 16:44   #4  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,949
yup if you have root on the galaxy you might be able as well to compile an arm version and use it directly on the Galaxy, though for lower power consumption i wouldn't go the complete remux way rather change the codec id atom first per file (much less power consumption)
Though the easiest way still (from a consumer perspective) is contacting Sony's support and make them aware of this interoperability issue with Samsungs Galaxy Recordings (they have to fix it in the next Firmware). And if Sony doesn't want to then try to contact Samsung and explain them the issue so they can maybe create a workaround mode for Sonys Playstation 3 (enable disable able via the Recording Gui).
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004

Last edited by CruNcher; 29th May 2011 at 16:51.
CruNcher is offline   Reply With Quote
Old 29th May 2011, 16:50   #5  |  Link
MadiZone
Registered User
 
Join Date: May 2011
Posts: 4
Quote:
Originally Posted by CruNcher View Post
remux with mp4box or try to change the codec id atom @ hex level (3gp4->mp42) and see if that is what the playstation 3 is parsing for, from how you describe it it seems so, asking maybe Sony to support the 3gp4 atom in their parser would be a easier way, though it's Sony good luck
I downloaded a hex editor and found the atom. Changed it from 3GP4 to MP42 and now it plays on the PS3 - amazing it was that simple. However, do you know if what I am doing is "anatomically safe"? I mean, is it legit to just change the identifier in a hex editor like that? Will it break compatibility with something else?

After the ftypXXXX there is 3gp43gp6

It sounds awfully resemblant of the previous identifier. Any idea what it does? 3GP4 3GP6. What is 3GP6?

Should I change them to MP42MP42?

Update: I've just done so and PlayStation3 still plays them.

Last edited by MadiZone; 29th May 2011 at 16:53.
MadiZone is offline   Reply With Quote
Old 29th May 2011, 16:58   #6  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,949
I don't know the 3gp specs and indeed other parser could get into trouble if they expect something to be spec conform so you create a mutation file and yeah changing the other identifier as well is a good idea, you could try if other parser though accept this mutation
Though if Apples player opens it and can handle it, it should be pretty save, also copy it back onto the Galaxy and see if it can handle the remuxed as well the mutation also compare the remuxed with the mutation on the other identifier
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004

Last edited by CruNcher; 29th May 2011 at 17:01.
CruNcher is offline   Reply With Quote
Old 29th May 2011, 16:59   #7  |  Link
MadiZone
Registered User
 
Join Date: May 2011
Posts: 4
Quote:
Originally Posted by Lam3rD View Post
Assuming you're under Windows:

1. download ffmpeg
2. open notepad and paste this:

Code:
@ECHO OFF
:Loop
IF "%~1"=="" GOTO Continue
path\to\ffmpeg -i %1 -vcodec copy -acodec copy %1-fixed.mp4
SHIFT
GOTO Loop
:Continue
pause
3. replace path\to with the correct path
4. save as something.bat
5. drag and drop all videos you have on the batch file and you'll have them soon enough

p.s: in some cases "all" could be too much for DOS to handle, so you might have to drop them in little chunks (like 5-10-20 at a time)
Thanks! I didn't know ffmpeg could do that. :-)
Certainly beats running the stuff through QuickTime.
MadiZone is offline   Reply With Quote
Old 29th May 2011, 17:09   #8  |  Link
MadiZone
Registered User
 
Join Date: May 2011
Posts: 4
To those of you suggestion contacting Sony: Do you have any ideas for a particular department or branch I could send my inquiry?

Because I fear it might just up at some clueless helpdesk worker that'll encourage me to check my HDMI-cable and make sure my network settings are dandy.
MadiZone is offline   Reply With Quote
Old 29th May 2011, 17:18   #9  |  Link
Lam3rD
Registered User
 
Join Date: Oct 2009
Posts: 47
Another option is to ask the developers of Allshare DLNA-server to patch the file on-the-fly, it shouldn't be too hard to do and they are more likely to respond to such request
__________________
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."
-- Albert Einstein
Lam3rD is offline   Reply With Quote
Reply

Tags
3gp4 mp42 ps3 galaxy

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 +1. The time now is 04:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.