Solved cannot use encoded QVideoFrame object contents to base64 as
-
I have a QVideoFrame object which is valid
I just encode the bits of that to base64 by the following method
method body :QVideoFrame frame ( f ); if ( frame.map ( QAbstractVideoBuffer::MapMode::ReadOnly ) ) { char * bits = (char *) frame.bits ( ); QByteArray arr ( bits ); qDebug ( ) << arr.toBase64 ( ) << endl; frame.unmap ( ); }
but I cannot read the encoded contents in html via the following tag
<video controls src="data:video/mpeg;base64,$encodedContents" />
why?
-
-
-
I got the following contents from received bits of the frame and convert it to base64 but still cannot read it
src attribute of video element in html
<video controls src="data:video/mp4;base64,$followin_content" />
EgsT/xMMFP8SDRP/EQwR/xEMEP8RDBD/EAsP/xALDv8QDA3/DwsM/w8LC/8PCwr/DgsK/wwLCf8NDAr/DQwK/wsKCP8MCwn/DQwK/w8ODP8NDAr/Dg0L/w4NC/8ODQv/DQwK/w8ODP8QDw3/EA8N/xAPDf8ODQv/DQwK/wwLCf8MCwn/DQwK/w0MCv8MCwn/DQwK/wwLCf8MCwn/CQgG/woJB/8KCQf/CgkH/wsKCf8KCgr/CQkJ/woJCP8LCgj/CwoI/wwLCv8NCwz/DQsM/w4MDf8NCwz/DQsM/w0LDP8NCwz/DQsM/w0LDf8NCw7/DAoN/w4MD/8ODA//DgwP/w4MD/8ODA//DgwP/w8NEP8PDRD/EA4R/w0MD/8PDxH/CwwO/wsMDv8MDQ//CwwO/wsMDv8NDg//DA4N/wsNDP8ODg7/Dg4N/xEQD/8PDgz/Dg0L/w8ODP8ODQv/Dg0L/w8ODP8QDQz/Ew8O/xMPDv8RDg3/Dw4M/xAPDf8QDw3/Dw4M/w4NC/8QDw3/Dw4M/w8ODP8ODQz/DQsM/wwKC/8NCw3/DAoN/w0LDv8ODA//DgwP/w4MD/8PDRD/EQ8S/w8NEP8QDhH/Dg0Q/w0NDv8ODg3/Dw8N/w8PDf8QEA7/Dw8N/xISEP8QEQ3/EBEN/xAQDv8QEA7/DxAM/w8QC/8PEAv/Dg4K/w4NCf8PDgr/Dg0J/w8OCv8QDwv/Dw4K/xAPC/8QDwv/EA8L/w8OCv8ODQn/Dw0J/xAMCf8PCwn/DgoJ/w0JCP8NCQj/DQkI/wwIB/8MCAf/DAgH/wwIB/8MCAf/CwcG/wsHBv8LBwf/CQYH/wgGB/8IBgf/BwUG/wcFBv8GBAX/BwUG/wcFBv8HBQf/BwUI/wcFCP8HBQj/BgQH/wcFCP8HBQj/CQYJ/wsGCv8KBQn/CwYK/wsGCv8LBgr/CwYJ/woFB/8LBwj/CwcI/wsHB/8LBwf/CwcG/wsHBv8KBgX/CwcG/wsHBv8LBwb/CwcG/woHBv8IBw
-
@Jafar-Sag-Sibil The bits of a particular frame aren't a video/mpeg or video/mp4 format, so I am not sure I'd expect any of this to work. What are you actually trying to accomplish?
Putting an entire mp4 video file as base64 inside an html file doesn't make a ton of sense. Decoding all the frames to then try to put a completely decoded, base64 expanded raw video into the text of an HTML file seems to make even less sense.
-
An online video chat